Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic sizing of dialog based on content #3543

Closed
Happyjump opened this issue Nov 28, 2023 · 1 comment
Closed

Dynamic sizing of dialog based on content #3543

Happyjump opened this issue Nov 28, 2023 · 1 comment
Assignees

Comments

@Happyjump
Copy link

Description

The size of a dialog should adapt to the content to prevent scrolling (dialog too small) or unnecessary whitespace (dialog too large) or adapt to content dynamically if eg form field are added or removed based on user input

Reasons

Especially in use cases where form fields are added / removed based on user input a fixed dialog size leads to either scrollbars (if dialog is too small ) or unneccessary whitespace (if dialog is too large).

Attachments

In this example the
"Vault Credential Store (optional):" formfield is available/not available based on different users

Unnessessary Whitespace
image

Scrollbar
image

@JohannesDoberer JohannesDoberer self-assigned this Nov 30, 2023
@hardl
Copy link
Contributor

hardl commented May 24, 2024

Setting the modal size from within the micro frontend is already possible by executing e.g.
LuigiClient.linkManager().updateModalSettings({width: '200px', height: '220px'}).
Since Luigi core doesn't know anything about the rendering internals of an iframed micro frontend, especially when exactly everything is loaded and rendered and the mfe view has its "final" size, the calculation and adjustment should be handled by the micro frontend code.

@hardl hardl closed this as completed May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants