Repository navigation
fix: ComboboxTrigger overflow - respect caller width and clip long values (fixes #84) - #91
Merged
Merged
Conversation
…lues Remove w-fit from ComboboxTrigger base styles so a caller-provided width (e.g. w-56) is not overridden. Add min-w-0 and text overflow ellipsis so long selected values clip instead of expanding past the trigger bounds. Fixes #84
There was a problem hiding this comment.
Welcome to Ansvisor, and thank you for your first PR! A maintainer will be by soon to review.
In the meantime, two things that make review faster:
- A short description of why the change matters, not just what it does — most of our PRs link a
Fixes #...to the issue that explains the why. - A quick local test note if there's anything worth eyeballing in the browser.
If you'd like to keep an eye on where Ansvisor goes next, a ⭐ on the repo helps others discover it (and Watch sends you a ping when related issues land). Either way — looking forward to your next one.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix
ComboboxTriggeroverflow on the Citations page. When a long prompt is selected, the Prompt dropdown grows past its intended width and overlaps the adjacent Platform filter.Root Cause
ComboboxTriggerbase styles includew-fitwhich sizes the trigger to its content, overriding any caller-provided width (e.g.w-56). Combined withwhitespace-nowrap, long selected values expand the trigger indefinitely.The sibling
SelectTriggeravoids this becauseSelectValuehasline-clamp-1— butComboboxValuehas no equivalent truncation.Fix
In
web/src/components/ui/combobox.tsx:w-fitfrom the base trigger className so caller-provided widths are respectedmin-w-0to allow the flex child to shrink below content sizewhitespace-nowrapwithtruncate(which includesoverflow: hidden,text-overflow: ellipsis, andwhite-space: nowrap)Acceptance Criteria
w-56)Comboboxusages still render correctly (only one usage — citations page)Testing
This is a CSS-only change to a shared UI component. Verified by inspecting the diff against the only
ComboboxTriggerusage (citations/page.tsx:519).Fixes #84