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

Non-modal Dialog needed. #882

Closed
zepumph opened this issue May 9, 2024 · 2 comments
Closed

Non-modal Dialog needed. #882

zepumph opened this issue May 9, 2024 · 2 comments
Assignees

Comments

@zepumph
Copy link
Member

zepumph commented May 9, 2024

From phetsims/mean-share-and-balance#230, designers have found that a non-modal Dialog is best for a feature in MSAB. Currently, Dialog and Popupable do not support isModal:false as an option.

assert && assert( options.isModal, 'Non-modal popups not currently supported' );

Some paper trail here dates back to 2018 (when Dialog was rewritten). phetsims/joist#293 (comment).

For the MSAB case, they could definitely get away with not using Dialog the class, and just creating their own Node, but it is first worth determining what costs are associated with adding isModal:false to Dialog.

From that previous issue, these four concerns were outlined as current problems with non-modal dialogs:

(2) For screen-specific non-modal dialogs, behavior when switching screens is incorrect. When switching screens, dialogs should disappear along with screen. When returning to a screen, dialogs specific to that screen should be restored. Currently, dialogs remain on the screen regardless of which screen is selected.

(3) Non-modal dialogs should be positionable. They are currently limited to centered on the screen.

(4) Non-modal dialogs should be movable, so that you can interact with other UI components. Their position is currently fixed.

(5) Placement of the close button can overlap with the dialog content. See screenshot below. This problem may not be limited to non-modal dialogs (untested with modal dialogs).

I personally do not think that (4) is necessarily needed (depending on the context), and I wonder if (5) is fixed given our new dynamic layout rewrite of Dialog. The other two seem important to handle.

@pixelzoom, do you mind writing down a couple thoughts about your opinions of this issue. Do you have a recommendation for MSAB as to whether we should just use a one-off node, or try to outfit this feature? That will help us determine how to proceed.

@zepumph zepumph changed the title Non modal Dialog needed. Non-modal Dialog needed. May 9, 2024
@pixelzoom
Copy link
Contributor

In dev meeting, my input was that phetsims/mean-share-and-balance#230 does not require a non-modal dialog. It's perfectly fine to think of it as a Panel.

@pixelzoom pixelzoom assigned zepumph and unassigned pixelzoom May 13, 2024
@zepumph
Copy link
Member Author

zepumph commented May 13, 2024

Excellent! We can close this issue once against until we actually need this feature.

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

2 participants