Closed arouinfar closed 2 years ago
@samreid, can you take the lead on this since you are working on this with CCK? Let me know if you would like assistance.
I completed all the requests above except for:
If possible, make pageControl a child of carousel.
There is difficulty in this request, since PageControl can be used to control any item and Carousel doesn't define how PageControl layout works. Here are some options:
My recommendation is that the current implementation is very flexible. Showing the page control outside of the carousel tandem seems reasonable to me, since they are side by side. We could introduce a carouselContainer node that contains both if the user needs one shutoff valve. But also, I don't think it's too much to ask a client to hide the carousel and the page controls if that is the desired behavior.
Ready for review and discussion.
@samreid I reviewed in CCK:DC, and the carousel looks great! Thanks for providing more context around PageControl. I don't think we should force it anywhere or wire it up in an unorthodox way.
We could introduce a carouselContainer node that contains both if the user needs one shutoff valve.
Currently carousel
and pageControl
are both children of circuitElementToolbox
. Can we create circuitElementToolbox.visibleProperty
?
In the commit, I instrumented circuitElementToolbox
and additionally featured its visibleProperty
. Let me know if that last part is not desired or if it should be in the overrides. Otherwise, ready for review and please close if all is well.
Thanks @samreid. I think circuitElementToolbox.visibleProperty
looks good, and it should certainly be phetioFeatured: true
. It seems appropriate to handle in the overrides since it is sim-specific, but I'll leave that up to you.
Sounds good, thanks! I also noted that the phetioFeatured: true
is advantageous in the code since circuit-construction-kit-common
is used by several sims. Closing.
Related to https://github.com/phetsims/circuit-construction-kit-common/issues/513
Here's an example of what carousel currently looks like in CCK: DC:
Questions:
balancingAct.balanceLabScreen.view.massCarousel.brickStackCreatorNode1
). However, I'm not sure, since that sim is ancient PhET-iO and possibly a non-standard carousel to boot.pageControl
is not a child of thecarousel
? You can hide the carousel, but leave behind the dots which seems very weird to me.Long-term wishlist:
Desired changes:
carousel.visibleProperty
phetioFeatured: true by defaultcarousel.pageNumberProperty
phetioFeatured: true by defaultcarousel.nextButton.enabledProperty
andcarousel.previousButton.enabledProperty
should be phetioReadOnly: true (otherwise causes problems like https://github.com/phetsims/circuit-construction-kit-common/issues/844 and https://github.com/phetsims/circuit-construction-kit-common/issues/848)carousel.nextButton.enabledProperty
andcarousel.previousButton.enabledProperty
phetioFeatured: false by default. I know they inherit the phetioFeatured behavior from buttons, but in this case, it doesn't make sense to feature something that is read-only. If this can't be done within carousel itself, designers can un-feature it in the overrides instead.pageControl
a child ofcarousel
.pageControl.visibleProperty
phetioFeatured: true by defaultvisibleProperty
of each Node within the carousel phetioFeatured: true by default. (If this is a sim-specific thing, designers can handle it in the overrides.)Assigning to @zepumph and @samreid. Happy to discuss further on a call or at PhET-iO meeting if these requests are unclear/unreasonable.