fix(tables): truncate long sort option labels - #6052
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
@cursor @greptile-apps Please review this sort-dropdown overflow fix and its regression coverage. Flag any correctness, accessibility, or test issues before merge. |
|
You need to increase your spend limit or enable usage-based billing to run background agents. Go to Cursor |
PR SummaryLow Risk Overview SortDropdown now wraps each option label in Adds a jsdom regression test for a long column label: truncatable span classes, accessible name, and icon layout. Reviewed by Cursor Bugbot for commit cf5e29e. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryWraps long SortDropdown option labels in FloatingOverflowText so they ellipsize inside the shared menu width and show the full value on hover.
Confidence Score: 5/5This PR appears safe to merge; the sort label change matches existing FloatingOverflowText and DropdownMenuItem truncation patterns with no identified behavioral defects. The production change only wraps an existing string label in a component that already supplies min-w-0, truncation, and hover tooltip behavior used elsewhere in resource UI, and the new test locks that contract in place.
|
| Filename | Overview |
|---|---|
| apps/sim/app/workspace/[workspaceId]/components/resource/components/resource-options/resource-options.tsx | Sort option labels use FloatingOverflowText with the same block truncate pattern as other resource UI, matching DropdownMenuItem’s direct-child span truncation styles. |
| apps/sim/app/workspace/[workspaceId]/components/resource/components/resource-options/resource-options.test.tsx | New jsdom test covers long label content, accessible name, min-w-0/block/truncate classes, and both icons. |
Reviews (1): Last reviewed commit: "fix(tables): truncate sort option labels" | Re-trigger Greptile

Summary
Fixes table sort dropdown labels being abruptly clipped when a column name exceeds the shared menu's 220px width.
The shared
DropdownMenuItemalready truncates direct child spans, butSortDropdownrendered dynamic labels as bare text nodes. The label now usesFloatingOverflowText, which restores the intended ellipsis behavior and exposes the full value on hover while preserving its accessible text.Type of Change
Testing
bun run test -- 'app/workspace/[workspaceId]/components/resource/components/resource-options/resource-options.test.tsx'bun run type-checkinapps/simgit diff --checkThe full local app format task also inspected pre-existing untracked
apps/sim/e2e/.runsartifacts and reported formatting differences there; those artifacts are unrelated and excluded from this PR. A live browser surface was unavailable in this session, so no new before/after screenshot was captured.Checklist