Repository navigation
Split Anvil into reusable editor packages - #7
Draft
PSchmiedmayer wants to merge 14 commits into
Draft
PSchmiedmayer wants to merge 14 commits into
PSchmiedmayer wants to merge 14 commits into
Conversation
@schmiedmayerlab/anvil-core holds the questionnaire model, import and export, validation, the plugin registry, the data and validators of the common FHIR and SDC extensions, and the undo store, with no UI. Its FHIR types come from the grove-fhir schemas. @schmiedmayerlab/anvil-react holds the editor UI and the React plugin types. Both build with tsdown to ESM JavaScript and type declarations and are prepared for npm publication. The anvil app owns browser storage, import and export. The plugin types are generic over the component types of a UI layer. The store gains a content revision that undo restores, a load session, selection by index path, and the edited language. The editor takes the host's store, reports changes through onChange, shows external findings for the current revision only, renders host side panels and toolbar content, and never writes to browser storage.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
| needs: | ||
| - validate-tag | ||
| - build-and-test | ||
| uses: SchmiedmayerLab/.github/.github/workflows/npm-publish.yml@v0.5 |
The editor tests move with the React UI into anvil-react and use its toolbar and plugin props. Persistence and file action tests move to the standalone app, and headless cases that reached Core only through the UI become direct Core tests, since React tests run against the built Core package.
The file action tests that moved to the standalone app restore the clipboard and object URL stubs after each test, like the editor tests.
The paste dialog test requires the error element again, the Core limit validation checks the wrong-type message like the React case it replaced, and the test helpers are used consistently.
The limit message now lives in Core and the item control label in React, so each gets the corrected wording where it moved. The Core and React package manifests use the canonical SchmiedmayerLab/Anvil URLs like the root manifest.
The label test moves with the React standard plugin, and Core checks the "a decimal item" limit message, since the limit and the label now live in separate packages.
…packages The Core limit message uses the shared Core helper. React keeps its own copy for the control label, since an English article helper is not part of Core's public API.
Apply the lucide-react update to the React and standalone packages, which now own that dependency, and refresh the npm lockfile with the same versions as the npm workspaces change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
♻️ Current situation & Problem
The reusable editor combines Questionnaire logic and React UI in one private workspace.
Hosts need to own storage and editor state, and some consumers need only the editing logic.
Tracked in #5.
⚙️ Release Notes
@schmiedmayerlab/anvil-corefor the questionnaire model, FHIR validation, store and plugins.@schmiedmayerlab/anvil-reactfor the React editor, including host actions, external findings and the stylesheet export.📚 Documentation
The package READMEs show the standalone core APIs, React embedding and stylesheet imports.
The development guide covers release validation, staged package creation, Trusted Publishing and the separate Pages workflow.
✅ Testing
Verify a clean
npm ci,npm run validate, and a Pages build.Validate the coordinated release plan and install the exact tarballs in a clean consumer to check exported declarations, React peers and CSS.
Check that manual package validation cannot publish and that a release requires an existing verified tag on the matching default-branch commit.
Code of Conduct & Contributing Guidelines