Repository navigation
fix(zoom): keep the close button on a phone's screen, and zoom images in an app's own carousel - #462
Conversation
The dialog's grid set no column, so its implicit column grew to the one-line caption's width. On a 390px phone a long alt text pushed the close button about 280px off screen.
…rousel draws it The plugin left the images inside any carousel, slide, screenshot or compare block alone, since comark-carousel and comark-annotate zoom those as a whole. An app with its own ::carousel component lost image zoom inside it. The plugin now skips those blocks only when state.options.plugins registers the plugin that draws them, in either order.
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
The new grid keeps Close on screen, but it also makes the first thumbnails in a wide gallery unreachable by touch.
Approach: Bounding the dialog grid fixes the caption overflow at its source, and checking for the owning plugin lets app-defined carousels opt into image zoom without changing built-in slide zoom.
Reviewed changes — I checked the dialog layout and plugin interactions, including both carousel plugin orders.
- Dialog: Bounds the default grid column to the viewport and adds a 390px regression test. The aside layouts keep their own columns.
- Image targets: Marks images in app-defined blocks when the corresponding Comark plugin is absent; built-in carousels still zoom the whole slide. The docs and skill reference describe the distinction.
- Verification: The three scoped packages built, and 98 unit tests and 59 Chromium tests passed. The full workspace build hit the shell limit (
[timed out after 120000ms]).
gpt-6.2-sol(high) | 𝕏
Latest result Pull request merged. Final answersSession Pull request merged. PR #462 is ready to merge without another push. The prior P1 thumbnail and P2 close-button findings are fixed and both threads are resolved. All current-head hosted checks passed. Locally, 25 focused zoom and carousel tests passed, and lint completed with warnings after bypassing pnpm’s sandboxed automatic install. Session Pull request evidence changed. |
There was a problem hiding this comment.
✅ No new issues found. No P0 or P1 findings remain.
Reviewed changes — Re-reviewed 5a0b167, the only commit since the prior review.
- Preserved the close button’s hit area. Long captions now truncate without shrinking the 36px button or pushing it off a 390px viewport.
- Kept both ends of wide galleries reachable. Short thumbnail strips stay centered; overflowing strips start-align, so the first and last thumbnails can both be selected at 390px.
The focused zoom, carousel, and annotate suites passed: 60 Chromium tests and 136 unit tests (one skipped).
gpt-6.2-sol(high) | 𝕏
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-outline
comark-properties
comark-qr
comark-quiz
comark-reading-time
remark-to-comark
comark-sources
comark-steps
comark-table
comark-tabs
comark-tests
comark-time
comark-ui
comark-xref
comark-zoom
commit: |

On a 390px phone, zooming an image with a long
alttext pushes the close button off screen. The zoomed view's grid sets rows but no column, so its column grows to the caption, which stays on one line. On a 390px screen the close button sat at 666px. This PR gives the dialoggrid-template-columns: minmax(0, 1fr), so the caption ends in an ellipsis. The[data-aside]layouts keep their own columns.Images inside an app's own
::carouseldon't zoom either. The parse plugin leaves alone the images inside anycarousel,slide,screenshotorcompareblock, because comark-carousel and comark-annotate zoom those as a whole. I hit this on a site whose owncarouselcomponent holds booking screenshots. This PR skips those blocks only whenstate.options.pluginsregisters the plugin that draws them. comark-carousel's slides still zoom as one, whichever of the two plugins comes first.::zoomblocks behave as before.Before and after at 390px: https://drop.vitehub.dev/d/2bgy0z92xhqw/comark-zoom-phone-caption
Validation:
e2e/zoom.e2e.tsfails onmain(close button's right edge at 666px against 390) and passes here.packages/zoom/test/zoom.test.tsfails onmain, where the image in the carousel has nodata-zoom, and passes here.packages/carousel/test/carousel.test.tspasses on both. It keeps the slide as the only zoom target whenzoom()comes beforecarousel(), which no test covered.pnpm readypasses, apart fromremark-to-comark's "no git repository" CLI test, which timed out at 5s on my loaded machine twice and doesn't touch zoom.