Fix long URLs pushing action buttons off-screen in Links table#4137
Fix long URLs pushing action buttons off-screen in Links table#4137nielskaspers wants to merge 2 commits into
Conversation
The Link and Destination URL columns used CSS Grid's default min-width (auto), which prevents cells from shrinking below their content's intrinsic width. Adding minWidth: 0 allows the grid items to shrink, enabling the existing text truncation in ExternalLink to work correctly. Fixes umami-software#4136
|
@nielskaspers is attempting to deploy a commit to the Umami Software Team on Vercel. A member of the Team first needs to authorize it. |
Greptile SummaryThis PR applies a targeted, correct CSS fix for long destination URLs pushing edit/delete action buttons off-screen in the Links table. By adding
Confidence Score: 4/5Safe to merge — the fix is correct, minimal, and well-understood, with only a minor omission of the same fix in PixelsTable. The change is a two-line CSS tweak using a well-known CSS Grid pattern. The PR description accurately explains the root cause and the style prop flow through the component tree. The only concern is that the analogous PixelsTable component has the same bug and was not addressed in this PR. src/app/(main)/pixels/PixelsTable.tsx — the URL DataColumn there also needs Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
subgraph before ["Before fix (broken)"]
A[CSS Grid cell] -->|default min: auto| B[DataColumn]
B --> C[ExternalLink]
C -->|overflow hidden + truncate| D[Truncation BLOCKED]
D --> E["⚠ Action buttons pushed off-screen"]
end
subgraph after ["After fix (working)"]
F["CSS Grid cell\nminWidth: 0"] -->|min: 0, can shrink| G[DataColumn]
G --> H[ExternalLink]
H -->|overflow hidden + truncate| I[Truncation ACTIVE]
I --> J["✅ Action buttons remain visible"]
end
style E fill:#ff6b6b,color:#fff
style J fill:#51cf66,color:#fff
|
The PixelsTable has the identical CSS Grid overflow issue where long URLs can push action buttons off-screen.
Summary
Long destination URLs in the Links table push the edit/delete action buttons off-screen, making them inaccessible.
Issue
Fixes #4136
Changes
style={{ minWidth: 0 }}to the Link and Destination URLDataColumncomponents inLinksTable.tsxRoot Cause
The table uses CSS Grid with
1frcolumns, which defaults tominmax(auto, 1fr). Theautominimum prevents grid items from shrinking below their content's intrinsic width. This overrides the existing text truncation in theExternalLinkcomponent (which already hasoverflow="hidden"andtruncate).Setting
minWidth: 0on the grid cells allows them to shrink below content width, enabling the existing truncation to work correctly.Testing
ExternalLinkalready implements truncation viaRow overflow="hidden"andText truncatestyleprop flows throughDataColumn→DataTable→TableCell→Cell(react-aria) to the DOM elementminWidth: 0, the CSS Grid items can shrink and text truncation activates for long URLs