Skip to content

fix(tables): truncate long sort option labels - #6052

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/sort-dropdown-overflow
Jul 29, 2026
Merged

fix(tables): truncate long sort option labels#6052
waleedlatif1 merged 1 commit into
stagingfrom
fix/sort-dropdown-overflow

Conversation

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor

Summary

Fixes table sort dropdown labels being abruptly clipped when a column name exceeds the shared menu's 220px width.

The shared DropdownMenuItem already truncates direct child spans, but SortDropdown rendered dynamic labels as bare text nodes. The label now uses FloatingOverflowText, which restores the intended ellipsis behavior and exposes the full value on hover while preserving its accessible text.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other

Testing

  • Added a jsdom regression test covering a long option label, its truncatable span contract, full accessible name, and leading/trailing icons.
  • bun run test -- 'app/workspace/[workspaceId]/components/resource/components/resource-options/resource-options.test.tsx'
  • Biome check on both changed files
  • bun run type-check in apps/sim
  • git diff --check

The full local app format task also inspected pre-existing untracked apps/sim/e2e/.runs artifacts 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

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jul 29, 2026 5:14pm

Request Review

@BillLeoutsakosvl346
BillLeoutsakosvl346 marked this pull request as ready for review July 29, 2026 17:25
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cursor @greptile-apps Please review this sort-dropdown overflow fix and its regression coverage. Flag any correctness, accessibility, or test issues before merge.

@cursor

cursor Bot commented Jul 29, 2026

Copy link
Copy Markdown

You need to increase your spend limit or enable usage-based billing to run background agents. Go to Cursor

@cursor

cursor Bot commented Jul 29, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
UI-only change in the sort menu with no auth, data, or API impact.

Overview
Fixes table sort dropdown labels that were clipped without ellipsis because column names were rendered as plain text instead of the shared truncating pattern.

SortDropdown now wraps each option label in FloatingOverflowText (with block truncate), matching search chips and restoring ellipsis plus full-value tooltip on hover while keeping the accessible name intact.

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-apps

greptile-apps Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Wraps long SortDropdown option labels in FloatingOverflowText so they ellipsize inside the shared menu width and show the full value on hover.

  • SortDropdown replaces bare option.label text with <FloatingOverflowText label={...} className='block truncate' />.
  • Adds a jsdom regression test for long labels, truncatable span classes, accessible name, and leading/trailing icons.

Confidence Score: 5/5

This 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.

Important Files Changed

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

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author
image

@waleedlatif1
waleedlatif1 merged commit 21c28d7 into staging Jul 29, 2026
27 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/sort-dropdown-overflow branch July 29, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants