mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-11 00:10:40 +00:00
refactor: restructure BaseModalLayout from flexbox to CSS Grid (#8211)
## Summary Refactors `BaseModalLayout` from a flexbox-based layout to CSS Grid, enabling smoother panel transitions and improved layout control. ## Changes ### Layout Restructure - **Flexbox → CSS Grid**: Replaced nested flexbox with a 3-column CSS Grid (`nav | main | aside`) - **Smooth panel transitions**: Panel show/hide now animates via `grid-template-columns` instead of Vue `<Transition>` with `translateX` - **Removed transition CSS**: Deleted `.slide-panel-*` and `.fade-*` transition styles (no longer needed with grid approach) ### Right Panel Improvements - **Dedicated header**: Added header with close button, right panel toggle, and customizable title slot (`rightPanelHeaderTitle`, `rightPanelHeaderActions`) - **New prop**: Added `rightPanelTitle` prop for simple text title in right panel header ### UX & Accessibility - **ESC key handling**: Pressing Escape closes the right panel (if open) before closing the dialog - **Accessibility**: Added `aria-label` attributes to all panel toggle and close buttons - **i18n**: Added translation keys: `showLeftPanel`, `hideLeftPanel`, `showRightPanel`, `hideRightPanel`, `closeDialog` --------- Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -100,6 +100,11 @@
|
||||
"no": "No",
|
||||
"cancel": "Cancel",
|
||||
"close": "Close",
|
||||
"closeDialog": "Close dialog",
|
||||
"showLeftPanel": "Show left panel",
|
||||
"hideLeftPanel": "Hide left panel",
|
||||
"showRightPanel": "Show right panel",
|
||||
"hideRightPanel": "Hide right panel",
|
||||
"or": "or",
|
||||
"pressKeysForNewBinding": "Press keys for new binding",
|
||||
"defaultBanner": "default banner",
|
||||
|
||||
Reference in New Issue
Block a user