Maximize/Minimize Dialog functionality jmix-framework/jmix#4926 - #5620
Merged
KremnevDmitry merged 2 commits intoAug 31, 2026
Merged
Conversation
glebfox
approved these changes
Aug 31, 2026
KremnevDmitry
deleted the
feature/4926-maximizeminimize-dialog-functionality
branch
August 31, 2026 14:56
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
A View opened in a
DialogWindowcan now be maximized to the whole viewport and restored back, via a toggle button in the dialog header or from code. The feature is opt-in and inert for dialogs that don't enable it.What was done
maximizableattribute to@DialogMode(moduleflowui),falseby default. When enabled, a toggle button appears in the dialog header next to the close button.AbstractDialogWindow:isMaximizable()/setMaximizable(boolean),isMaximized()/setMaximized(boolean), andaddMaximizedChangeListener(Consumer<MaximizedChangeEvent<V>>). The event reportsisMaximized(),isFromClient(), the dialog window and the view shown in it.setDraggable(...)/setResizable(...)in this state are stored and applied when the dialog is restored, and the getters report the configured value.jmix-maximizedattribute set on the dialog element.How it works
setMaximized(true)marks the dialog element withjmix-maximizedand turns off dragging and resizing, remembering their previous values. The themes (jmix-aura,jmix-lumo) stretch the dialog overlay over the viewport for that attribute, overriding the inline geometry Vaadin keeps on the overlay when a dialog is dragged or resized. Because width, height and position are never read or rewritten on the server, restoring removes the attribute and the dialog returns exactly to the size and position the user left it in — including a dialog that was dragged and resized first. Clicking the header button toggles the same state and firesMaximizedChangeEventwithfromClient = true; the button icon and description switch between "maximize" and "restore".Components contributed through
View#configureDialogWindowHeaderkeep their place: they stay in the header content, before the maximize and close buttons.How to use
Declaratively:
Programmatically, including opening a dialog already maximized:
A theme can adjust the maximized layout through the:
--jmix-dialog-maximized-position--jmix-dialog-maximized-inset--jmix-dialog-maximized-width--jmix-dialog-maximized-heightCompatibility
Opt-in; existing applications are unaffected. The header of every dialog now contains one extra button element, hidden unless maximizable is enabled — worth knowing for tests that assert on the dialog header DOM.