Repository navigation
feat(carousel): ::gallery, and line captions in comark-figure - #521
Conversation
Latest result Pull request merged. Final answersSession Pull request merged. Session GitHub has reported no check for e808cbf yet; waiting until 2026-12-03T11:33:52.760Z for its first check. Session GitHub has reported no check for e808cbf yet; waiting until 2026-12-03T11:33:52.760Z for its first check. Session GitHub has reported no check for e808cbf yet; waiting until 2026-12-03T11:33:52.760Z for its first check. Session GitHub has reported no check for e808cbf yet; waiting until 2026-12-03T11:33:52.760Z for its first check. Session GitHub has reported no check for e808cbf yet; waiting until 2026-12-03T11:33:52.760Z for its first check. Session GitHub has reported no check for e808cbf yet; waiting until 2026-12-03T11:33:52.760Z for its first check. Session GitHub has reported no check for e808cbf yet; waiting until 2026-12-03T11:33:52.760Z for its first check. Session GitHub has reported no check for e808cbf yet; waiting until 2026-12-03T11:33:52.760Z for its first check. Session GitHub has reported no check for e808cbf yet; waiting until 2026-12-03T11:33:52.760Z for its first check. |
Codex Review Summary: â FailedThis comment shows the latest Codex review activity on this pull request.
âđïļ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with ð while any review is running, comments if it has suggestions, and reacts with ð once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Important
Captions can lose spaces or entire text fragments, and line-captioned figures do not resolve :ref as documented.
Approach: Sharing the caption parser and reusing the existing zoom gallery are the right boundaries, but the parser needs to preserve inline content and cooperate with cross-references.
Reviewed changes â I reviewed the parser and renderer changes, preset and lint integration, and the accompanying docs and tests. The 40 focused unit tests passed after building carousel and zoom; I reproduced the findings through the public parse and render APIs.
- Gallery: Normalizes images into captioned grid cells and uses the existing zoom runtime across all four renderers.
- Line captions: Adds opt-in captioning to
comark-figurethrough the same parser used by galleries. - Integration: Registers the new block in the preset, adds Doctor rules, and documents the syntax and supported behavior.
Non-blocking
- P2 â Class: nonnumeric column values are coerced. A bound
:columns='[4]'silently sets four columns, while:columns='{"toString":null,"valueOf":null}'throws instead of reportinggallery-invalid-columnsand falling back to three. Validate the type before conversion and reuse the result for both rendering and diagnostics (column parser, diagnostic check). - P2 â Class: nested images bypass the caption guard. With
lineCaptions: true, a line likeA *[](/goose)*.still becomes a caption for the image above it. The docs say an image in a caption leaves the paragraph alone; check descendants as well as direct children (caption guard).
pullfrog(medium) ï― ð
comark-annotate
comark-badge
comark-bundle
comark-cards
comark-carousel
comark-cast
comark-charts
comark-chat
comark-chips
comark-cjk
comark-code
comark-code-notes
comark-colors
comark-comments
comark-critic
comark-deflist
comark-details
comark-diagrams
comark-diff
comark-embed
comark-fields
comark-figure
comark-file-tree
comark-footnotes
comark-git-graph
comark-github
comark-icon
comark-include
comark-keys
comark-links
comark-linter
comark-magic-move
comark-mark
markdown-it-to-comark
marked-to-comark
comark-mathml
comark-media
comark-metrics
migrate-to-comark
comark-motion
comark-outline
comark-properties
comark-qr
comark-quiz
comark-reading-time
remark-to-comark
comark-social
comark-sources
comark-steps
comark-table
comark-tabs
comark-tests
comark-time
comark-ui
comark-xref
comark-zoom
commit: |
âĶes the zoomed view instead The whole cell was the zoom item, so the caption grew with the photo. The image is the item now, with the caption's text as its title. A zoomed image keeps the size of its corners however far it grows. The doctor pages' example pictures use full addresses, so the docs link check finds no missing file.
|
a6d7f16 changes what zooms: the image, not the whole cell. The caption grew with the photo before; now it is the zoomed view's title. That also removes the known limit in the description about tiny captions in the strip. |
There was a problem hiding this comment.
Important
The new zoom view clips longer gallery captions on phones and overrides host styling on ordinary zoomed images.
Reviewed changes â I reviewed a6d7f16 and verified both regressions in Chromium. The 39 focused gallery, carousel framework, and zoom unit tests and all five gallery browser tests passed.
- Gallery zoom: Moved the zoom trigger and focus target to the image and used the caption text as the dialog title.
- Zoom styling: Applied inverse corner scaling to all direct image copies, not just thumbnails.
- Doctor examples: Replaced relative image paths with absolute example URLs. The root Doctor suite did not run in the focused check:
Failed to load tsconfig 'docs/.nuxt/tsconfig.app.json': Tsconfig not found.
pullfrog(medium) ï― ð
There was a problem hiding this comment.
Important
A gallery can render empty when comark-figure unwraps its images before comark-carousel runs.
Reviewed changes â I reviewed 5fe85b79 since the previous review. All 103 focused unit tests and seven Chromium gallery tests passed; I reproduced the plugin-order regression separately through the public parse and render APIs.
- Preserved rich captions. Kept gallery paragraphs intact through parsing, retained spaces between inline elements, and rejected nested images in figure captions.
- Fixed figure references and column validation. Numbered captioned figures in the documented plugin order and rejected nonnumeric column values before conversion.
- Updated the zoom dialog. Made long captions wrap and scroll, and moved default radius scaling into CSS so host overrides still work.
pullfrog(medium) ï― ð
There was a problem hiding this comment.
â No new issues found.
Reviewed changes â I reviewed bd07de17 since the previous review. All 104 focused unit tests and the targeted typecheck passed. No blocking findings remain.
- Preserved unwrapped gallery images. Galleries now keep standalone images and image-only links when
comark-figureunwraps them first. The regression test checks rendered output and the absence of diagnostics in both plugin orders. - Aligned figure test types. The renderer helper now uses
ParserOptions["plugins"]for mixed plugin lists.
pullfrog(medium) ï― ð

Two ways to caption images with the line under them, and a grid for several of them.
::gallery(incomark-carousel)It lives in
comark-carouselbecause that package already owns "several things in one place" and the zoom-gallery wiring (data-zoom-gallery, the shared runtime, print and reduced-motion rules). A gallery is a zoom group, so a click on a photo opens the zoomed view with next/previous.<figure class="cc-cell">, whether images are separate paragraphs or consecutive lines of one.comark-figure'slineCaptionsfollows the same rule.data-zoom-title), so a caption never scales up with the photo. A zoomed image keeps its corner radius at any scale (one line incomark-zoom).columnsis 2 to 6, default 3. The grid drops columns in a narrow container, whatever the window. Cells share one aspect ratio (--cc-ratio, default 4/3) and crop withobject-fit: cover.meta.issues/meta.issueRules, never a throw:gallery-content(COMARK0307),gallery-missing-alt(0308),gallery-empty(0309),gallery-invalid-columns(0310), plusunknown-prop. Doctor pages added.comark-ui's registry and typeset, linter props, docs, READMEs andskills/comark-uiupdated.figure({ lineCaptions: true })(incomark-figure, off by default)becomes
<figure><img><figcaption>âĶ</figcaption></figure>. A paragraph must be exactly one image (or linked image) followed by inline lines; anything else is left as a paragraph. Title captions, figure numbering and:refkeep working. Also applies inside lists, quotes and components.Tests
Parse/render tests for both, framework tests, lint and doctor, and
e2e/gallery.e2e.ts(columns, narrow container, zoom paging with the keyboard, caption in the zoomed view's title and not in its stage, no-script, print).pnpm readypassed before the last one-line radius change inpackages/zoom/src/script.ts. After it I ran the zoom and carousel unit tests, the gallery e2e, and the zoom e2e.Screenshots: https://drop.vitehub.dev/d/v7gf018vaahe/comark-ui-pr-521-gallery
ðĪ Generated with Claude Code