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

Add props for min-width for OuiModal #783

Open
curq opened this issue May 25, 2023 · 3 comments
Open

Add props for min-width for OuiModal #783

curq opened this issue May 25, 2023 · 3 comments
Labels
CCI College Contributor Initiative enhancement New feature or request

Comments

@curq
Copy link
Contributor

curq commented May 25, 2023

Is your feature request related to a problem? Please describe.

OuiModal currently only supports the max-width property and not min-width. It is useful property that might be necessary for some layouts.

Describe the solution you'd like

Add min-width property for OuiModal. It should be similar to max-width that is already supported.

Describe alternatives you've considered

Using custom styling when min-width is required, but it is not preferred as it is better experience to keep it within component logic without making extra styles just for one property.

Additional context

This gap was identified in following OUI compliance audit:

@joshuarrrr
Copy link
Member

@KrooshalUX Can you weigh in here? We've seen at least a couple plugins that attempt to do this, but I'm not sure if we actually prefer a minimum width property.

@joshuarrrr
Copy link
Member

OK, I've looked at the two usages we've found so far, and I think they both demonstrate that min-width or width are not necessary (YAGNI).

In saved_objects the style is fixing the modal width at a value that's already the default size:

Screen.Recording.2023-06-08.at.5.29.10.PM.mov

In console, the difference is negligible.

Screen.Recording.2023-06-08.at.5.27.28.PM.mov

So neither of these cases demonstrate a real need for width properties, but @KrooshalUX can weigh in on the perspective of whether designers will need this low-level control or not.

@joshuarrrr
Copy link
Member

I propose moving a bit in the opposite direction and making the autosizing behavior the guidance: #803

@joshuarrrr joshuarrrr added the CCI College Contributor Initiative label Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CCI College Contributor Initiative enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

3 participants