Repository navigation
feat(ui): lay out Markdown tables from their cells - #451
Conversation
A table with ids, links, and two prose columns squeezed its short columns until `portal #1596` broke into `#159` and `6`, chips included, since a chip may break anywhere and its icon added nothing to the cell's minimum width. The new tableLayout plugin, on by default, reads each top-level table while parsing. Short columns stay on one line. A table wider than a readable column goes in a data-wide div and grows into the room beside the text. A table with two or more prose columns stacks the later ones under the first when it gets under 85% of its width, and becomes one column per row on a phone. It's data attributes and container queries in the typeset, with no script. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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. |
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.
Important
Table layout stops working when the document contains comments, and short numeric columns can now force unnecessary horizontal scrolling. These should be addressed before merging; a separate span-table edge case is noted inline.
Reviewed changes Reviewed the content-aware table parser, its preset integration, responsive CSS, chip behavior, documentation, and regression tests.
- Content-aware layout: Adds the default-on
tableLayoutplugin, column classification, width estimates, wrappers, and accessibility roles. - Responsive presentation: Preserves short chip labels, expands wide tables, and folds prose columns into stacked layouts.
- Documentation and verification: Documents the automatic behavior and opt-out; the workspace build, 406 UI tests, and seven Chromium layout tests passed, with one UI test skipped. Additional browser fixtures reproduced the inline findings.
gpt-6.1-sol(xhigh) | 𝕏
Latest result Pull request merged. Final answersSession Pull request merged. Pushed af08c87 to fix the stale wide-block CSS assertion and resolved its review thread. Reproduced the original failure; all 33 focused UI/table-layout tests and repository lint pass after refreshing dependencies. No valid findings remain. Awaiting checks and automated review. |
There was a problem hiding this comment.
Important
The runtime fixes pass, but the changed wide-block selector leaves an existing regression test failing and CI red. No P0 or P1 findings remain.
Reviewed changes Reviewed 69952d2 against the prior review at a484fed.
- Preserved comment-wrapper layouts: Extended table traversal and CSS matching to static and deferred comment wrappers.
- Corrected column measurement: Included headers when deciding column widths and no-wrap behavior, while retaining body-based prose classification.
- Preserved native spans: Left tables containing
colspanorrowspanunchanged. - Added regression coverage: Verified the new public-render and browser cases; the workspace build and ten Chromium tests passed, while the focused unit run passed 67 tests and exposed the one stale assertion noted inline.
gpt-6.1-sol(xhigh) | 𝕏
There was a problem hiding this comment.
✅ No new issues found. No P0 or P1 findings remain.
Reviewed changes Reviewed the assertion fix in af08c87 since the prior substantive review at 69952d2; the intervening merge introduced no changes to the reviewed table-layout behavior.
- Updated wide-block regression coverage: Aligned the expected selector with the comments-aware document root while retaining the wide-block sizing checks.
The workspace build, all 33 focused UI/table-layout tests, and lint on the changed file passed.
gpt-6.1-sol(xhigh) | 𝕏
Tables from comark-ui's new tableLayout plugin (onmax/comark-ui#451) are wide blocks. Drop gave a wide block the same room on both sides, the smaller of the two, so with the outline open a table stayed centred and never reached the empty space left of the text. Each side now gets its own room: --comark-wide-start is the space left of the column and --comark-wide-end the space right of it, less the panel and the outline. A doc with comment cards in the margin zeroes both. The outline counts a table as wide when comark-ui's width estimate passes the text, and lets it stack rather than give up its column, as a compare does. Bumps comark-ui, comark-chips, comark-comments and comark-linter to the PR's build. Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: vite-hub[bot] <320448255+vite-hub[bot]@users.noreply.github.com>

A Markdown table with short ids and links next to two prose columns breaks its ids letter by letter:
portal #1596renders asport,al,#15,96, and apreviewchip asprevie,w. It showed up in a Drop report of open PRs.The chips allow it.
.cpsetsoverflow-wrap: anywhere, and the typeset'simg { max-width: 100% }lets a chip's icon count for nothing in the cell's minimum width. So the table squeezes the short columns to give the prose more room.This adds a
tableLayoutplugin, on by default and separate fromtypesetso Drop, which turns typeset off, still gets it. It reads each top-level Markdown table's cells while parsing and writes data attributes that the typeset styles, with no script:data-widediv and grows into the room beside the text like a compare does, up to its estimated width.display: gridcan drop table semantics.There's nothing to opt into.
tableLayout: falseturns it off.e2e/table-layout.e2e.tschecks the three layouts in Chromium. Its three tests fail onmain, as do three of the five unit tests. I haven't tried it in Safari or Firefox.Related: the Drop side, which lets wide blocks use the room left of the text, comes in a follow-up PR on vite-hub/drop.
🤖 Generated with Claude Code