Share a2ui - #151
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a feature to share designs in the A2UI Composer by compressing and encoding the active JSON payload into a URL-safe Base64 string using deflate-raw. It adds a 'Share design' button to copy the shareable URL, updates startup resolution to parse and load the shared payload, and includes comprehensive tests. The review feedback suggests hardening the utility methods in QueryParser with guard clauses for nullish or undefined inputs, adding corresponding unit tests, avoiding potential call stack overflow issues when converting large buffers, and refactoring direct globalThis references in ComposerShell to use Angular's injected DOCUMENT token.
⚡ A2UI Composer PR PreviewYour automated preview is successfully live (commit
|
Description
Add a "share" button which generates a URL that can be shared. When opened, the A2UI JSON editor is populated with the same A2UI, and the preview renders it. The renderer used is also passed.
See https://screencast.googleplex.com/cast/NTI0Mzg5MjEyNjQ0OTY2NHw2YzA3ZjFiMy1jYQ. (Note that after clicking the "New Session", what you can't see is that I'm going to the URL bar and pasting the URL that the share button saved to the clipboard.)
Pre-launch Checklist