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

make Home Screen gracefully handle larger numbers of screens #470

Closed
pixelzoom opened this issue Jan 30, 2018 · 24 comments
Closed

make Home Screen gracefully handle larger numbers of screens #470

pixelzoom opened this issue Jan 30, 2018 · 24 comments

Comments

@pixelzoom
Copy link
Contributor

With the addition of the Mystery screen (see phetsims/equality-explorer#34) Equality Explorer is likely to be PhET's first 5-screen sim. After adding a skeleton for this 5th screen, I noticed that the home screen then adds more space to the left and right of the home screen icons, shrinking them further than necessary. Compare screenshots below for 4-screen and 5-screen sims.

I looked at the implementation of HomeScreenView, and couldn't immediately determine how to fix this. I'm guessing that someone decided that a sim would never have > 4 screens, and therefore didn't make the implementation scale gracefully/consistently. Not surprisingly, HomeScreenView doesn't make use of scenery's maxWidth (since it's a newer feature), but that would be a good place to start. And HomeScreenView has several magic numbers - 60, 33, 170 - that should be derived from LAYOUT_BOUNDS.

If we're going to gracefully handle larger numbers of screens, then we might also look at what it would take to have more than 1 row of icons on the home screen.

I don't have time for this diversion right now. But it may need to be addressed before Equality Explorer 1.0.0 is published. Assigning to @ariel-phet to prioritize and assign.

@pixelzoom
Copy link
Contributor Author

screenshot_473

screenshot_474

@pixelzoom
Copy link
Contributor Author

Equality Explorer actually has a 6th screen that I use for debugging/testing. It's enabled with the ?xy query parameter. See screenshot below. This demonstrates that as the number of screens increases, the left/right margins increase.

screenshot_476

@pixelzoom
Copy link
Contributor Author

I started increasing the number of screens to see how gracefully the home screen handles things.

Things look sane up to 7 screens:

screenshot_478

At 8 screens, things go terribly wrong:

screenshot_479

There's no reason for this behavior, things should just scale gracefully.

@ariel-phet
Copy link

@jonathanolson said this would only be 4'ish hours of work plus time for testing. Assigning at medium priority.

@pixelzoom feel free to ping me on this issue in a couple of weeks if it is starting to become pressing. Probably won't be worked on for about 2 weeks.

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Mar 26, 2018

@ariel-phet ping. Equality Explorer is definitely a 5-screen sim, and this needs to be addressed before publishing.

@ariel-phet
Copy link

I have asked @jonathanolson to put this work at the top of his ToDo list for the start of April.

@jonathanolson
Copy link
Contributor

Should things just scale down (keeping the relative padding)?
Should the padding also potentially be reduced between items?
How should the sizes of the selected vs unselected icons be?

@ariel-phet, should I wait on a decision potentially about this, or go with my best judgment? (I would prefer the padding to be proportional to the size of the icons, that the relative proportion between selected/unselected should stay the same, and things should just scale down based on that)

@pixelzoom
Copy link
Contributor Author

It looks like there's been an attempt to keep the size of the selected icon constant, regardless of the number of screens. If that's the case... Then I would think that the size of the unselected icons and the amount of space between them would be scaled to fit the remaining horizontal space.

@ariel-phet
Copy link

@jonathanolson I think right now, up to 5 screen icons, the selected icon should stay the same size as now, and the other icons should shrink as needed.

After 5 screens (I will push very hard for PhET to never have more than 5 screens in a sim...) lets go with the plan you suggest in the preceding comment (things just scale down).

@jonathanolson
Copy link
Contributor

Initial commit above. Before I refine things and pin numbers to proportions of the layout bounds, can you confirm that this is the desired (or at least acceptable) visual appearance?

homescreen-2
homescreen-3
homescreen-4
homescreen-5
homescreen-6
homescreen-7
homescreen-8

@ariel-phet
Copy link

@jonathanolson, yes all look good in previous comment

@pixelzoom
Copy link
Contributor Author

Labeling as "block-production". This issue must be closed before Equality Explorer can start RC testing, scheduled to begin 7/11/18.

@samreid
Copy link
Member

samreid commented Jul 19, 2018

@jonathanolson said this can be patched in before M&S RC. He volunteered to do the patch.

@ariel-phet said after this patch is ready, the sim is ready for RC.

@samreid samreid assigned jonathanolson and unassigned ariel-phet Jul 19, 2018
jonathanolson added a commit that referenced this issue Jul 25, 2018
jonathanolson added a commit to phetsims/balloons-and-static-electricity that referenced this issue Jul 25, 2018
jonathanolson added a commit to phetsims/equality-explorer that referenced this issue Jul 25, 2018
jonathanolson added a commit to phetsims/equality-explorer-basics that referenced this issue Jul 25, 2018
jonathanolson added a commit to phetsims/equality-explorer-two-variables that referenced this issue Jul 25, 2018
jonathanolson added a commit to phetsims/balloons-and-static-electricity that referenced this issue Jul 25, 2018
jonathanolson added a commit to phetsims/equality-explorer that referenced this issue Jul 25, 2018
jonathanolson added a commit to phetsims/equality-explorer-basics that referenced this issue Jul 25, 2018
jonathanolson added a commit to phetsims/equality-explorer-two-variables that referenced this issue Jul 25, 2018
jonathanolson added a commit that referenced this issue Jul 25, 2018
jonathanolson added a commit to phetsims/masses-and-springs that referenced this issue Jul 25, 2018
@jonathanolson
Copy link
Contributor

@Denz1994 I applied the patch to masses-and-springs' 1.0 branch.

@Denz1994
Copy link
Contributor

Thanks for the patch @jonathanolson. This is resolved in masses-and-springs master branch aswell. Closing.

jonathanolson added a commit to phetsims/balloons-and-static-electricity that referenced this issue Aug 8, 2018
jonathanolson added a commit to phetsims/equality-explorer that referenced this issue Aug 8, 2018
jonathanolson added a commit to phetsims/equality-explorer-basics that referenced this issue Aug 8, 2018
jonathanolson added a commit to phetsims/equality-explorer-two-variables that referenced this issue Aug 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants