Repository navigation
fix(zoom): keep a zoomed SVG's own clip paths, so a stacked chart keeps its bars - #465
Conversation
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. |
Latest result Pull request merged. Final answersSession Pull request merged. PR #465 is ready. The current commit restores stacked bars in zoom and fixes all three resolved review findings: solid colors, whitespace in SVG references, and ID collisions. All current-head GitHub checks passed. Local lint passed; 31 of 32 zoom tests passed, with the remaining unchanged WebM test blocked by the sandbox’s child-process restriction. No repair push was needed. |
d816a49 to
755ebda
Compare
There was a problem hiding this comment.
Important
The change restores stacked bars, but the SVG rewrite can also turn a valid solid fill black. Please fix the attribute matching before merging.
Approach: Renaming IDs in the zoom copy is the right fix for references to hidden originals, provided the copy uses unclaimed IDs and rewrites only actual references.
Reviewed changes — I traced the shared clone path and verified the rendering in Chromium.
- Zoom copies: SVG IDs and fragment references are rewritten in the main view, asides, and thumbnails, while HTML IDs are still stripped.
- Chart regression test: The new test counts bar-colored pixels in zoomed stacked and grouped charts, so a legend swatch alone cannot pass. All 75 browser tests across charts, zoom, zoom-dialog, annotate, and carousel passed, and all 32 zoom package tests passed. Separate Chromium fixtures confirmed the inline findings.
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: |
There was a problem hiding this comment.
✅ No new issues found. No P0 or P1 findings remain.
Reviewed changes — Reviewed the SVG reference fixes since d816a49. The workspace build, 80 Chromium tests, and 32 zoom unit tests passed.
- Preserved SVG paint. Limited bare fragment rewrites to
hrefandxlink:href, and remapped quoted and whitespace-paddedurl(…)references without changing solid colors. - Avoided ID collisions. Skipped suffixes that would collide with existing document IDs and added browser coverage for the collision and reference cases.
gpt-6.2-sol(high) | 𝕏
…chart keeps its bars (#237) * fix(deps): pin comark-ui at onmax/comark-ui#465, so a zoomed stacked chart keeps its bars * fix: allow every script a properties box writes, now that its dates are relative

Zooming a stacked bar chart shows its legend, labels, value labels and notes, but no bars. Grouped and plain bar charts zoom fine.
A stacked chart rounds the ends of its bars with a
<clipPath>, referenced by id. The zoom'sstrip()drops every id from its copy, so the copy'sclip-path="url(#…)"points at the original chart's clip path. The original isvisibility: hiddenwhile it's zoomed, and SVG leaves hidden children out of a clip path, so the clip region is empty and every bar is clipped away.This PR keeps the ids inside an SVG in the copy, renamed with a
-cz<n>suffix, and rewrites theurl(#…)andhref="#…"references to them, so the copy clips with its own paths. Ids outside SVG are still dropped.The new e2e test zooms a stacked and a grouped chart and counts the bar color's pixels in the zoomed copy. On
mainthe stacked chart's copy has 225 of them (only its legend swatch); with this PR it passes. The charts, zoom, zoom-dialog, annotate and carousel e2e files pass (75 tests), and so do zoom's unit tests.Before/after: https://drop.vitehub.dev/d/v585jhj2d5hq/chart-zoom-bars
Found on Drop, where the zoomed stacked chart in a review doc had no bars.