Skip to content
Merged
Show file tree
Hide file tree
Changes from 61 commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
8dc92bf
Add resources discussion
jacobsimionato Mar 5, 2026
c5a8eb3
Improve functions design
jacobsimionato Mar 5, 2026
5df86c2
Add comments about unsubscribing
jacobsimionato Mar 5, 2026
07077b2
Add catalog API proposal doc v1
jacobsimionato Mar 5, 2026
6ae4b24
Update catalog proposal
jacobsimionato Mar 6, 2026
0e75794
Improve catalog API proposal
jacobsimionato Mar 6, 2026
2f52cad
Update renderer guide
jacobsimionato Mar 6, 2026
d9f328f
Add improvements to the renderer guide
jacobsimionato Mar 6, 2026
a4b2b61
Delete catalog proposal
jacobsimionato Mar 6, 2026
f8c147c
remove dumb
jacobsimionato Mar 10, 2026
2a74434
Address feedback
jacobsimionato Mar 10, 2026
46a1504
Improve explanation of scope
jacobsimionato Mar 10, 2026
a17edea
Respond to a few more commments
jacobsimionato Mar 10, 2026
7d73d59
Add initial react renderer
jacobsimionato Mar 10, 2026
1daad96
Update react renderer to fix reactivity
jacobsimionato Mar 11, 2026
a1fa3ec
improve react renderer
jacobsimionato Mar 11, 2026
dc958a6
Improvemeents to react renderer
jacobsimionato Mar 11, 2026
1ceb3f1
More react improvements
jacobsimionato Mar 11, 2026
e773e0f
Add deep generic binder etc
jacobsimionato Mar 12, 2026
f07b00d
MOve react to react_prototype
jacobsimionato Mar 12, 2026
1eebf0d
clean up react renderer
jacobsimionato Mar 12, 2026
b95ab1d
Merge branch 'main' into react-1
jacobsimionato Mar 12, 2026
4168208
Add more samples
jacobsimionato Mar 12, 2026
110f87e
refactor(react): automatically infer component props from Zod schema
jacobsimionato Mar 12, 2026
11399ee
feat(react): implement basic catalog and integrate with gallery app
jacobsimionato Mar 12, 2026
6c113ff
fix(react): robust zod schema matching for generic binder
jacobsimionato Mar 12, 2026
88378d9
refactor(core): move generic binder from react prototype to web core
jacobsimionato Mar 12, 2026
587cdd6
set function invoker properly
jacobsimionato Mar 12, 2026
7a4b788
feat(react): improve generic binder ergonomics for two-way binding
jacobsimionato Mar 13, 2026
99e7095
feat(react): strictly typed setter generation in generic binder
jacobsimionato Mar 13, 2026
502520d
fix(react): remove optional chaining from strictly typed generated se…
jacobsimionato Mar 13, 2026
d2d6069
Improements to binder and add copyright headers
jacobsimionato Mar 13, 2026
64ff985
Improve return type of FunctionInvoker
jacobsimionato Mar 13, 2026
2fcf422
Merge branch 'main' into react-1
jacobsimionato Mar 18, 2026
22f81bb
Merge branch 'main' into react-1
jacobsimionato Mar 19, 2026
dc7f6a6
Add test for basic_catalog etc
jacobsimionato Mar 19, 2026
2774778
Move react renderer in to place
jacobsimionato Mar 19, 2026
7c6ea9b
Move sample app
jacobsimionato Mar 19, 2026
0105697
Revert web_core changes and fix React demo build
jacobsimionato Mar 19, 2026
6d7bd40
Fix lint errors
jacobsimionato Mar 19, 2026
de7c6ee
Fix demo app
jacobsimionato Mar 19, 2026
dbcba08
Merge branch 'main' into react-1
jacobsimionato Mar 19, 2026
7725ee9
Fix package locK
jacobsimionato Mar 19, 2026
059c489
Fix text field
jacobsimionato Mar 19, 2026
ae4372b
Fix text field
jacobsimionato Mar 19, 2026
eb4d3f4
Fix text field
jacobsimionato Mar 19, 2026
d213b55
Fix package.json etc
jacobsimionato Mar 19, 2026
cca2e02
revert text field changes
jacobsimionato Mar 19, 2026
a16520d
Fix CI
jacobsimionato Mar 19, 2026
35e3750
Fix text field
jacobsimionato Mar 20, 2026
4b675e1
Fix CI errors re textfield
jacobsimionato Mar 20, 2026
b360c09
Merge branch 'main' into react-1
jacobsimionato Mar 20, 2026
c771ea7
revert doc changes
jacobsimionato Mar 20, 2026
7e19997
Remove a2ui_explorer app
jacobsimionato Mar 20, 2026
77ac6b4
Move catalogs to better named locations
jacobsimionato Mar 20, 2026
4038c92
Revert "Remove a2ui_explorer app"
jacobsimionato Mar 20, 2026
628f271
REmove basic catalog support
jacobsimionato Mar 20, 2026
00c6755
remove shell app
jacobsimionato Mar 20, 2026
3bb5229
Readd the samples/client/react/shell app
jacobsimionato Mar 20, 2026
e2c0583
fully leverage binder in minimal catalog
jacobsimionato Mar 20, 2026
95bbf40
Fix any lint errors
jacobsimionato Mar 20, 2026
1998632
implement memoization
jacobsimionato Mar 20, 2026
37c6f3b
Fix rendering, undo memoization and add tests
jacobsimionato Mar 20, 2026
3e75b5a
Add memoization
jacobsimionato Mar 21, 2026
a926e26
Address feedback
jacobsimionato Mar 22, 2026
72df38a
Fix lint errors
jacobsimionato Mar 22, 2026
7e35c8c
Use gts lint plugin
jacobsimionato Mar 22, 2026
b3823fa
Merge branch 'main' into react-1
jacobsimionato Mar 22, 2026
5e917e0
Fix build errors
jacobsimionato Mar 22, 2026
be67f11
chore: fix lint warnings
jacobsimionato Mar 23, 2026
a457dee
Fix lint warning
jacobsimionato Mar 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/react_renderer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ jobs:
- name: Test React renderer
working-directory: ./renderers/react
run: npm test

- name: Build React Demo
working-directory: ./renderers/react
run: npm run build:demo

- name: Test React Demo
working-directory: ./renderers/react
run: npm run test:demo
lint:
runs-on: ubuntu-latest

Expand Down
62 changes: 62 additions & 0 deletions renderers/react/a2ui_explorer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# A2UI React Gallery App

This is the reference Gallery Application for the A2UI React renderer. It allows you to explore A2UI samples, inspect the live data model, and step through the message rendering process.

## Prerequisites

This application depends on the following local libraries in this repository:
1. `@a2ui/web_core` (located in `renderers/web_core`)
2. `@a2ui/react_prototype` (located in `renderers/react_prototype`)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The setup instructions in this README appear to contain outdated paths and package names from a previous prototype, which will prevent users from successfully building and running the explorer app.

  • The dependency should be @a2ui/react (in renderers/react), not @a2ui/react_prototype.
  • The cd command in "Building Dependencies" (line 17) should likely be cd ../.. to navigate from a2ui_explorer to the react package root, or cd renderers/react if run from the repository root.
  • The cd command in "Setup and Development" (line 32) points to samples/client/react, but this explorer app is at renderers/react/a2ui_explorer.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's fix this entire guide.


## Building Dependencies

Before running the gallery app, you must build the local renderer library:

```bash
# Navigate to the React renderer library
cd ../../../renderers/react_prototype

# Install and build the library
npm install
npm run build
```

*Note: Ensure `@a2ui/web_core` is also built if you have made changes to the core logic.*

## Setup and Development

Once the dependencies are built, you can start the gallery app:

```bash
# Navigate to this directory
cd samples/client/react

# Install dependencies
npm install

# Start the development server
npm run dev
```

## Building for Production

To create a production build of the gallery app:

```bash
npm run build
```

## Running Tests

To run the integration tests:

```bash
npm test
```

## Gallery Features

- **3-Column Layout**: Left (Sample selection), Center (Live preview & Message stepper), Right (Data model & Action logs).
- **Progressive Stepper**: Use the "Advance" buttons next to each JSON message to see how the UI builds up incrementally.
- **Action Logs**: View real-time logs of actions triggered by user interactions.
- **Data Model Inspector**: Observe how the surface's data model changes as you interact with form fields.
39 changes: 39 additions & 0 deletions renderers/react/a2ui_explorer/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* Copyright 2026 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'
import { defineConfig, globalIgnores } from 'eslint/config'

export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
js.configs.recommended,
tseslint.configs.recommended,
reactHooks.configs.flat.recommended,
reactRefresh.configs.vite,
],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
},
])
30 changes: 30 additions & 0 deletions renderers/react/a2ui_explorer/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!--
Copyright 2026 Google LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
<title>react</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
6 changes: 6 additions & 0 deletions renderers/react/a2ui_explorer/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions renderers/react/a2ui_explorer/public/vite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions renderers/react/a2ui_explorer/src/App.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/**
* Copyright 2026 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#root {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
text-align: center;
}

.logo {
height: 6em;
padding: 1.5em;
will-change: filter;
transition: filter 300ms;
}
.logo:hover {
filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.react:hover {
filter: drop-shadow(0 0 2em #61dafbaa);
}

@keyframes logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}

@media (prefers-reduced-motion: no-preference) {
a:nth-of-type(2) .logo {
animation: logo-spin infinite 20s linear;
}
}

.card {
padding: 2em;
}

.read-the-docs {
color: #888;
}
Loading
Loading