Skip to content

fix(ui): truncate overflowing SelectTrigger value#1502

Open
AmanVarshney01 wants to merge 1 commit intomainfrom
fix/select-trigger-overflow
Open

fix(ui): truncate overflowing SelectTrigger value#1502
AmanVarshney01 wants to merge 1 commit intomainfrom
fix/select-trigger-overflow

Conversation

@AmanVarshney01
Copy link
Copy Markdown
Member

@AmanVarshney01 AmanVarshney01 commented May 1, 2026

Schema selector overflowed for long names — chevron got pushed out. Flattened the trigger so the value gets flex-1 min-w-0 truncate and ellipsizes cleanly.

Before

01-select-before

After
02-select-after

The Schema selector in the sidebar overflowed for long schema names
(e.g. `_prisma_dev_wal`), pushing the chevron out of view.

Two compounding causes inside `SelectTrigger`:

- Adding the `label` prop wrapped the value in an extra `<div>`, so the
  existing `[&>span]:line-clamp-1` rule no longer matched the value span.
- That wrapper `<div>` had no width constraint, so its content could
  grow past the trigger's bounds.

Flatten the trigger to render `label`, value, and chevron as direct
flex children. The label and chevron stay `shrink-0`; the value gets
`flex-1 min-w-0 truncate text-left` so long values ellipsize cleanly
while the chevron stays anchored on the right.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

Compute preview deployed.

Branch: fix/select-trigger-overflow
Service: fix-select-trigger-overflow
Preview: https://cmon34aq10dey08duuoo2nd3a.cdg.prisma.build
Version: https://cv-31bba722060d.cdg.prisma.build

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