Skip to content

fix(zoom): the HTML renderer's script shows the aside and maps copies too - #25

Merged
vite-hub[bot] merged 1 commit into
mainfrom
fix/zoom-aside-script
Oct 20, 2026
Merged

vite-hub[bot] merged 1 commit into
mainfrom
fix/zoom-aside-script

Conversation

@onmax

@onmax onmax commented Oct 20, 2026

Copy link
Copy Markdown
Owner

#14 was squashed from a branch older than #16. It added data-zoom-aside, copyOf, and originalOf to a second copy of the zoom script in client.ts, but the HTML renderer still inlines script.ts, which has none of them. #24 then added a doctor suppression for that copy.

What that broke on main:

This PR:

ZoomDetail and the event typings live in script.ts again. Their fields are the ones #14 documented.

#15's annotate changes (data-zoom on the stage, notes linking in the zoom) depend on this.

Checks

  • pnpm ready passes.
  • pnpm docs:build && pnpm test:e2e e2e/zoom.e2e.ts e2e/annotate.e2e.ts: 15 passed. That includes a new test on a page from the HTML renderer: the aside sits to the right of the item, content is the item's copy, and copyOf/originalOf map an aside element there and back.

🤖 Generated with Claude Code

… too

#14 was squashed from a branch older than #16, so it added data-zoom-aside, copyOf, and originalOf to a copy of the
zoom script in client.ts, while the HTML renderer kept inlining script.ts without them. Pages rendered to HTML got
no aside and no mapping, and start() lost #16's fixes: keyboard opening of nested items, hidden items left out of a
group, and data-zoom-src loading behind the page image.

script.ts has the aside and the mapping again, on top of #16, and client.ts is the wrapper around it it was before.
An e2e test checks both on a page from the HTML renderer.
@vite-hub

vite-hub Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor
Session Status Started Duration
Pending Completed Not started —

Latest result

Pull request merged.

Final answers

Session

Pull request merged.

Session

Pull request merged.

Session

Waiting for running checks before the next pass.

Session

Waiting for running checks before the next pass.

Session

Waiting for running checks before the next pass.

Session

Waiting for running checks before the next pass.

Session

Waiting for running checks before the next pass.

Session

Waiting for running checks before the next pass.

Session

Waiting for running checks before the next pass.

Session

Waiting for running checks before the next pass.

Session

Waiting for running checks before the next pass.

@pkg-pr-new

pkg-pr-new Bot commented Oct 20, 2026

Copy link
Copy Markdown

Open in StackBlitz

pnpm add https://pkg.pr.new/comark-annotate@25
pnpm add https://pkg.pr.new/comark-carousel@25
pnpm add https://pkg.pr.new/comark-zoom@25

commit: 7b1e785

@cloudflare-workers-and-pages

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 7b1e785 2026-10-20T12:35:41.359Z Visit the dashboard ↗

onmax added a commit to vite-hub/drop that referenced this pull request Oct 20, 2026
…re anchor through the zoom's own mapping

comark-annotate 0.2.0, with comark-zoom and comark-annotate patched to comark-plugins main plus
onmax/comark-ui#25 and #15 until a release has them: the zoom puts a screenshot's notes in a column beside it,
a mark and its note light up together, and the zoom's events map copies to the page and back (copyOf/originalOf).

The frame runtime uses that mapping instead of its own child-index walk. A comment on a note in the zoom draws in a
layer inside the notes column, which covered it on the zoom's layer, and anchors to the note on the page.

0.2.0 renamed a screenshot's `url` to `href` and `label` to `title`, and reports the old names. Published docs keep
them, so the renderer reads them as the new names; the pr-evidence skill teaches the new ones. Issues are in
meta.issues now. The render cache's integrity moves to 3, since the screenshot markup changed.

@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

  • Single zoom runtime — Consolidates the full interaction implementation in packages/zoom/src/script.ts, so the HTML renderer and start() share aside rendering, context shells, copy mapping, keyboard behavior, hidden-item filtering, and data-zoom-src handling.
  • Client and public types — Reduces packages/zoom/src/client.ts to the CSS-backed wrapper and re-exports ZoomDetail from the shared runtime.
  • HTML aside and mapping coverage — Adds an end-to-end check for the HTML-rendered aside, content, copyOf, and originalOf behavior, and removes the obsolete doctor suppression.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

@vite-hub
vite-hub Bot merged commit c16421d into main Oct 20, 2026
9 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 20, 2026
onmax added a commit that referenced this pull request Oct 20, 2026
…mark lights up its note there

The stage, not the figure, is the zoom item now, with `.ca` and `.ca-screenshot` as its contexts and the figcaption
as its aside (#14, #25), so the notes sit beside the zoomed image at a size that reads. In the zoom, hovering a mark
or a note lights the other, between the zoomed copy and the aside only: the thumbnails are copies too.

e2e checks that the aside is to the right of the frame, that a note lights its mark and no thumbnail, and that the
zoom's copyOf/originalOf map the image and the note to the page and back.
onmax added a commit that referenced this pull request Oct 20, 2026
…mark lights up its note there (#15)

The stage, not the figure, is the zoom item now, with `.ca` and `.ca-screenshot` as its contexts and the figcaption
as its aside (#14, #25), so the notes sit beside the zoomed image at a size that reads. In the zoom, hovering a mark
or a note lights the other, between the zoomed copy and the aside only: the thumbnails are copies too.

e2e checks that the aside is to the right of the frame, that a note lights its mark and no thumbnail, and that the
zoom's copyOf/originalOf map the image and the note to the page and back.
This was referenced Oct 22, 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