phetsims / sun

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

Should Carousel extend Sizable? #868

Closed marlitas closed 2 weeks ago

marlitas commented 7 months ago

While working on dynamic locale for Balancing Act I noticed that Carousel does not support Sizable options such as stretch.

Carousel does have it's own LayoutConstraint that seems to be handling dynamic text changes, but I then wondered if it would be possible to go another step forward and have Carousel extend Sizable completely so that it is able to make use of all the features Sizable provides.

Carousel is a complex component so I imagine this will need more research and is currently out of my scope, but may be an appropriate issue to look up when Dynamic Layout work is prioritized again.

pixelzoom commented 2 weeks ago

@jonathanolson and I talked about this. If there's no immediately problem to be addressed (for Balancing Act?) I would defer this. There are a significant number of sims using Carousel, making changes costly to test. And I suspect you'll find that some sims are doing some questionable things to work around Carousel problems, or add sim-specific functionality. In which case you may need to make changes to sim code.

jonathanolson commented 2 weeks ago

It looks like Carousel in its current form works for our current needs. If we NEED to make Carousel take preferred width/height, we'll be able to tackle that in the future. Adding notes to Carousel, and closing.