Skip to content

fix(tables): keep row context menu labels on one line - #6418

Merged
waleedlatif1 merged 2 commits into
stagingfrom
worktree-table-row-menu-overflow
Aug 8, 2026
Merged

fix(tables): keep row context menu labels on one line#6418
waleedlatif1 merged 2 commits into
stagingfrom
worktree-table-row-menu-overflow

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Widened the tables row context menu to 320px so the row-scoped workflow labels ("Run empty or failed cells on 2 rows", "Re-run all cells on 2 rows") fit on one line
  • Menu rows are a fixed 28px, so a wrapped label overflowed its row and painted over the rows beneath it — DropdownMenuItem/sub-trigger/checkbox/radio now stay single-line, and count-bearing labels ellipsize instead of wrapping

Type of Change

  • Bug fix

Testing

Type-check and lint pass. CSS-only change; not yet verified in a running table.

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 Aug 8, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 8, 2026 6:55pm

Request Review

@cursor

cursor Bot commented Aug 8, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
UI-only layout and shared dropdown label rendering; no auth, data, or API changes. Slight global behavior change if other menus relied on multi-line labels.

Overview
Fixes table row context menu labels that wrapped inside fixed-height menu rows and overlapped neighboring items.

The tables context menu widens DropdownMenuContent to 320px (max-w-[320px]) so row-scoped workflow strings like “Run empty or failed cells on 2 rows” can fit on one line when possible.

In @sim/emcn DropdownMenu, menu rows are forced to a single line (whitespace-nowrap) and long labels ellipsis instead of wrapping. A new withEllipsizedLabel helper wraps bare text (and coalesces icon + text like “Delete {n} rows”) in truncating spans; asChild rows skip that so Radix Slot still gets one element child. The same behavior applies to items, sub-triggers, checkbox items, and radio items. dropdown-menu.test.tsx adds jsdom tests for truncation, coalescing, and asChild.

Reviewed by Cursor Bugbot for commit 963be2d. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR keeps fixed-height dropdown-menu rows on one line and truncates overlong labels while widening the table row context menu for row-scoped actions.

  • Adds reusable single-line and label-ellipsis behavior to dropdown items, sub-triggers, checkbox items, and radio items.
  • Preserves asChild behavior and coalesces adjacent text children into one truncating label.
  • Adds coverage for text wrapping, truncation, adjacent text, checkbox labels, and asChild rows.
  • Moves the table menu-width rationale into declaration-level TSDoc.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/context-menu/context-menu.tsx Widens the row context menu and replaces the prior JSX explanation with compliant declaration-level TSDoc.
packages/emcn/src/components/dropdown-menu/dropdown-menu.tsx Adds single-line row styling and wraps current bare-text labels in truncating spans without disrupting asChild.
packages/emcn/src/components/dropdown-menu/dropdown-menu.test.tsx Covers the label truncation behavior and the child shapes used by current dropdown-menu consumers.

Reviews (2): Last reviewed commit: "improvement(emcn): ellipsize menu row la..." | Re-trigger Greptile

Comment thread packages/emcn/src/components/dropdown-menu/dropdown-menu.tsx
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 963be2d. Configure here.

@waleedlatif1
waleedlatif1 merged commit 4f5ad20 into staging Aug 8, 2026
29 of 30 checks passed
@waleedlatif1
waleedlatif1 deleted the worktree-table-row-menu-overflow branch August 8, 2026 18:55
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.

1 participant