fix dropdown position if not enough space#2587
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR updates ChangesUI sizing and dropdown direction changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ExpandDropdown
participant DOM
User->>ExpandDropdown: openPanel()
ExpandDropdown->>DOM: measure anchor bounding rect
DOM-->>ExpandDropdown: available space above/below
ExpandDropdown->>ExpandDropdown: set expandUpward and dropdownMaxHeight
ExpandDropdown->>ExpandDropdown: updateOverlayPosition()
ExpandDropdown->>DOM: apply top or bottom style
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@frontend/src/components/MenuOptionList.vue`:
- Around line 98-103: The scrollStyle computed/method in MenuOptionList.vue only
guards against undefined, so when ExpandDropdown.vue passes null for maxHeight
it can emit an invalid maxHeight like "nullpx". Update scrollStyle to treat null
the same as missing input and return the empty style object in that case, while
keeping the existing px conversion path for valid numeric values.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 36df18c8-8a32-48ca-ac3a-15544ff4b73b
📒 Files selected for processing (2)
frontend/src/components/MenuOptionList.vuefrontend/src/components/settings/ExpandDropdown.vue
🚧 Files skipped from review as they are similar to previous changes (1)
- frontend/src/components/settings/ExpandDropdown.vue
The dropdown was always opening downward, but if there's not much space the list can go off-screen making difficult to select something. Was more noticeable on the language selector since that one is at the bottom. So now if there's not enough space in the viewport will open upwards instead.
Before:
Now:
Summary by CodeRabbit
Summary of changes
New Features
Bug Fixes