(Lit) Add restaurant sample v0.9#1105
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
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.
9aec40e to
e8009fa
Compare
e8009fa to
2e0e061
Compare
| 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" /> |
There was a problem hiding this comment.
This is probably not needed, I went back and forth between symbols and icons, and settled on symbols
| }; | ||
|
|
||
| return { | ||
| // Do we need this for this sample? |
There was a problem hiding this comment.
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 `${}`.", |
There was a problem hiding this comment.
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
6f18b14 to
9874d72
Compare
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.