phetsims / center-and-variability

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

Add minimum height to the range rectangle in info box #345

Closed catherinecarter closed 1 year ago

catherinecarter commented 1 year ago

The height of the rectangle in the info box (for Range) is disproportionately small compared to the height of the rectangle in the accordion box, and the space between the Range value on the left and the range value above the rectangle is very large. Let's put a minimum height on that rectangle so it looks more proportional. Not sure how big to make it, maybe 2.5 times higher?

image
matthew-blackman commented 1 year ago

Ready for design review @catherinecarter!

catherinecarter commented 1 year ago

It looks really good when the data points are very spread out, as in the case of a maximum height of 1 ball, like this:

image

When there are two or more balls in a stack, though, the same feeling of disproportionate exists since the rectangle becomes closer to the top of the stack, making the rectangle actually feel smaller, like this:

image

Or this:

image

Can we add a consistent padding above the top marker so the height of the rectangle feels less crowded (maybe 2 ball markers)? Looking at the above pics and the ones below, the spacing between the top of the plot marker (x or dot) and the top of the rectangle seems inconsistent: image image image image

matthew-blackman commented 1 year ago

Sounds good @catherinecarter - I set the top padding of the rectangle to be the height of 1.5 data points. Let me know if you like it as is or if it should also have a mimimum height for shorter data sets.

matthew-blackman commented 1 year ago

Reviewed with @catherinecarter and noted two things:

  1. The range rectangle still looks short when the data is in a flat layer. We'd like to explore ways that the rectangle can be taller here, to make it less of a difference in height between the accordion box and the info dialog.
  2. We'd like to reopen the discussion about scaling the data points now that the accordion box is taller. If it's possible to show most of the data and have the data points all the same size regardless of maxKicks, we'd like to explore this.

We plan to revisit this issue after resolving the discussion about the size of the data points. Will mark as 'on hold' for now.

matthew-blackman commented 1 year ago

360

marlitas commented 1 year ago

The rectangle padding needs to take into account DATA_POINT_SCALE_PROPERTY. Will pair with @matthew-blackman on this.

marlitas commented 1 year ago

The range rectangle padding was updated. @catherinecarter can you review?

I also tried increasing the scaling of the points, but since we want them to cut off at the halfway point I was a bit limited. If we do want to increase the scale, probably best to do that synchronously. Otherwise if all looks good feel free to close!

catherinecarter commented 1 year ago

I think it looks great. The margin is a little bigger for 30, but not to the point where it needs more tweaking. Ready to close. Thanks, @marlitas!