Skip to content

Recast the code export as a dock extension rather than a core plugin #8

Description

@nbenn

Companion to BristolMyersSquibb/blockr.core#336, which proposes dropping the generate_code plugin type from blockr.core and moving code export into a blockr.dock extension. This package is the other implementation of that type — generate_flat_code() calls new_plugin(server, ui, class = "generate_code") — so the upstream removal lands here directly, and this is the natural home for the extension, since the generator that justifies the package already lives here.

The move

The generate_flat_code() / generate_flat_code_server() / generate_flat_code_ui() trio becomes a new_dock_extension(). Nothing in R/code.R changes: the idiomatic generator is the reason this package exists and is entirely independent of how the UI is packaged.

Scoped to packaging only. The readiness and construction work this server is missing is #9, which is independent of everything below — it needs no unmerged core API and no decision about a dock dependency, so it should not wait on this.

The consequence to accept

This package currently imports blockr.core, styler, xml2 and downlit, and works against a plain core board. Defining a dock extension means importing blockr.dock, and the code export then only works under a dock board. That mirrors the consequence core#336 accepts on its side, and it is the point at which "an alternative core plugin" becomes "the dock code panel".

Sequencing

Core exports the readiness policy first, which breaks nothing; the extension is built here against it; core then drops the plugin type. The current plugin keeps working throughout, so there is no window where code export is unavailable.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions