feat(blocks): add image/gallery/video, product list, and cart blocks - #28
Merged
Conversation
Adds five new content blocks to the AST with parsers, renderers (React + Angular), styles, and demo coverage: - image: single image with optional aspect ratio and href-driven lightbox - gallery: horizontal snap-scroll or grid of images; per-item click-through - video: HTML5 video with poster, aspect, and native controls - products (+ single product): full vertical ecommerce card with rating, badge, and CTAs; horizontal scroll or grid via <section data-products> - cart: line items, summary rows (with emphasized total), and checkout CTAs Also: - native <dialog> lightbox for image/gallery preview with prev/next navigation, keyboard arrows, click-to-zoom, and click/ESC to close - hidden scrollbars + smooth CSS scroll-snap on horizontal strips - new demo presets: Field gallery, Shop the store, Deals under $50, Order history - system prompt spec updated to document each new block Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
Lists every block with its purpose and HTML shape so authors and LLMs can scan the emit contract in one place. Includes the newly-added image/gallery/video/product/products/cart blocks. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds five new content blocks to the Conversed AST, plus a native
<dialog>lightbox and CSS scroll-snap for horizontal strips. Ships in@conversed/core,@conversed/react, and@conversed/angular.New blocks
hrefopens a modal preview<video>with poster, aspect, and native controls<section data-products>for a horizontal scroll strip ordata-layout=\"grid\"Modal preview
<dialog>lightbox with prev/next navigation, ArrowLeft/ArrowRight keys, click-to-zoom, ESC and backdrop-to-closemin(70vw, 820px)at rest; expands to 92vw when zoomed to native sizePolish
scroll-snap-type: x mandatory+scroll-behavior: smoothCONVERSED_SYSTEM_PROMPT) updated with the new block shapes so LLMs can emit themWhy
The existing
mediablock was a single-image blob with no distinction for video, no gallery, and no ecommerce shape. Agents commonly emit product listings, cart summaries, image galleries, and short walkthrough clips — landing these before 0.0.1 keeps the AST complete on release.Reviewer notes
MediaBlock(the pre-existing{src,alt,caption}shape from<figure><img>) is untouched for backward compatibility — the newImageBlockopts in viadata-image,data-aspect, ordata-hrefon the<figure><article data-product>,<section data-cart>,<ul data-items>,<ul data-summary>) so payloads stay readableConversedGalleryComponentuses@ViewChild('dlg')for the shared modal because template refs can't cross@if/@forsibling boundariesTest plan
.zoomedstate