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

feat: add support for multiple predefined dialog sizes #3063

Open
MarvinKlein1508 opened this issue Dec 18, 2024 · 2 comments
Open

feat: add support for multiple predefined dialog sizes #3063

MarvinKlein1508 opened this issue Dec 18, 2024 · 2 comments
Labels
v5 For the next major version

Comments

@MarvinKlein1508
Copy link
Contributor

🙋 Feature Request

This request is related to the v5 version. Since the Dialogs seem to get an entire overhaul I'd like to bring this feature request back up again.

I would highly appreciate if the FluentDialog can provide different pre-defined dialog sizes like bootstrap does.
https://getbootstrap.com/docs/5.3/components/modal/#optional-sizes

I'd like to show some larger tables within dialogs/modals and the default size is too small for me most of the time. Those sizes are also different for every different screensize. Especially on larger screens (>24inches) I'd like to use up more space to show more stuff.

In v3 you can specify the Width parameter of the DialogParameters however this only allows for one valid css value.

💁 Possible Solution

Control the width of the dialog by different CSS classes which can easily be overwritten. I really like the Bootstrap default sizes but it would be also nice to allow for custom size classes here (In my case I created custom classes for xxl (for 32inch screens) and fullscreen)

🔦 Context

This request is related to #2456

@microsoft-github-policy-service microsoft-github-policy-service bot added the triage New issue. Needs to be looked at label Dec 18, 2024
@dvoituron
Copy link
Collaborator

Yes, it's a good idea to be able to define the width, height and max-width and max-height values.

My first impression would be to have Class and Style attributes where we could set these values (or use predefined values as you suggested). But also to configure other UI styles.

@MarvinKlein1508
Copy link
Contributor Author

The charm of pre-definded values would be that you can throw them into an enum, so you don't need to remember the class names. In case you want to provide a custom class you can always change CSS variabels within your custom class. I'm actually doing it manually in my projects right now like this:

/* Modals */
@media (min-width: 576px) {
    .modal {
        --dialog-width: 500px !important;
    }

    .modal-sm {
        --dialog-width: 300px !important;
    }
}

@media (min-width: 992px) {
    .modal-lg,
    .modal-xl {
        --dialog-width: 800px !important;
    }
}

@media (min-width: 1200px) {
    .modal-xl {
        --dialog-width: 1140px !important;
    }
}

.modal-fullscreen {
    --dialog-width: 100% !important;
    --dialog-height: calc(100dvh - 2px) !important;
    --layer-corner-radius: 0 !important;
}

@vnbaaij vnbaaij added v5 For the next major version and removed triage New issue. Needs to be looked at labels Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v5 For the next major version
Projects
None yet
Development

No branches or pull requests

3 participants