feat(package): add DataVis field and host providers - #158
Open
lattln wants to merge 6 commits into
Open
Conversation
Add a reusable `@esheet/document-list-field` package backed by DataVis, including document normalization, grid rendering, toolbar actions, detail rows, and provider-based host integration. Add generic `FieldProviderStack` support to the builder, renderer, and Blaze renderer so field add-ons can receive host behavior without changing form response data. Register the document-list field in the demo and demonstrate Compose, Upload, detail expansion, custom detail rows, and YAML schema loading. Add focused unit tests and workspace build configuration for the new package.
Deploying esheet with
|
| Latest commit: |
c7960e1
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://bce8ad04.esheet.pages.dev |
| Branch Preview URL: | https://feature-datavis-integration.esheet.pages.dev |
- Add package-owned Compose and Upload modals - Support editable document metadata and note content - Pass transient text and file content through the repository contract - Add text/image detail previews with metadata fallback - Move demo persistence to in-memory document/content maps - Remove host-owned upload and compose handlers - Add workflow tests, styles, and exports
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.
Overview
This PR adds a reusable
@esheet/document-list-fieldpackage backed by DataVis and introduces a generic field-provider mechanism for passing host-specific behavior into fields.The document-list field handles document normalization and grid rendering, while the host application controls actions such as Compose, Upload, detail expansion, routing, persistence, and business workflows.
What Changed
New document-list field package
Added
document-list-field, including:DocumentListFieldDocumentListGridDocumentListFieldProvidercreateDocumentListFieldProvideruseDocumentListFieldHostThe field accepts static definition data or response answers in these forms:
Rows are normalized into a consistent document summary shape, with fallback display values for missing data.
Generic field-provider support
Added FieldProviderStack, allowing multiple field extensions to wrap a shared builder or renderer tree.
New provider support was added to:
Consumers can now pass:
This allows field add-ons to provide React context and host callbacks without changing the form response model.
Document-list toolbar controls
DocumentListGridnow supports optional host-controlled controls for:The controls include accessible labels and
aria-pressedstate for the detail toggle.Demo integration
The demo now:
The demo actions are intentionally placeholders. They show how a host supplies behavior but do not persist or upload documents.
Tests
Added focused tests covering:
Dependency and build configuration
Added package-level:
package.jsonUpdated the workspace lockfile with the new package importer and DataVis/AG Grid dependency graph.
Compatibility
The changes are backward compatible:
fieldProvidersis optional.DocumentListGridcontinues to work without host callbacks.Known Limitations
fieldProvidersthrough a real builder or renderer instance.