Repository navigation
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) | 𝕏
| // The dialog fills the window in place of the browser's centered box. Its styles keep it shown after a close, so the | ||
| // closing animation runs to its end whatever closed it. | ||
| ".cz-dialog{position:fixed;inset:0;z-index:2147483000;display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:auto;height:auto;max-width:none;max-height:none;margin:0;padding:0;overflow:visible;border:0;background:none;color:var(--_comark-foreground);font:13px/1.4 var(--_comark-font);outline:none}", | ||
| ".cz-dialog{position:fixed;inset:0;z-index:2147483000;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;width:auto;height:auto;max-width:none;max-height:none;margin:0;padding:0;overflow:visible;border:0;background:none;color:var(--_comark-foreground);font:13px/1.4 var(--_comark-font);outline:none}", |
There was a problem hiding this comment.
P1 · Class: centered overflow clips the start of a scrollable strip. On a 390px touch viewport, open item 4 of seven grouped ::zoom blocks: the first thumbnail is entirely offscreen even at the strip’s leftmost scroll position, so tapping it is impossible. Make the strip center only when its thumbnails fit; justify-content:safe center restored direct selection in Chromium.
Technical details
# Keep the first thumbnail reachable
## Affected sites
- `packages/zoom/src/styles.ts:17` — the explicit grid column now bounds the footer to the viewport.
- `packages/zoom/src/styles.ts:60` — `.cz-strip` still centers overflowing flex items. At `scrollLeft === 0`, the first thumbnail spans x=-165px to -69px at a 390px viewport.
## Required outcome
- A reader can scroll to and tap the first and last thumbnails in a group wider than the dialog, while short strips remain centered.| await expect(page.locator(".cz-dialog")).toBeVisible(); | ||
| for (const part of [".cz-stage", ".cz-header"]) | ||
| expect((await rect(page, part)).right).toBeLessThanOrEqual(390); | ||
| expect((await rect(page, ".cz-close")).right).toBeLessThanOrEqual(390); |
There was a problem hiding this comment.
P2 · Class: long captions shrink the close button’s hit area. At 390px the caption in this test shrinks .cz-close to about 25px wide instead of 36px; longer alt text can reduce it below 24px, even though the right-edge assertion still passes. Keep .cz-close from shrinking in the header flex row and check its width as well as its position.
Technical details
# Let the caption shrink, not the close button
## Affected sites
- `packages/zoom/src/styles.ts:21–30` — `.cz-close` has a width of `2.25rem`, but the header’s flex layout can shrink it when the caption overflows.
- `e2e/zoom.e2e.ts:713` — the check constrains only the button’s right edge.
## Required outcome
- A long caption truncates without reducing the close button’s hit area. Adding `flex-shrink:0` to `.cz-close` kept it 36px wide and within the 390px viewport in Chromium.
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.