Skip to content

(Lit) Add restaurant sample v0.9#1105

Merged
ditman merged 19 commits intogoogle:mainfrom
ditman:lite-restaurant-sample-v09
Apr 14, 2026
Merged

(Lit) Add restaurant sample v0.9#1105
ditman merged 19 commits intogoogle:mainfrom
ditman:lite-restaurant-sample-v09

Conversation

@ditman
Copy link
Copy Markdown
Collaborator

@ditman ditman commented Apr 9, 2026

Description

This PR builds on top of #1079 and ports the "shell" app to use the v0.9 renderer.

Issues

Pre-launch Checklist

If you need help, consider asking for advice on the discussion board.

@ditman

This comment was marked as outdated.

Copy link
Copy Markdown
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 refactors the A2UI Lit renderer for version 0.9.0, introducing a centralized theming system and migrating components from inline styles to CSS variables. It includes a new v0.9 sample shell and updates to the web_core package to support shared design tokens. Review feedback suggests removing unnecessary placeholder characters in the Divider, adopting declarative style bindings in the Image component, cleaning up unused imports, adding missing type annotations, and consolidating flex-weight logic in the base class to avoid redundancy. Additionally, it was noted that static class names should be used instead of classMap for better performance in the Icon component.

Comment thread renderers/lit/src/v0_9/catalogs/basic/components/Divider.ts Outdated
Comment thread renderers/lit/src/v0_9/catalogs/basic/components/Image.ts Outdated
Comment thread renderers/lit/src/v0_9/catalogs/basic/components/Column.ts Outdated
Comment thread samples/client/lit/shell_v0_9/app.ts Outdated
Comment thread renderers/lit/src/v0_9/a2ui-lit-element.ts Outdated
Comment thread renderers/lit/src/v0_9/catalogs/basic/components/Icon.ts Outdated
@ditman ditman mentioned this pull request Apr 9, 2026
6 tasks
@ditman ditman requested review from ava-cassiopeia and dmandar April 9, 2026 17:58
@ditman ditman force-pushed the lite-restaurant-sample-v09 branch 5 times, most recently from 9aec40e to e8009fa Compare April 13, 2026 16:19
@ditman ditman force-pushed the lite-restaurant-sample-v09 branch from e8009fa to 2e0e061 Compare April 14, 2026 06:09
@ditman ditman marked this pull request as ready for review April 14, 2026 06:46
Comment thread samples/client/lit/shell/index.html Outdated
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&icon_names=account_circle,add,arrow_back,arrow_drop_down,arrow_forward,attach_file,calendar_today,call,camera,check,check_circle,close,communication,content_copy,dark_mode,delete,download,draw,edit,error,event,favorite,favorite_off,folder,help,home,info,light_mode,location_on,lock,lock_open,mail,menu,mobile_layout,more_horiz,more_vert,notifications,notifications_off,payment,pen_size_1,person,phone,photo,print,progress_activity,rectangle,refresh,search,send,settings,share,shopping_cart,star,star_half,star_off,upload,visibility,visibility_off,warning"
/>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
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.

This is probably not needed, I went back and forth between symbols and icons, and settled on symbols

Comment thread samples/client/lit/package.json Outdated
Comment thread samples/client/lit/package.json Outdated
};

return {
// Do we need this for this sample?
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think we do need middleware, to translate the python server response to a FE server response that the client receives.

"formatString": {
"type": "object",
"description": "Performs string interpolation of data model values and other functions in the catalog functions list and returns the resulting string. The value string can contain interpolated expressions in the `${expression}` format. Supported expression types include: JSON Pointer paths to the data model (e.g., `${/absolute/path}` or `${relative/path}`), and client-side function calls (e.g., `${now()}`). Function arguments must be named (e.g., `${formatDate(value:${/currentDate}, format:'MM-dd')}`). To include a literal `${` sequence, escape it as `\\${`.",
"description": "Performs string interpolation of data model values and other functions in the catalog functions list and returns the resulting string. The value string can contain interpolated expressions enclosed by `${}`.",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Undo this change? Or was it causing problems in the server? I think we have a string escaping problem we urgently need to fix.

If we really need to do this temporarily, I can tolerate it, but let's file an issue to undo the change

@ditman ditman force-pushed the lite-restaurant-sample-v09 branch from 6f18b14 to 9874d72 Compare April 14, 2026 07:00
Comment thread specification/v0_9/json/basic_catalog.json Outdated
@ditman ditman merged commit a5ad0c3 into google:main Apr 14, 2026
9 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in A2UI Apr 14, 2026
@ditman ditman deleted the lite-restaurant-sample-v09 branch April 14, 2026 07:19
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