phetsims / sun

User-interface components for PhET simulations, built on top of Scenery.
MIT License
4 stars 12 forks source link

Unused and poorly-documented options that were added to SliderOptions #815

Closed pixelzoom closed 1 year ago

pixelzoom commented 1 year ago

In https://github.com/phetsims/sun/commit/3530d7a148a9dc2fd44f285e9eccefce5936a86e for https://github.com/phetsims/mean-share-and-balance/issues/23, @samreid and @marlitas added these fields to SliderOptions:

      trackPickable: true,

       // By default, tracks dilate the bounds of the track to accommodate layout issues
       trackBoundsDilation: true,

trackBoundsDilation is unused within Slider, unused by any clients, and it's documentation is not at all helpfu. What "layout issues"? Why does it exist? Should it be deleted? If not deleted, describe what "layout issues" this is meant to solve, and when it's useful to set to false.

trackPickable was added with no documentation. Please add documentation, describing when it's appropriate to set to false.

marlitas commented 1 year ago

trackBoundsDilation was introduced as a fix prior to when slider was made sizable. It is no longer needed with the new layout functionality so I removed it from options and code usage.

Documentation was added for trackPickable. @pixelzoom back to you. Feel free to close if all looks good.

pixelzoom commented 1 year ago

👍🏻 closing