strapi / design-system

Strapi.io's design system :rocket:
https://design-system.strapi.io
MIT License
474 stars 166 forks source link

[feat]: Support for a loading state of Modal #841

Open gu-stav opened 1 year ago

gu-stav commented 1 year ago

A clear and concise description of what the feature is

I'd like to see loading state support for modals.

Why should this feature be included?

In the monorepo we have a growing number of modals which have to load data when they are being opened, or where data is validated async once a form within a modal is submitted.

In both cases the modal will be in a loading state.

Examples:

Note: all of these examples use slightly different patterns to display the Loader

Please provide an example for how this would work

gu-stav commented 1 year ago

@maevalienard Here the issue we've just discussed: we'd like to support a consistent loading state for modals, because we are using different patterns in different places. One thing to keep in mind may be is that the loader should enforce some minimum height on the modal, so that it doesn't jump around too much when the data comes and it is not in a loading state anymore.

maevalienard commented 1 year ago

@gu-stav Gotcha, thanks! By any chance, do you know what the min height is please? (is it the min or the max height that we will display by default for the loading state though?)