Closed DianaTavares closed 1 month ago
The above commit improves on this panel. Still missing:
Added to the preferences dialog, noting to change the default to false in DensityBuoyancyCommonQueryParameters before moving on (or move on and remember way down the line, it's okay)
I was just taking a look at the new and improved ReadoutListAccordionBox. I love it! I really like how much we can factor out with setReadout. I believe we can make things much simpler and more suave with a parametric type. If we have a list that can be typesafe, we may be able to move some of the implementation of setReadout to the supertype.
Basic outline:
ReadoutListAccordionBox<T>
uses CustomReadoutObjectlist: T[]
.DensityAccordionBox extends ReadoutListAccordionBox<TReadOnlyProperty<Material>>
SubmergedAccordionBox extends ReadoutListAccordionBox<Mass>
options.list
and we have type safety about it. Not sure how helpful this will be, but let's chat.I'd just like to think about if this would be helpful. Let's talk about it tomorrow.
@zepumph this question comes up often and I think the answer is always to leave the other components floating there. The same happened multiple times in MSS and Keplers. I would check off that item.
First pass of submerged and density panels were added to the intro screen over in https://github.com/phetsims/buoyancy/issues/96 (see https://github.com/phetsims/buoyancy/issues/96#issuecomment-1996002214 for next steps there).
Moved the Second Mass button group to the corner of the screen, next to reset all button. Now when there're two masses it isn't obstructed, but the panels are still too close to the buttons for my liking. According to https://github.com/phetsims/buoyancy/issues/32 they should be somewhere else but I'm still discussing with Diana about that position, just wanted them not overlapping for now, and now we know what's the function in charge of positioning that button group.
Please note that I too am making changes to ReadoutAccordionBox over in https://github.com/phetsims/buoyancy/issues/96 (AV and I have discussed this, but I'm adding a paper trail).
This issue has been getting some commits that probably rather belong in https://github.com/phetsims/density-buoyancy-common/issues/105
Assigning this issue back to @DianaTavares to check if the Submerged Accordion Box is ready. In that case, please close.
@DianaTavares I believe you can still rework on the review in Buoyancy.
Cool! I have some comments:
In the intro:
I think is better if these panels are close to the ground (like the mockup)
and that the panels to have the same size that in the other screens. This is the picture of Explore:
where is the panel in the application screens? In the first message, I included the mockups
In Buoyancy (not the basics), the %submerged needs to be by default in the preference as “hide”, and in basics need to be by default close.
I believe that we are having trouble with the new Property for tracking submerged. On CT is seems like we are trying to set it NaN sometimes. Can you take a look?
@DianaTavares Please note that this feature is not working when gravity is 0. See https://github.com/phetsims/buoyancy/issues/124
On our way to close this monster issue. Creating issues for the remaining work:
Reopening because there is a TODO marked for this issue.
Ha, we were so close! Unfortunately both of those TODOs seem good to discuss. @AgustinVallejo let's talk about them.
Addressed the colorProperty TODO in the above commit, while improving the way those custom explore options were mapped. Left the other one open since I'd like to discuss: As we're returning that pattern conditionally, I'm not sure if creating a PatternStringProperty right there is the right way to go, or would cause memory leaks.
To add this panel, first #32 needs to be solved.
Preference to show/hide this feature in the Simulation Panel Title: Percent submerged readout Query Parameter: percentSubmergedReadout Default true in Basics, Default false in full Buoyancy
Here are the mockups of its position in each screen:
Intro
Explore
Shapes
Bottle Observe how, as this is the only object on the screen, the number is bigger and centered:
Boat Observe that the name in the panel said "% Boat submerged" because in this case, we want to know the percentage of the boat and not the block.