Skip to content

fix(charts): keep a chart at its drawn width in a wide column, and drop the rule over it - #464

Merged
vite-hub[bot] merged 3 commits into
mainfrom
fix/charts-drawn-width-no-hairline
Nov 18, 2026
Merged

vite-hub[bot] merged 3 commits into
mainfrom
fix/charts-drawn-width-no-hairline

Conversation

@onmax

@onmax onmax commented Nov 18, 2026

Copy link
Copy Markdown
Owner

In a column wider than 744px, every chart over axes stretches to fill it, text and all. In Drop's widest column (80rem, 1280px) a chart's labels render about 1.7× their size, much larger than the page's text. .cch-plot>svg{width:100%} did that.

This drops that rule. A chart now shows at the width it was drawn at, and a narrower column still shrinks it to fit (max-width:100%). Every chart over axes is drawn at 744px, so charts on one page still match each other.

It also drops the 1px rule over each chart. Charts sit after paragraphs in articles, and there the rule reads as a stray <hr>.

A new e2e test puts the same chart in a 1280px and a 480px column and expects 744px and 480px. The hairline test now checks there's no border, light and dark. The charts unit tests and the charts e2e file pass in Chromium. I didn't run the full suite or the docs build.

@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-11-18T12:21:04.886522Z
We couldn’t complete this review. Comment @codex review to try again.
6d7c90d 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.

@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

Removing the chart’s top padding makes the Copy controls cover part of a wrapped caption in a narrow column.

Approach: Removing the full-width override is the right fix for chart text scaling up; removing the top padding also changes how the chart content lines up with the Copy controls.

Reviewed changes — Reviewed all five files and traced the shared styles through the renderers.

  • Chart sizing: The SVG keeps its drawn width in wide columns and shrinks proportionally in narrow ones.
  • Chart frame: The figure loses its top border and padding, while charts immediately after a heading retain their reduced top margin.
  • Docs and tests: The docs describe the new layout, and browser tests cover wide and narrow sizing and the absence of a border in light and dark mode.

The workspace build, all 76 chart unit and framework tests, and all seven Chromium chart tests passed. A separate Chromium check reproduced the caption overlap.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.2-sol(high) | 𝕏

Comment thread packages/charts/src/styles.ts Resolved
Comment thread packages/charts/docs/index.md Resolved
@pkg-pr-new

pkg-pr-new Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

comark-annotate

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

comark-badge

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

comark-bundle

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

comark-cards

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

comark-carousel

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

comark-cast

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

comark-charts

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

comark-chat

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

comark-chips

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

comark-cjk

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

comark-code

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

comark-code-notes

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

comark-colors

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

comark-comments

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

comark-critic

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

comark-deflist

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

comark-details

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

comark-diagrams

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

comark-diff

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

comark-embed

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

comark-fields

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

comark-figure

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

comark-file-tree

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

comark-footnotes

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

comark-git-graph

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

comark-github

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

comark-icon

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

comark-include

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

comark-keys

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

comark-links

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

comark-linter

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

comark-magic-move

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

comark-mark

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

markdown-it-to-comark

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

marked-to-comark

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

comark-mathml

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

comark-media

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

comark-metrics

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

migrate-to-comark

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

comark-outline

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

comark-properties

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

comark-qr

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

comark-quiz

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

comark-reading-time

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

remark-to-comark

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

comark-sources

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

comark-steps

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

comark-table

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

comark-tabs

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

comark-tests

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

comark-time

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

comark-ui

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

comark-xref

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

comark-zoom

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

commit: 5a9a2e5

@vite-hub

vite-hub Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor
Session Status Started Duration
Pending Completed Not started —
View session Completed 2026-11-18T13:27:01.045Z 3m 30s
View session Cancelled 2026-11-18T12:55:43.280Z 10m 49s
View session Cancelled 2026-11-18T12:31:20.748Z 9m 19s

Latest result

Pull request merged.

Final answers

Session

Pull request merged.

View session

PR #464 is ready. All hosted checks and 51 focused chart tests passed. The sole remaining finding was P2: Copy feedback can be clipped at the top of a scroll container. I resolved the thread as declined because the edge case does not warrant a standalone push. No code 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.

Important

The caption no longer overlaps the Copy buttons, but the new placement clips the Copy menu in right-to-left documents.

Approach: Giving the toolbar its own grid column fixes the caption overlap; the menu needs to align to the same logical edge as the toolbar.

Reviewed changes — Reviewed 37f1a42, the only commit since the prior Pullfrog review.

  • Moved the Copy toolbar into a separate grid column beside the caption or standalone description, with a browser regression test for a wrapped caption and focused Copy button.
  • Clarified chart sizing by distinguishing the fixed width of built-in axes charts from the width produced by a Vega-Lite spec.

The workspace build, 76 chart unit and renderer tests, and all eight Chromium chart tests passed. Separate Chromium checks reproduced the two layout regressions noted inline.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.2-sol(high) | 𝕏

Comment thread packages/charts/src/styles.ts Resolved
Comment thread packages/charts/src/styles.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 P0 or P1 findings remain; one Copy feedback edge case is noted inline.

Reviewed changes — Reviewed 5a9a2e5, the only commit since the prior Pullfrog review.

  • Aligned the Copy menu to the toolbar’s logical inline edge and added a narrow RTL keyboard test.
  • Moved Copy feedback out of the grid flow and added a test that verifies the wrapped caption and plot stay put during copying.

The workspace build, all 76 chart unit and renderer tests, and all 10 Chromium chart tests passed.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.2-sol(high) | 𝕏

Comment thread packages/charts/src/styles.ts Resolved
@vite-hub
vite-hub Bot merged commit 8f2482b into main Nov 18, 2026
7 checks passed
@vite-hub
vite-hub Bot deleted the fix/charts-drawn-width-no-hairline branch November 18, 2026 13:30
This was referenced Nov 18, 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