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

[Modal] Normalize the component & usage across all products #38630

Open
mnajdova opened this issue Aug 24, 2023 · 1 comment
Open

[Modal] Normalize the component & usage across all products #38630

mnajdova opened this issue Aug 24, 2023 · 1 comment
Assignees
Labels
component: modal This is the name of the generic UI component, not the React module! umbrella For grouping multiple issues to provide a holistic view

Comments

@mnajdova
Copy link
Member

mnajdova commented Aug 24, 2023

This issue will serve as an umbrella for all issues (inconsistencies) found around the modal vs non-modal features noticed on all different products.

  • Material UI - we are missing a non-modal dialog demo. We technically have the hideBackdrop prop that makes this possible, but we are not educating people about this. The docs states "A Dialog is a type of modal window that appears in front of app content to provide critical information or ask for a decision. Dialogs disable all app functionality when they appear, and remain on screen until confirmed, dismissed, or a required action has been taken.", but there are also non-modal dialogs scenarios, that should likely support, for e.g. check https://accessuse.eu/en/non-modal-dialogs.html#:~:text=A%20non%2Dmodal%20dialog%20pops,partly%20covered%20by%20the%20dialog. This page has great examples of both use-cases https://www.nngroup.com/articles/modal-nonmodal-dialog/
  • Joy UI - we are missing a page for the Dialog, the only demo we have lives on the modal's page, it may not be straight forward to find it - https://mui.com/joy-ui/react-modal/#modal-dialog. The modal should be treated as a utility component, used in different components, we should not educate people to use it directly, but have components for the most common use-cases it is associated with, like dialogs, drawers etc.
  • Inconsistencies between using modal vs non-modal popups in some components. For e.g. on the Select component, Material UI uses a modal element for the options list - this means that when the select is open, users cannot directly take different action by clicking on an element outside of the list. For example try this demo - https://cml5vj.csb.app/ (open the select and try clicking on the button while it is opened). While this works great for mobile, the behavior is a bit odd on desktop, as you can likely find a spot to click in order to close the select without taking unintended action. On the contrast Base UI (and Joy UI) offer only the non-modal option, which works great on desktop, but could be problematic on mobile devices, where you may not have an available space to tab in order to close the select without taking an action. In my opinion we should support both of these scenarios in all libraries.

Issues

@mnajdova mnajdova added umbrella For grouping multiple issues to provide a holistic view component: modal This is the name of the generic UI component, not the React module! labels Aug 24, 2023
@mnajdova mnajdova self-assigned this Aug 24, 2023
@mnajdova
Copy link
Member Author

Joy UI - we are missing a page for the Dialog, the only demo we have lives on the modal's page, it may not be straight forward to find it - https://mui.com/joy-ui/react-modal/#modal-dialog. The modal should be treated as a utility component, used in different components, we should not educate people to use it directly, but have components for the most common use-cases it is associated with, like dialogs, drawers etc.

@siriwatknp for this one, I will start with moving the demos to a different page only. Long term, in my opinion we should have a Dialog component in Joy UI that should have both modal & non-modal version.

@oliviertassinari oliviertassinari changed the title [Modal] Normalize the component & usage across all products. [Modal] Normalize the component & usage across all products Sep 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: modal This is the name of the generic UI component, not the React module! umbrella For grouping multiple issues to provide a holistic view
Projects
None yet
Development

No branches or pull requests

1 participant