Closed KatieWoe closed 5 years ago
Nice catch @KatieWoe.
Seems like the dialog itself probably needs a maxWidth. I think we could let it get pretty wide, so long as it has a few px padding between the dialog and the layoutBounds, so perhaps 1004 px would be appropriate?
I did a "quick and dirty" fix for this where I limited the width of the content node in the RIAW sim code. However, it seems like it would be better to do this generally so that KeyboardHelpDialog
is automatically limited to the dev bounds. Assigning to @jessegreenberg, since he was the original author of KeyboardHelpDialog
, to determine if this is viable.
Note to self: Whether we keep the quick fix described in the previous comment or integrate a more general solution, it will need to be propagated to the 1.6 release branch.
Thanks @jbphet the above commit looks reasonable to me. It seems like most PhET dialogs assume that their content is limited to dev bounds. This may be larger than just the KeyboardHelpDialog and I made the above issue to investigate.
Update: We have a couple of options in https://github.com/phetsims/joist/issues/546 and we are narrowing in on a general solution for this. It is pending review. @jbphet we will let you know when this is ready.
OK, we have a general fix for this in https://github.com/phetsims/joist/issues/546 and this is the joist commit to pull into the release: https://github.com/phetsims/joist/commit/428b7a2d985fd7918e0dbf2c9025d34b724db9db.
No longer on hold, @jbphet back to you, but let me know if I can help.
I've moved this to the 1.6 branch so the fix should appear in v1.6.0-rc.3.
This looks good 1.6.0-rc.3
In https://github.com/phetsims/sun/issues/435 we decided that there wasn't a general solution for this, and the layoutStrategy added to KeyboardHelpDialog was removed. maxWidth should be set on the HelpContent text instead. Reopening to do so.
I added nested options to SliderControlsHelpContent and GeneralNavigationHelpContent and used in the above commit, so the dialog is limited to the dev bounds.
This has aligned the sim with the decision in https://github.com/phetsims/sun/issues/435, but I do not think any further changes need to be propagated to the release branch, so closing.
Test device: Dell Operating System: Win 8.1 and 10 Browser: Chrome Problem description: For https://github.com/phetsims/QA/issues/239 The keyboardNav dialog can become large enough to slightly exceed bounds. This is most easily seen by using stringTest=long and dev query parameters together. It can also be seen by resizing the window of the sim. It does not seriously exceed bounds, and the X is still entirely in frame. Steps to reproduce:
Screenshots:![outsidedev](https://user-images.githubusercontent.com/41024075/50122732-28990400-021b-11e9-91a6-77dcef6fe81a.PNG)
Troubleshooting information (do not edit):