Skip to content

fix(annotate): a slider compare stays in the text column and no longer zooms - #528

Merged
vite-hub[bot] merged 3 commits into
mainfrom
fix/slider-compare-column-no-zoom
Dec 4, 2026
Merged

vite-hub[bot] merged 3 commits into
mainfrom
fix/slider-compare-column-no-zoom

Conversation

@onmax

@onmax onmax commented Dec 4, 2026

Copy link
Copy Markdown
Owner

A ::compare{mode="slider"} of two 1440×900 screenshots rendered about 45rem tall, and a click opened comark-zoom, where the image came out smaller than on the page because zoom puts the notes beside it.

The slider root carried data-wide, so the host widened it up to 72rem, while a single ::screenshot stays in the column. It also set data-zoom on .ca-swipe.

Now the slider is the width of one screenshot and doesn't zoom:

  • slider() in html.ts drops data-wide, the data-zoom* attributes, the pair's tab stop and the zoom runtime. The root becomes role="group" with aria-label set to title, or the shot titles joined by " / " as before. The divider is still the one tab stop.
  • script.ts drops the click-to-zoom guard, the focus restore on zoom events and the slider branches of the zoomed-copy code. Drag and keys are untouched.
  • The columns compare and single screenshots are unchanged. Docs (compare, annotation, the accessibility guide) and the two skill references say the slider doesn't zoom, and title names the pair.

Evidence, same page and window, before and after: https://drop.vitehub.dev/d/0r29ww3hfgeq/comark-ui-slider-no-zoom. The slider goes from 1152 × 794 px to 736 × 549 px, and a click opens no dialog. The "host" there is comark-ui's typeset with the wide-room variables set, not Drop itself.

The slider test now checks no data-wide, no data-zoom and one tab stop. In e2e/annotate.e2e.ts a click asserts no dialog. I removed the slider from the Up/Down gallery test in e2e/zoom.e2e.ts, since it is no longer a gallery item. vp test packages/annotate packages/zoom packages/lint and the annotate and zoom e2e files pass; I didn't run the full pnpm ready.

Prepared with AI assistance.

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-12-04T09:45:18.087683Z
We couldn’t complete this review. Comment @codex review to try again.
0ff66cc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@vite-hub

vite-hub Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor
Session Status Started Duration
Pending Completed Not started —
View session Completed 2026-12-04T10:19:12.923Z 7m 26s

Latest result

Pull request merged.

Final answers

Session

Pull request merged.

Session

Merged 3c53d9b directly: required checks and review gates passed.

Session

Pushed `3c53d9b` to fix the CI failure: the test now expects headings to widen only above comparisons marked `data-wide`. The focused test passed, and lint reported no errors. The earlier heading and documentation findings remain fixed. Waiting for hosted checks on the new commit.

Session

Pushed `3c53d9b` to fix the CI failure: the test now expects headings to widen only above comparisons marked `data-wide`. The focused test passed, and lint reported no errors. The earlier heading and documentation findings remain fixed. Waiting for hosted checks on the new commit.

View session

Pushed `3c53d9b` to fix the CI failure: the test now expects headings to widen only above comparisons marked `data-wide`. The focused test passed, and lint reported no errors. The earlier heading and documentation findings remain fixed. Waiting for hosted checks on the new commit.

Session

Pushed 262f86f and resolved the P1 review thread. Slider headings now stay in the text column, while headings above wide side-by-side comparisons still widen. Fixed the P2 width wording in the docs and both skill references. The focused selector check passed, and lint reported no errors. Chromium’s download failed locally, so the new layout regression test awaits hosted CI.

Session

Pushed 262f86f and resolved the P1 review thread. Slider headings now stay in the text column, while headings above wide side-by-side comparisons still widen. Fixed the P2 width wording in the docs and both skill references. The focused selector check passed, and lint reported no errors. Chromium’s download failed locally, so the new layout regression test awaits hosted CI.

Session

Pushed 262f86f and resolved the P1 review thread. Slider headings now stay in the text column, while headings above wide side-by-side comparisons still widen. Fixed the P2 width wording in the docs and both skill references. The focused selector check passed, and lint reported no errors. Chromium’s download failed locally, so the new layout regression test awaits hosted CI.

Session

Pushed 262f86f and resolved the P1 review thread. Slider headings now stay in the text column, while headings above wide side-by-side comparisons still widen. Fixed the P2 width wording in the docs and both skill references. The focused selector check passed, and lint reported no errors. Chromium’s download failed locally, so the new layout regression test awaits hosted CI.

Session

Pushed 262f86f and resolved the P1 review thread. Slider headings now stay in the text column, while headings above wide side-by-side comparisons still widen. Fixed the P2 width wording in the docs and both skill references. The focused selector check passed, and lint reported no errors. Chromium’s download failed locally, so the new layout regression test awaits hosted CI.

@pkg-pr-new

pkg-pr-new Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

comark-annotate

pnpm add https://pkg.pr.new/comark-annotate@528

comark-badge

pnpm add https://pkg.pr.new/comark-badge@528

comark-bundle

pnpm add https://pkg.pr.new/comark-bundle@528

comark-cards

pnpm add https://pkg.pr.new/comark-cards@528

comark-carousel

pnpm add https://pkg.pr.new/comark-carousel@528

comark-cast

pnpm add https://pkg.pr.new/comark-cast@528

comark-charts

pnpm add https://pkg.pr.new/comark-charts@528

comark-chat

pnpm add https://pkg.pr.new/comark-chat@528

comark-chips

pnpm add https://pkg.pr.new/comark-chips@528

comark-cjk

pnpm add https://pkg.pr.new/comark-cjk@528

comark-code

pnpm add https://pkg.pr.new/comark-code@528

comark-code-notes

pnpm add https://pkg.pr.new/comark-code-notes@528

comark-colors

pnpm add https://pkg.pr.new/comark-colors@528

comark-comments

pnpm add https://pkg.pr.new/comark-comments@528

comark-critic

pnpm add https://pkg.pr.new/comark-critic@528

comark-deflist

pnpm add https://pkg.pr.new/comark-deflist@528

comark-details

pnpm add https://pkg.pr.new/comark-details@528

comark-diagrams

pnpm add https://pkg.pr.new/comark-diagrams@528

comark-diff

pnpm add https://pkg.pr.new/comark-diff@528

comark-embed

pnpm add https://pkg.pr.new/comark-embed@528

comark-fields

pnpm add https://pkg.pr.new/comark-fields@528

comark-figure

pnpm add https://pkg.pr.new/comark-figure@528

comark-file-tree

pnpm add https://pkg.pr.new/comark-file-tree@528

comark-footnotes

pnpm add https://pkg.pr.new/comark-footnotes@528

comark-git-graph

pnpm add https://pkg.pr.new/comark-git-graph@528

comark-github

pnpm add https://pkg.pr.new/comark-github@528

comark-icon

pnpm add https://pkg.pr.new/comark-icon@528

comark-include

pnpm add https://pkg.pr.new/comark-include@528

comark-keys

pnpm add https://pkg.pr.new/comark-keys@528

comark-links

pnpm add https://pkg.pr.new/comark-links@528

comark-linter

pnpm add https://pkg.pr.new/comark-linter@528

comark-magic-move

pnpm add https://pkg.pr.new/comark-magic-move@528

comark-mark

pnpm add https://pkg.pr.new/comark-mark@528

markdown-it-to-comark

pnpm add https://pkg.pr.new/markdown-it-to-comark@528

marked-to-comark

pnpm add https://pkg.pr.new/marked-to-comark@528

comark-mathml

pnpm add https://pkg.pr.new/comark-mathml@528

comark-media

pnpm add https://pkg.pr.new/comark-media@528

comark-metrics

pnpm add https://pkg.pr.new/comark-metrics@528

migrate-to-comark

pnpm add https://pkg.pr.new/migrate-to-comark@528

comark-motion

pnpm add https://pkg.pr.new/comark-motion@528

comark-outline

pnpm add https://pkg.pr.new/comark-outline@528

comark-properties

pnpm add https://pkg.pr.new/comark-properties@528

comark-qr

pnpm add https://pkg.pr.new/comark-qr@528

comark-quiz

pnpm add https://pkg.pr.new/comark-quiz@528

comark-reading-time

pnpm add https://pkg.pr.new/comark-reading-time@528

remark-to-comark

pnpm add https://pkg.pr.new/remark-to-comark@528

comark-social

pnpm add https://pkg.pr.new/comark-social@528

comark-sources

pnpm add https://pkg.pr.new/comark-sources@528

comark-steps

pnpm add https://pkg.pr.new/comark-steps@528

comark-table

pnpm add https://pkg.pr.new/comark-table@528

comark-tabs

pnpm add https://pkg.pr.new/comark-tabs@528

comark-tests

pnpm add https://pkg.pr.new/comark-tests@528

comark-time

pnpm add https://pkg.pr.new/comark-time@528

comark-ui

pnpm add https://pkg.pr.new/comark-ui@528

comark-xref

pnpm add https://pkg.pr.new/comark-xref@528

comark-zoom

pnpm add https://pkg.pr.new/comark-zoom@528

commit: 3c53d9b

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

The slider stays in the text column, but its heading can still widen and start outside it.

Approach: Removing the slider’s wide and zoom markers is the right fix; the typeset rule for the preceding heading needs to follow the same distinction.

Reviewed changes

  • Renderer: The slider becomes a named group without a zoom trigger; columns comparisons keep their gallery.
  • Interaction: Drag and keyboard handling stay in place; slider-only zoom and copy paths are removed.
  • Coverage and docs: The tests check the slider’s markup and no-zoom behavior, and the compare docs and skills describe the new behavior. All 82 annotate renderer tests and 37 zoom tests passed locally.

Non-blocking

  • P2 · Class: width documentation overstates parity. The compare docs and both skill references say a slider is as wide as a single screenshot. In a 736px column, a pair with a 265x150 viewport renders 736px wide, while a standalone capture stays at 265px. Say the slider fills the text column unless it should also honor the standalone screenshot’s capture-width cap.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using pullfrog(medium) | 𝕏

Comment thread packages/annotate/src/html.ts Resolved

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • Restricted heading widening to comparisons marked data-wide, so slider headings stay in the text column and side-by-side comparison headings still align with their figures.
  • Added a layout regression test for slider and heading alignment when the host gives wide blocks extra room.
  • Clarified slider width in the compare docs and both skill references: the slider fills the text column and does not zoom.

No P0 or P1 findings remain. All five wide-layout Chromium tests passed; the annotate and zoom package suites had 131 passes and one skip.

Pullfrog  | View workflow run | Using pullfrog(medium) | 𝕏

@vite-hub
vite-hub Bot merged commit e8c8dc6 into main Dec 4, 2026
7 checks passed
@vite-hub
vite-hub Bot deleted the fix/slider-compare-column-no-zoom branch December 4, 2026 10:34
@github-actions github-actions Bot mentioned this pull request Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant