phetsims / joist

Joist is the main framework for PhET Interactive Simulations. Joist creates and displays the simulation content, home screen, navigation bar, About dialog, enables switching between tabs, and other framework-related features.
MIT License
8 stars 6 forks source link

number-suite-common/CarouselItemNode could maybe be used in place of LanguageSelectionNode #908

Open chrisklus opened 1 year ago

chrisklus commented 1 year ago

When working on https://github.com/phetsims/number-suite-common/issues/47, I needed a selection node like joist/LanguageSelectionNode that could be used for selecting languages OR voices. I also needed one that was a consistent width for use in a carousel so the touch area spanned the width of the carousel. Also, it looks like the non-consistent width of LanguageSelectionNode is what's causing https://github.com/phetsims/joist/issues/900.

With @pixelzoom's advice I ended up making CarouselItemNode (which mostly comes from LanguageSelectionNode), which generalizes the input type so it can be used for selecting a language or a voice. It also has a fixed width, which could easily be converted to a parameter. I considered moving this to joist and using it as parent class or something for LanguageSelectionNode, but @pixelzoom and I were thinking that the Localization panel is still temporary and there's a lot of design work happening in preferences so best to keep things separate for now.

Tagging @jessegreenberg and @marlitas so you're aware CarouselItemNode is available to be moved to joist if desirable.