Skip to content

fix(zoom): a zoomed block keeps its size, so closing doesn't jump - #11

Merged
vite-hub[bot] merged 5 commits into
mainfrom
fix/zoom-copy-text-styles
Oct 20, 2026
Merged

vite-hub[bot] merged 5 commits into
mainfrom
fix/zoom-copy-text-styles

Conversation

@onmax

@onmax onmax commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

On https://comark.onmax.me/zoom/, closing a zoomed block jumped on the last frame.

The zoomed copy sits in the dialog, so it took the dialog's text styles (13px/1.4, system font) instead of the page's (15px/1.7 Geist). The "Retry policy" table zoomed at 159px tall; its original is 176px, and it took the copy's place on the last frame.

  • The copy now inherits the page's font, size, weight, letter spacing, and alignment. Line height goes over as a ratio, since browsers report it in pixels and text of another size inside the item has to scale it. Color stays the dialog's, so it matches the backdrop.
  • Annotate screenshots zoom inside a copy of their .ca wrapper (data-zoom-context=".ca"), so styles set on it reach the zoomed view. On the docs, labels kept their Caveat font and size instead of shrinking to 11px Geist.

Every zoomable item on the zoom and annotate pages now has the same size zoomed as on the page. A new e2e test fails on the old code (176 vs 159) and passes now. pnpm ready and the e2e tests pass.

After review, the PR also fixes jumps that weren't about text styles:

  • Clicking during a smooth scroll. Closing restored the scroll position saved when the zoom opened, while the page kept scrolling under the zoom. A click 60ms into a smooth scroll on the docs page left the page at 1493px open and 127px closed. Scroll restoration is now off while the zoom holds a history entry; the setting belongs to each entry, so it goes on the page's entry before the zoom's is pushed. Opening also stops a scroll still under way.
  • Closing during the opening animation. shut() measured the frame mid-flight and landed 58px left and 183px above the item. It now measures the settled frame and starts from where the frame is.
  • Margins inside the copy. The animations aim at the copy's center, not the frame's, because margins can sit in the frame but outside the item on the page.
  • Line heights and color. A page with a length line-height (16px/24px) keeps it as a length. The copy keeps the dialog's color inside a data-zoom-context shell.

A new e2e test compares the copy's box with the original's on the last frame of the close, for the docs table and for a block with a length line-height and paragraph margins.

🤖 Generated with Claude Code

The zoomed copy sits in the dialog, so it took the dialog's font and line height and reflowed to another height;
the original then took its place on the last frame. The copy now inherits the page's text styles. Annotate
screenshots zoom inside a copy of their .ca wrapper, so styles set on it reach the zoomed view.
@pullfrog

pullfrog Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

This repo's model isn't fully set up yet.

OpenAI-compatible model selected but required configuration is missing: OPENAI_COMPATIBLE_API_KEY.

only the API key is sensitive — add it as a secret at https://github.com/onmax/comark-plugins/settings/secrets/actions. everything else is plain workflow env::

OPENAI_COMPATIBLE_BASE_URL: https://your-endpoint.example.com/v1
OPENAI_COMPATIBLE_API_KEY: ${{ secrets.OPENAI_COMPATIBLE_API_KEY }}
OPENAI_COMPATIBLE_MODEL:
OPENAI_COMPATIBLE_CONTEXT: "128000"
OPENAI_COMPATIBLE_MAX_OUTPUT: "16384"

set the last two to the real limits of the model your endpoint serves. Pullfrog can't
discover them — your endpoint owns the model catalog — and without them completions are
capped at 32000 tokens (rejected outright by models with a smaller cap) and
auto-compaction is disabled, so long runs grow until your endpoint refuses them.

for full setup instructions, see https://docs.pullfrog.com/openai-compatible

Configure model →

Pullfrog  | Rerun failed job ➔ | View workflow run | via Pullfrog | Using gpt-5.6-sol | 𝕏

@pullfrog

pullfrog Bot commented Oct 20, 2026

Copy link
Copy Markdown

This repo's model isn't fully set up yet.

OpenAI-compatible model selected but required configuration is missing: OPENAI_COMPATIBLE_API_KEY.

only the API key is sensitive — add it as a secret at https://github.com/onmax/comark-plugins/settings/secrets/actions. everything else is plain workflow env::

OPENAI_COMPATIBLE_BASE_URL: https://your-endpoint.example.com/v1
OPENAI_COMPATIBLE_API_KEY: ${{ secrets.OPENAI_COMPATIBLE_API_KEY }}
OPENAI_COMPATIBLE_MODEL:
OPENAI_COMPATIBLE_CONTEXT: "128000"
OPENAI_COMPATIBLE_MAX_OUTPUT: "16384"

set the last two to the real limits of the model your endpoint serves. Pullfrog can't
discover them — your endpoint owns the model catalog — and without them completions are
capped at 32000 tokens (rejected outright by models with a smaller cap) and
auto-compaction is disabled, so long runs grow until your endpoint refuses them.

for full setup instructions, see https://docs.pullfrog.com/openai-compatible

Configure model →

Pullfrog  | Rerun failed job ➔ | View workflow run | via Pullfrog | Using gpt-5.6-sol | 𝕏

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 20, 2026 •

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 ↗ d2d67a0 2026-10-20T08:56:41.682Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ c69e187 2026-10-20T08:42:02.928Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ e3def49 2026-10-20T08:27:18.846Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ b023a03 2026-10-20T08:04:01.080Z Visit the dashboard ↗

- Going back restored the scroll position saved when the zoom opened. A click during a smooth scroll left the page
  moving under the zoom, so closing jumped it back by the distance it had scrolled. Scroll restoration is off
  while the zoom holds a history entry, and opening stops a scroll under way.
- A close during the opening animation measured the frame mid-flight and landed off the item. It now measures
  the settled frame and starts from where the frame is.
- The animations aim at the copy's center, not the frame's, since margins inside the copy can sit in the frame
  but outside the item on the page.
- A length line-height is passed on as a length, and a ratio as a ratio.
- The zoomed copy keeps the dialog's color inside a data-zoom-context shell.
@pullfrog

pullfrog Bot commented Oct 20, 2026

Copy link
Copy Markdown

This repo's model isn't fully set up yet.

OpenAI-compatible model selected but required configuration is missing: OPENAI_COMPATIBLE_API_KEY.

only the API key is sensitive — add it as a secret at https://github.com/onmax/comark-plugins/settings/secrets/actions. everything else is plain workflow env::

OPENAI_COMPATIBLE_BASE_URL: https://your-endpoint.example.com/v1
OPENAI_COMPATIBLE_API_KEY: ${{ secrets.OPENAI_COMPATIBLE_API_KEY }}
OPENAI_COMPATIBLE_MODEL:
OPENAI_COMPATIBLE_CONTEXT: "128000"
OPENAI_COMPATIBLE_MAX_OUTPUT: "16384"

set the last two to the real limits of the model your endpoint serves. Pullfrog can't
discover them — your endpoint owns the model catalog — and without them completions are
capped at 32000 tokens (rejected outright by models with a smaller cap) and
auto-compaction is disabled, so long runs grow until your endpoint refuses them.

for full setup instructions, see https://docs.pullfrog.com/openai-compatible

Configure model →

Pullfrog  | Rerun failed job ➔ | View workflow run | via Pullfrog | Using gpt-5.6-sol | 𝕏

…restoration

- Important inline styles keep host rules such as `span { line-height: 1.2 }` from fooling the probe or putting it
  in the page's layout.
- Scroll restoration goes back to its setting however the zoom closes, including stop() while it's open and a
  host that replaced the zoom's history state.
@pullfrog

pullfrog Bot commented Oct 20, 2026

Copy link
Copy Markdown

This repo's model isn't fully set up yet.

OpenAI-compatible model selected but required configuration is missing: OPENAI_COMPATIBLE_API_KEY.

only the API key is sensitive — add it as a secret at https://github.com/onmax/comark-plugins/settings/secrets/actions. everything else is plain workflow env::

OPENAI_COMPATIBLE_BASE_URL: https://your-endpoint.example.com/v1
OPENAI_COMPATIBLE_API_KEY: ${{ secrets.OPENAI_COMPATIBLE_API_KEY }}
OPENAI_COMPATIBLE_MODEL:
OPENAI_COMPATIBLE_CONTEXT: "128000"
OPENAI_COMPATIBLE_MAX_OUTPUT: "16384"

set the last two to the real limits of the model your endpoint serves. Pullfrog can't
discover them — your endpoint owns the model catalog — and without them completions are
capped at 32000 tokens (rejected outright by models with a smaller cap) and
auto-compaction is disabled, so long runs grow until your endpoint refuses them.

for full setup instructions, see https://docs.pullfrog.com/openai-compatible

Configure model →

Pullfrog  | Rerun failed job ➔ | View workflow run | via Pullfrog | Using gpt-5.6-sol | 𝕏

@vite-hub

vite-hub Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor
Session Status Started Duration
Pending Completed Not started —
View session Completed 2026-10-20T08:48:17.807Z 7m 47s

Latest result

Pull request merged.

Final answers

Session

Pull request merged.

Session

Fixed preview-package builds by explicitly building workspace dependencies before carousel and annotate prepack. The publish failure was a real P1 ordering defect; zoom builds successfully locally, while local packing is blocked by the sandbox’s Corepack filesystem restriction. Pullfrog configuration comments are external setup issues and require no code change.

Session

Fixed preview-package builds by explicitly building workspace dependencies before carousel and annotate prepack. The publish failure was a real P1 ordering defect; zoom builds successfully locally, while local packing is blocked by the sandbox’s Corepack filesystem restriction. Pullfrog configuration comments are external setup issues and require no code change.

Session

Fixed preview-package builds by explicitly building workspace dependencies before carousel and annotate prepack. The publish failure was a real P1 ordering defect; zoom builds successfully locally, while local packing is blocked by the sandbox’s Corepack filesystem restriction. Pullfrog configuration comments are external setup issues and require no code change.

Session

Fixed preview-package builds by explicitly building workspace dependencies before carousel and annotate prepack. The publish failure was a real P1 ordering defect; zoom builds successfully locally, while local packing is blocked by the sandbox’s Corepack filesystem restriction. Pullfrog configuration comments are external setup issues and require no code change.

Session

Fixed preview-package builds by explicitly building workspace dependencies before carousel and annotate prepack. The publish failure was a real P1 ordering defect; zoom builds successfully locally, while local packing is blocked by the sandbox’s Corepack filesystem restriction. Pullfrog configuration comments are external setup issues and require no code change.

Session

Fixed preview-package builds by explicitly building workspace dependencies before carousel and annotate prepack. The publish failure was a real P1 ordering defect; zoom builds successfully locally, while local packing is blocked by the sandbox’s Corepack filesystem restriction. Pullfrog configuration comments are external setup issues and require no code change.

Session

Fixed preview-package builds by explicitly building workspace dependencies before carousel and annotate prepack. The publish failure was a real P1 ordering defect; zoom builds successfully locally, while local packing is blocked by the sandbox’s Corepack filesystem restriction. Pullfrog configuration comments are external setup issues and require no code change.

Session

Fixed preview-package builds by explicitly building workspace dependencies before carousel and annotate prepack. The publish failure was a real P1 ordering defect; zoom builds successfully locally, while local packing is blocked by the sandbox’s Corepack filesystem restriction. Pullfrog configuration comments are external setup issues and require no code change.

View session

Fixed preview-package builds by explicitly building workspace dependencies before carousel and annotate prepack. The publish failure was a real P1 ordering defect; zoom builds successfully locally, while local packing is blocked by the sandbox’s Corepack filesystem restriction. Pullfrog configuration comments are external setup issues and require no code change.

@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@11
pnpm add https://pkg.pr.new/comark-carousel@11
pnpm add https://pkg.pr.new/comark-zoom@11

commit: d2d67a0

onmax added a commit that referenced this pull request Oct 20, 2026
…abindex, and port #11's probe and scroll fixes

- A MutationObserver, disconnected by stop(), takes the tab stop off items nested in another one as they appear, so
  apps that render after mount and client-side navigation get one stop per item. Only tabindex="0" goes; any other
  value is the author's.
- A large image that finishes loading after the view closed or moved on changes nothing.
- Port c69e187: the line-height probe uses important inline styles, and scroll restoration goes back however the zoom
  closes, including stop() while it's open.

@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

The incremental delta adds dependency-aware prepack build ordering for the publishable workspace packages.

  • Built workspace dependencies before packing — Updated comark-carousel to build comark-zoom first, and comark-annotate to build comark-zoom, comark-carousel, and then itself. The commands invoke build directly, so they do not recurse through prepack.

pnpm --filter comark-annotate pack --dry-run completed successfully, including builds for all three packages, and publint reported no issues.

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

@vite-hub
vite-hub Bot merged commit cd7622f into main Oct 20, 2026
9 checks passed
This was referenced Oct 20, 2026
onmax added a commit that referenced this pull request Oct 20, 2026
…abindex, and port #11's probe and scroll fixes

- A MutationObserver, disconnected by stop(), takes the tab stop off items nested in another one as they appear, so
  apps that render after mount and client-side navigation get one stop per item. Only tabindex="0" goes; any other
  value is the author's.
- A large image that finishes loading after the view closed or moved on changes nothing.
- Port c69e187: the line-height probe uses important inline styles, and scroll restoration goes back however the zoom
  closes, including stop() while it's open.
onmax added a commit that referenced this pull request Oct 20, 2026
… data-zoom-src behind the page image (#16)

Also carries #11's last review fixes: stop() closes without going back in history, and a zoom opened while another closes keeps scroll restoration off.

BREAKING CHANGE: the `--cz-*` variables are gone; set the `--comark-*` tokens on `.cz-dialog` to theme only the zoomed view.
BREAKING CHANGE: the thumbnail strip is `role="group"`, `::zoom` passes only `id` and `class` through, `data-zoom=false` opts out, and images zoom no further than their natural size.
BREAKING CHANGE: the self-contained browser function moved to `src/script.ts`; `start()` from `comark-zoom/client` now adds the bundled styles by default.
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