mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-14 01:20:03 +00:00
fix: Add viewport constraint to dropdown heights and improve filter layout (#6358)
## Summary Fixed dropdown components exceeding viewport on mobile/tablet environments and improved workflow template selector dialog filter layout. https://github.com/Comfy-Org/ComfyUI_frontend/issues/6153 ## Changes ### 1. Dropdown Height Constraints (MultiSelect & SingleSelect) - Applied CSS `min()` function to use the smaller value between `listMaxHeight` prop and 50% viewport height - Ensures dropdowns don't overflow on devices with smaller viewport heights like tablets and mobiles ### 2. Workflow Template Dialog Layout Improvements - Grouped filters (Model, Use Case, License) on the left side - Positioned Sort by option on the right for clearer visual hierarchy - Used `justify-between` to place filters and sort options at opposite ends ## Test Plan - [ ] Verify dropdown works correctly on desktop browsers - [ ] Confirm dropdown doesn't exceed 50vh on tablet viewport - [ ] Confirm dropdown doesn't exceed 50vh on mobile viewport - [ ] Check workflow template dialog filter/sort layout ## Screenshots **Before** [before.webm](https://github.com/user-attachments/assets/64b4b969-54ed-4463-abdf-0a4adef01e72) **After** [after.webm](https://github.com/user-attachments/assets/b38973e5-9e77-4882-adf8-306279d302e1) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -242,7 +242,7 @@ const pt = computed(() => ({
|
||||
)
|
||||
},
|
||||
listContainer: () => ({
|
||||
style: { maxHeight: listMaxHeight },
|
||||
style: { maxHeight: `min(${listMaxHeight}, 50vh)` },
|
||||
class: 'scrollbar-custom'
|
||||
}),
|
||||
list: {
|
||||
|
||||
@@ -158,7 +158,7 @@ const pt = computed(() => ({
|
||||
)
|
||||
},
|
||||
listContainer: () => ({
|
||||
style: `max-height: ${listMaxHeight}`,
|
||||
style: `max-height: min(${listMaxHeight}, 50vh)`,
|
||||
class: 'scrollbar-custom'
|
||||
}),
|
||||
list: {
|
||||
|
||||
Reference in New Issue
Block a user