Skip to content

Add A2UI v0.8 Minimal Catalog and Local Gallery Sample#755

Merged
jacobsimionato merged 9 commits intogoogle:mainfrom
jacobsimionato:0_8_minimal
Mar 4, 2026
Merged

Add A2UI v0.8 Minimal Catalog and Local Gallery Sample#755
jacobsimionato merged 9 commits intogoogle:mainfrom
jacobsimionato:0_8_minimal

Conversation

@jacobsimionato
Copy link
Collaborator

@jacobsimionato jacobsimionato commented Mar 3, 2026

This PR introduces a minimal subset of the A2UI v0.8 Standard Catalog along with a set of static examples and a new 'Local Gallery' sample application.

Changes:

  1. v0.8 Minimal Catalog:

    • Created specification/v0_8/json/catalogs/minimal/minimal_catalog.json as a strict subset of the v0.8 standard catalog.
    • This subset focuses on core components: Text, Row, Column, Button, and TextField.
    • Purpose: Simplifies the entry point for new renderer implementations.
  2. Minimal Examples:

    • Added 5 static JSON examples in specification/v0_8/json/catalogs/minimal/examples/ demonstrating various layout and interaction scenarios.
    • These examples are used for both documentation and renderer validation.
  3. Local Gallery Sample:

    • Created a new standalone Lit-based sample in samples/client/lit/local_gallery/.
    • Agentless: Does not require a running server; it loads specification examples directly as static assets.
    • Dynamic Loading: Automatically discovers and renders all JSON files in the v0.8 minimal examples folder.
    • Interactive Testing: Includes a mock agent console for logging user actions and simulating server responses.
    • Markdown Support: Integrated @a2ui/markdown-it for full markdown rendering in text components.

Build Instructions:

To run the local gallery:

  1. Build renderers/web_core and renderers/lit.
  2. cd samples/client/lit/local_gallery
  3. npm install
  4. npm run dev
Screenshot 2026-03-03 at 2 16 39 PM

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a valuable new local gallery for the A2UI v0.8 minimal catalog, which will be very helpful for testing and demonstrating the core components. The setup is generally well-structured, and the provided examples effectively showcase basic layouts and interactions. The integration of Lit's context API for theme and markdown rendering is a good approach. However, there are a few areas that could be improved for better maintainability, code quality, and cross-platform compatibility.

"type": "module",
"scripts": {
"sync-specs": "mkdir -p public/specs/v0_8/minimal/examples && cp ../../../../specification/v0_8/json/catalogs/minimal/examples/*.json public/specs/v0_8/minimal/examples/ && node -e \"const fs=require('fs'); const files=fs.readdirSync('public/specs/v0_8/minimal/examples').filter(f=>f.endsWith('.json') && f!=='index.json'); fs.writeFileSync('public/specs/v0_8/minimal/examples/index.json', JSON.stringify(files))\"",
"sync-specs": "node -e \"const fs=require('fs'); const path=require('path'); const targetDir='public/specs/v0_8/minimal/examples'; const sourceDir='../../../../specification/v0_8/json/catalogs/minimal/examples'; fs.mkdirSync(targetDir, {recursive: true}); const files=fs.readdirSync(sourceDir).filter(f=>f.endsWith('.json')); files.forEach(f=>fs.copyFileSync(path.join(sourceDir, f), path.join(targetDir, f))); const indexFiles=fs.readdirSync(targetDir).filter(f=>f.endsWith('.json') && f!=='index.json'); fs.writeFileSync(path.join(targetDir, 'index.json'), JSON.stringify(indexFiles))\"",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of making this an inline script, is there any way of making this a separate file somewhere? This is sssscary :P

Copy link
Collaborator

@ditman ditman left a comment

Choose a reason for hiding this comment

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

Other than the inline setup script, hit it!

@jacobsimionato jacobsimionato merged commit 8586615 into google:main Mar 4, 2026
8 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in A2UI Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants