Skip to content

feat: one Copy control for tables and charts, with a menu of formats - #231

Merged
vite-hub[bot] merged 5 commits into
mainfrom
feat/copy-menu
Oct 27, 2026
Merged

vite-hub[bot] merged 5 commits into
mainfrom
feat/copy-menu

Conversation

@onmax

@onmax onmax commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Tables and charts get one copy control: a Copy button for the format most people want, and an arrow that opens a menu of the others.

comark-table. Copy now writes the table as HTML with tab-separated text beside it, so Google Sheets, Excel, Notion, and Docs paste real cells (CSV pasted into Sheets landed in one column). The menu copies Markdown, a table that renders on GitHub, and CSV, which stays since these tables come from CSV files.

comark-charts. A Copy button over the card's top corner, shown on hover or focus, copies the chart as a PNG at twice its size. The page's rules swap Flint's inks for the theme's colors, and an SVG drawn as an image sees none of them, so the script sets each element's computed paint on the copy before drawing it. The menu copies the Data table as a table or as Markdown. A chart with notes copies its data, since the PNG would leave the notes out. Charts had no script before; the HTML renderer now inlines one, and the Vue, React, and Svelte components start and stop it, replacing the undocumented addStyles.

The menu is a menu of menuitems: ArrowDown on the arrow opens it on its first item, arrows, Home, and End move, Escape returns to the arrow, and Tab or a click outside closes it. A status line announces each copy.

Checks. pnpm ready passes. New e2e tests read the clipboard: the table's HTML and TSV, Markdown, and CSV with the keyboard path, and the chart's PNG, decoded to confirm the page's red theme color is in it, plus the data as TSV and Markdown.

Known limits: the PNG uses the system font, since an SVG drawn as an image can't load the page's web fonts. Image copy is tested in Chromium only; elsewhere it either works or says "Couldn't copy here".

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T08:00:56.184492Z 763379c 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.

@vite-hub

vite-hub Bot commented Oct 27, 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

Updated the branch with main because main changed packages/charts/README.md, packages/table/README.md after its checks ran; waiting for checks on the new head.

Session

Updated the branch with main because main changed packages/charts/README.md, packages/table/README.md after its checks ran; waiting for checks on the new head.

Session

Updated the branch with main because main changed packages/charts/README.md, packages/table/README.md after its checks ran; waiting for checks on the new head.

Session

Updated the branch with main because main changed packages/charts/README.md, packages/table/README.md after its checks ran; waiting for checks on the new head.

Session

Updated the branch with main because main changed packages/charts/README.md, packages/table/README.md after its checks ran; waiting for checks on the new head.

Session

Updated the branch with main because main changed packages/charts/README.md, packages/table/README.md after its checks ran; waiting for checks on the new head.

Session

Pushed e405d87 resolving the merge conflict while preserving version 0.7.0 and the chart-copy description. Frozen dependency refresh succeeded. Package-scoped vp test run passed 49 chart and 14 table tests; focused vp lint, vp fmt --check, and git diff --check passed. Pullfrog’s earlier menu finding remains fixed, with no outstanding actionable feedback. Awaiting hosted CI.

Session

Pushed e405d87 resolving the merge conflict while preserving version 0.7.0 and the chart-copy description. Frozen dependency refresh succeeded. Package-scoped vp test run passed 49 chart and 14 table tests; focused vp lint, vp fmt --check, and git diff --check passed. Pullfrog’s earlier menu finding remains fixed, with no outstanding actionable feedback. Awaiting hosted CI.

Session

Pushed e405d87 resolving the merge conflict while preserving version 0.7.0 and the chart-copy description. Frozen dependency refresh succeeded. Package-scoped vp test run passed 49 chart and 14 table tests; focused vp lint, vp fmt --check, and git diff --check passed. Pullfrog’s earlier menu finding remains fixed, with no outstanding actionable feedback. Awaiting hosted CI.

Session

Pushed e405d87 resolving the merge conflict while preserving version 0.7.0 and the chart-copy description. Frozen dependency refresh succeeded. Package-scoped vp test run passed 49 chart and 14 table tests; focused vp lint, vp fmt --check, and git diff --check passed. Pullfrog’s earlier menu finding remains fixed, with no outstanding actionable feedback. Awaiting hosted CI.

@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 critical issues — one copy-menu inconsistency inline.

Reviewed changes the two commits that replace table copy buttons with a split control and add chart image/data copying across HTML, React, Vue, and Svelte.

  • Table copying writes HTML with TSV fallback for spreadsheet-friendly paste, while retaining Markdown and CSV formats in an accessible keyboard menu.
  • Chart copying serializes theme-painted SVG output to PNG, falls back to table data for annotated charts, and exposes table and Markdown data formats.
  • Runtime integration adds shared delegated listeners, lifecycle cleanup, one-time HTML scripts/styles, hover and focus styling, and status announcements.
  • Coverage and documentation update package references and add unit and Chromium clipboard tests for formats, theme color, dimensions, and keyboard navigation.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-5.6-sol | 𝕏

Comment thread packages/table/src/client.ts Resolved
@pkg-pr-new

pkg-pr-new Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

comark-annotate

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

comark-badge

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

comark-cards

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

comark-carousel

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

comark-cast

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

comark-charts

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

comark-chat

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

comark-chips

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

comark-cjk

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

comark-code

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

comark-code-notes

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

comark-colors

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

comark-critic

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

comark-deflist

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

comark-details

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

comark-diagrams

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

comark-diff

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

comark-embed

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

comark-fields

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

comark-figure

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

comark-file-tree

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

comark-footnotes

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

comark-github

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

comark-icon

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

comark-include

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

comark-keys

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

comark-links

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

comark-linter

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

comark-mark

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

comark-mathml

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

comark-media

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

comark-metrics

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

comark-outline

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

comark-properties

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

comark-qr

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

comark-quiz

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

comark-reading-time

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

comark-sources

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

comark-steps

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

comark-table

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

comark-tabs

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

comark-tests

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

comark-ui

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

comark-xref

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

comark-zoom

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

commit: b9f9c9e

@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 since the prior Pullfrog review, the latest commit aligned each split menu with its “other formats” contract.

  • Filtered primary formats removed Table from table and marked-chart menus, and Image from ordinary chart menus, while preserving the intended alternatives.
  • Updated interaction coverage asserted the new menu counts, first focused item, keyboard wrapping, and exact renderer output for ordinary and marked charts.
  • Verified focused paths passed lint plus 41 chart tests and 10 table tests after building the required workspace packages.

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

@vite-hub
vite-hub Bot merged commit a2e6c4d into main Oct 27, 2026
7 of 8 checks passed
@vite-hub
vite-hub Bot deleted the feat/copy-menu branch October 27, 2026 09:06
@github-actions github-actions Bot mentioned this pull request Oct 27, 2026
@github-actions github-actions Bot mentioned this pull request Oct 27, 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