Add A2UI v0.8 Minimal Catalog and Local Gallery Sample#755
Add A2UI v0.8 Minimal Catalog and Local Gallery Sample#755jacobsimionato merged 9 commits intogoogle:mainfrom
Conversation
There was a problem hiding this comment.
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))\"", |
There was a problem hiding this comment.
Instead of making this an inline script, is there any way of making this a separate file somewhere? This is sssscary :P
ditman
left a comment
There was a problem hiding this comment.
Other than the inline setup script, hit it!
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:
v0.8 Minimal Catalog:
specification/v0_8/json/catalogs/minimal/minimal_catalog.jsonas a strict subset of the v0.8 standard catalog.Text,Row,Column,Button, andTextField.Minimal Examples:
specification/v0_8/json/catalogs/minimal/examples/demonstrating various layout and interaction scenarios.Local Gallery Sample:
samples/client/lit/local_gallery/.@a2ui/markdown-itfor full markdown rendering in text components.Build Instructions:
To run the local gallery:
renderers/web_coreandrenderers/lit.cd samples/client/lit/local_gallerynpm installnpm run dev