fix: let BranchSelector dropdown grow to fit content#244
Conversation
The labeled main button now triggers collapse-one-level (conservative) and the icon-only add-on triggers collapse-all, matching the Expand group's convention. Fixes CatholicOS#208. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…theme Added explicit text-slate-900/dark:text-white to both <select> elements and bg-white/dark:bg-slate-700 + text colors to each <option> so the selected value and dropdown popup are readable in dark mode. Fixes CatholicOS#204. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaced fixed w-64 with w-max min-w-64 max-w-[32rem] so the menu expands to its widest row without horizontal scrollbars, while keeping a 256px floor for short names and a 512px ceiling for very long ones (where the existing truncate on the branch-name span re-engages). Fixes CatholicOS#205. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Problem
Closes #205.
BranchSelector's dropdown menu was hard-coded atw-64(256 px). Branch rows pack in a check icon, branch name, optionaldefaultbadge, commit SHA, ahead/behind counters, and a trash button — so any moderately long branch name (e.g.feature/preserve-entity-selection) would overflow the container and expose a horizontal scrollbar.Fix
One-line change in
components/revision/BranchSelector.tsx(line 170):w-max— menu grows to its widest row's intrinsic width, eliminating the horizontal scrollbar.min-w-64— 256 px floor keeps the existing appearance for projects with only short branch names.max-w-[32rem]— 512 px ceiling prevents a single extremely long name from pushing the menu off-screen; the existingtruncateon the branch-name span re-engages at that point.The vertical scroll container (
max-h-64 overflow-y-auto) is unchanged — that behaviour is correct.Testing
feature/preserve-entity-selection): menu auto-grows, no horizontal scrollbarmax-w-[32rem], branch name truncatesLanguagePicker.test.tsx, unrelated)🤖 Generated with Claude Code