Repository navigation
feat(ui): size table columns by their text and let wide tables use all the room - #466
Conversation
…l the room Long columns share the room by weights chosen at parse time to make the table as short as it can be; short and chip columns take min-content, and a cell of two chips may break between them. A wide table grows past the wide blocks' 72rem default up to its own width, and stacks only where its narrowest prose column would fall under 9.5em. A table with prose that fits the column gets a data-fit wrapper so it becomes one column per row on a phone. data-width stays on wide tables only, as Drop reads it.
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
Folded tables can paint numeric values over prose, and the phone layout can hide the headers of tables with no prose. Both are reproducible with ordinary Markdown tables.
Approach: Parse-time column weights and CSS container queries are a good fit for a script-free layout, but the grid needs to preserve readable columns and table semantics, and estimating weights should not dominate parse time.
Reviewed changes Reviewed the table parser, typeset CSS, preset contract, documentation, and regression tests.
- Column sizing: Checked how the parser measures short cells and chips, weights long columns, and chooses when to stack.
- Responsive layout: Checked block width overrides, folded and phone layouts, and table accessibility.
- Verification: The workspace build passed, 438 UI tests passed with one skipped, and all 20 Chromium and Firefox table tests passed. WebKit could not launch because the runner lacks
libgtk-4.so.1and other host libraries. Additional fixtures reproduced the findings inline.
gpt-6.2-sol(high) | 𝕏
Latest result Pull request merged. Final answersSession Pull request merged. Session Merged 6e3af44 directly: required checks passed and review threads were resolved. PR #466 is ready to merge. All hosted checks passed, including Chromium, Firefox, and WebKit. The 17 focused table-layout tests passed locally, and lint passed with warnings. All review threads are resolved. The PR description and contributor notes still describe the superseded width algorithm (P2 documentation); no further code push was needed. Pushed `6e3af44` to fix the folded-table test and resolved the review thread. Playwright’s serializer reproduced the missing cell bounds before the patch and preserved them afterward. Lint passed with warnings, and formatting passed. The sandbox blocked the local test server, and the previous hosted run was canceled during WebKit dependency installation, so cross-browser verification awaits CI on the new commit. Session Pushed `231ab276` to fix the column mix-up that failed the folded-table test in all three browsers, and resolved the review thread. The corrected test checks that Summary and Status stack without overlapping the first numeric column. Lint, formatting, and a focused render check passed. The local sandbox blocked Playwright’s web server and browser downloads, so cross-browser verification is pending in hosted CI. Pushed `231ab276` to fix the column mix-up that failed the folded-table test in all three browsers, and resolved the review thread. The corrected test checks that Summary and Status stack without overlapping the first numeric column. Lint, formatting, and a focused render check passed. The local sandbox blocked Playwright’s web server and browser downloads, so cross-browser verification is pending in hosted CI. |
There was a problem hiding this comment.
Important
Fix the new folded-table assertion before merging: it fails in Chromium and Firefox even though the prose cells stack correctly.
Approach: The simpler per-column estimate removes the repeated row scans, and data-prose keeps phone layout separate from accessibility roles.
Reviewed changes Re-reviewed 8f4bd15 against 12bb0ba.
- Replaced the iterative width search with proportional weights and used those weights to calculate the fold threshold.
- Reserved room for folded prose, gated phone cards on
data-prose, and kept captioned HTML tables native. - Verified the workspace build and 440 passing UI tests (one skipped). Chromium and Firefox passed 22 of 24 table cases; both failures are the assertion noted inline. WebKit could not launch locally because
libgtk-4.so.1and other host libraries are missing.
No new P0 or P1 product defects remain.
gpt-6.2-sol(high) | 𝕏
Pins comark-ui and the six comark packages Drop imports directly to onmax/comark-ui#466's build. A wide table now sizes its columns by their text, grows past the wide blocks' 72rem to its own width (up to 96em), and stacks its prose under the short columns where the room runs out. The cache revision goes to drop.27, since preview builds share comark-ui's version. The wide-table browser test now reads stacking from where a row's cells sit, because comark-ui lays a table with prose out as a grid even side by side, and checks the table at 1480px.
There was a problem hiding this comment.
Important
The updated regression still fails in Chromium and Firefox before it reaches the layout assertions.
Reviewed changes Reviewed the test-only delta from b90adb9 to 231ab27.
- Corrected the fixture’s column order and added checks for vertical stacking, minimum prose width, and separation from the first numeric column.
- Verified the failure in both Chromium and Firefox: 22 of 24 table-layout tests passed. All six assertions in the failing fixture passed in both browsers when the measurement helper returned plain coordinate objects. WebKit could not launch locally because host libraries were missing, including
libgtk-4.so.1.
No P0 or P1 findings remain.
gpt-6.2-sol(high) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes Re-reviewed the test-only delta from 231ab27 to 6e3af44.
- Serialized table bounds as plain objects. Playwright now preserves the coordinates in both the named fields and
rowCells, so the folded-table regression reaches its layout assertions. - Verified the fix in Chromium and Firefox. All 24 table-layout tests passed. WebKit could not launch on this runner because it lacks
libgtk-4.so.1and other system libraries.
No P0 or P1 findings remain.
gpt-6.2-sol(high) | 𝕏
…66) (#238) * feat(docs): wide tables size their columns by their text (comark-ui#466) Pins comark-ui and the six comark packages Drop imports directly to onmax/comark-ui#466's build. A wide table now sizes its columns by their text, grows past the wide blocks' 72rem to its own width (up to 96em), and stacks its prose under the short columns where the room runs out. The cache revision goes to drop.27, since preview builds share comark-ui's version. The wide-table browser test now reads stacking from where a row's cells sit, because comark-ui lays a table with prose out as a grid even side by side, and checks the table at 1480px. * fix(docs): keep section links visible when wide tables displace the outline * fix(docs): preserve stacked chart zoom and wrap outline links * fix(docs): keep responsive wide tables readable * fix(docs): keep folded table prose tracks readable --------- Co-authored-by: vite-hub[bot] <320448255+vite-hub[bot]@users.noreply.github.com>

A wide table with prose columns of different lengths wraps its longest column every few words. In a Drop report of open PRs, a 7-column table with Summary, Status, three link columns and Working now, Status got 213px at 1480px and its first row ran 13 lines. Summary got 193px, and Preview, Drop and Airtable together took 420px for one chip each. The table also stopped at 72em with about 90px unused on its left.
The browser sizes auto columns from each column's longest cell, so a column with twice the text gets about the same width.
data-shortsetsnowrap, so a chip column never gives width back. One cell with two chips made Preview 183px wide.This PR sets the widths while parsing, still with no script:
min-content. The long ones share the rest infr, bydata-w<n>weights from 1 to 12, chosen to make the table as short as it can be. Each row counts as tall as its longest cell's characters over its column's width, and the tallest row counts twice.data-short="chips". It may break between chips, never inside one, and never insideportal #1596.--comark-wide-maxstill wins.data-fold, the width where its narrowest prose column would drop under 9.5em, instead of below 85% of its own width.data-fitwrapper, so on a phone it becomes one card per row like a stacked table.data-widthis still only on wide tables, since Drop reads it to place its outline.I measured it in Drop's document frame, Drop
mainwith the outline open, on a stand-in for the report with the same cell lengths and on seven regression tables:mainThe other tables are the same height or shorter at every width, and no page scrolls sideways. Tables of numbers with no prose still scroll on a phone, as on GitHub. The narrow, all-short, numeric and even two-prose tables don't change. Chromium on Linux, with Liberation Sans for Drop's system font. On a Mac with SF Pro the report table goes from 1760px to 1310px at 1480px. Firefox and WebKit pick the same layouts, with column widths within about 4% of Chromium's.
e2e/table-layout.tsnow runs in Chromium, Firefox and WebKit. The new tests for growing past 72rem, widths following text, chip wrapping and the one-prose phone card fail onmain. I haven't tried it in Safari on a device.Before/after: on Drop
Related: #451. Drop follows with a PR that bumps comark-ui to this build.