Commit bd91ab7
authored
fix(files): restore horizontal scroll in CSV and XLSX preview tables (#6550)
* fix(files): restore horizontal scroll in CSV and XLSX preview tables
#6125 moved the preview tables onto the markdown table chrome and gave both
surfaces `width: 100%`. That is right for prose and wrong for data: a CSV with
dozens of columns divides the frame between them, and since the same change
added `overflow-wrap: anywhere`, every column was free to break down to a single
character — so headers rendered as vertical columns of letters and the table
never exceeded its frame, leaving `overflow-x-auto` with nothing to scroll.
Split sizing out of the shared rule. Prose tables keep `width: 100%`; preview
tables size to their content and scroll, with column bounds so no column
collapses to a sliver and one long value wraps instead of pushing the rest
off-screen. Chrome (borders, padding, typography, header fill) stays shared.
* fix(files): scroll preview tables from one container, not two nested ones
DataTable owned `overflow-x-auto` while its caller owns the vertical scroll, so
now that preview tables are actually wider than the frame the horizontal
scrollbar rendered at the foot of the table rather than at the bottom of the
viewport — up to 1,000 rows below it for the two callers whose container is a
plain block (xlsx-preview, preview-panel). csv-table-preview escaped it only
because its flex column compressed the wrapper to the frame height.
Drop the inner overflow so the caller's bounded container scrolls both axes.
All three callers now place the scrollbar at the viewport bottom.
* fix(files): correct a stale reference to the removed inner overflow
The sizing comment still credited `.document-table`'s own `overflow-x-auto`
for the horizontal scroll, which the previous commit removed in favour of the
caller's container.1 parent b879960 commit bd91ab7
3 files changed
Lines changed: 55 additions & 4 deletions
File tree
- apps/sim/app/workspace/[workspaceId]/files/components/file-viewer
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
| |||
100 | 104 | | |
101 | 105 | | |
102 | 106 | | |
103 | | - | |
| 107 | + | |
104 | 108 | | |
105 | 109 | | |
106 | 110 | | |
| |||
Lines changed: 28 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
18 | | - | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
23 | 48 | | |
24 | 49 | | |
25 | 50 | | |
| |||
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
118 | 140 | | |
119 | 141 | | |
120 | 142 | | |
| |||
0 commit comments