feat(react): Add React implementations for v0.9 Basic Catalog components and tests#917
Open
jacobsimionato wants to merge 62 commits intogoogle:mainfrom
Open
feat(react): Add React implementations for v0.9 Basic Catalog components and tests#917jacobsimionato wants to merge 62 commits intogoogle:mainfrom
jacobsimionato wants to merge 62 commits intogoogle:mainfrom
Conversation
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.
Description of Changes
This PR introduces the React component implementations for the v0.9 Basic Catalog. It leverages the underlying
GenericBinderandA2uiSurface(introduced in the previous core logic PR) to provide fully reactive and deeply bound A2UI components for React applications.Key additions:
ReactTextField,ReactCheckBox,ReactSlider,ReactDateTimeInput,ReactChoicePickerReactButtonReactText,ReactImage,ReactIcon,ReactVideo,ReactAudioPlayerReactRow,ReactColumn,ReactList,ReactCard,ReactTabs,ReactDivider,ReactModalrenderA2uiComponentintests/utils.tsx) that bootstraps isolated components within a realSurfaceModelandDataModelto simulate actual production environments.tests/v0_9/basic_catalog.test.tsx) that verify two-way data binding, action dispatching, validation checking, and correct child delegation via a smartbuildChildmock.a2ui_explorer) has been updated to include the basic catalog JSON samples for manual testing and visual verification.Rationale
With the core renderer logic already merged, these component implementations represent the "last mile" of the A2UI React renderer. By strictly implementing the components according to the
basic_catalog.jsonschema and binding them via theGenericBinder, we ensure that any React application can dynamically render A2UI JSON payloads with full interactivity, validation, and layout fidelity out-of-the-box. The testing utility guarantees that these components correctly interface with the framework-agnostic data models.Testing/Running Instructions
cd renderers/react npm installnpm test