phetsims / mean-share-and-balance

"Mean: Share and Balance" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
2 stars 1 forks source link

Pencil leaves notepad area #223

Closed marlitas closed 3 months ago

marlitas commented 5 months ago

While doing some testing for https://github.com/phetsims/mean-share-and-balance/issues/221, I noticed that the pencil goes outside of the notepad area in the first two screens.

image image

It seems a bit odd, and we probably want to address that.

marlitas commented 3 months ago

image The line is also extending too far.

marlitas commented 3 months ago

As I was trying to polish this it became clear that the current cup layout logic was going to be difficult to maintain since it was different than the layout logic for the other screens. I went ahead and refactored the cups to have an xPositionProperty that does the layout logic for them. The margins for the predict mean line are now consistent between both screens and this will be easier to maintain in the future.

This would benefit from a code review from @jbphet.

jbphet commented 3 months ago

As the first step in reviewing this I checked the behavior and noticed that the pencil is still protruding a little bit outside the bounds of the notepad. Have we decided that this is okay? It seems fine to me, but thought I should check. The other (left) side of the line looks fine. Screenshots:

image

image

The code changes look good - they seem mostly to consist of changing from a 2D to a 1D position value for the cups, which seems like a good improvement.

Assigning back to @marlitas to respond to the question above. If the current behavior is intentional and what we're after, this can be closed.

amanda-phet commented 3 months ago

It used to stick out fully on the Distribute screen, but I'm not sure what was really better. My only concern with the pencil sticking out is the case where you have the info dialog over it:

image

In this case, I can still grab the pencil and move it. (I also noticed that I can tab to it even when it's not sticking out, so I'll add that to the relevant issue).

marlitas commented 3 months ago

Let's look at the position of the pencil synchronously. I'll mark it with the meeting: design label.

marlitas commented 3 months ago

We met with @amanda-phet and found a margin and notepad width that works for us. Ready to close!