improvement(files): match CSV/XLSX preview tables to the markdown table chrome - #6125
Conversation
…le chrome Tables in the file viewer looked different depending on the file: CSV and XLSX previews rendered their own chrome (rounded outer frame, --surface-2 header, 13px body / 12px header, --text-secondary cells) while markdown files rendered tables through the rich markdown editor (full cell borders on --divider, --surface-4 header, 14px text). Extract the markdown table chrome into document-table.css and style both surfaces from it. The editor stylesheet keeps only its own concerns (fixed layout for column resizing, prose block margin, cell paragraph reset); DataTable keeps only its edit affordances.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Shared chrome lives in new Regression guard: Reviewed by Cursor Bugbot for commit 3089ea8. Configure here. |
Greptile SummaryConsolidates CSV, XLSX, and markdown table presentation into shared styling.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/data-table.tsx | Replaces preview-specific table utility classes with shared document-table styling while retaining edit affordances. |
| apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/document-table.css | Defines the shared table chrome used by CSV, XLSX, and rich-markdown surfaces. |
| apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/document-table.test.ts | Verifies that both table surfaces resolve to the same typography, spacing, wrapping, borders, and header fill. |
| apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/rich-markdown-editor.css | Removes duplicated table chrome while retaining editor-specific layout and prose rules. |
| apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/rich-markdown-editor.tsx | Loads the shared table stylesheet before editor-specific styling. |
| apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/rich-markdown-field.tsx | Loads the shared table stylesheet for standalone rich-markdown fields. |
Reviews (2): Last reviewed commit: "fix(files): wrap unbreakable cell values..." | Re-trigger Greptile
…own does The markdown prose root sets overflow-wrap: anywhere; the preview root did not, so with whitespace-nowrap gone a long URL or hash in a CSV cell would overflow instead of breaking.
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 3089ea8. Configure here.
Summary
--surface-2header, 13px body / 12px header,--text-secondarycells) while markdown files rendered tables through the rich markdown editor (full cell borders on--divider,--surface-4header, 14px text)document-table.cssand styled both surfaces from it; removed the customDataTablestylingtable-layout: fixedfor column resizing, prose block margin, cell paragraph reset);DataTablekeeps only its edit affordancesType of Change
Testing
vitestfile-viewer suite (575 tests) + typecheck green. New parity test verified to fail when the shared rule drops the prose selector, and when the editor stylesheet re-declares cell chrome.Checklist