Closed zepumph closed 1 month ago
I'll take a look at this. Self-assigning.
I recommend a solution like this:
@zepumph does this look good? Feel free to commit or let me know if I should.
@samreid and I got to a commit point. Using packageJSON.name
was such a nicer way to handle this than anything I was going to recommend. We also cleaned up how the preference is managed, since it was added to density
too.
@DianaTavares, the behavior is now as follows:
Please review and feel free to close.
Thanks team!
The behavior is correct! But in Buoyancy basics, yes the panel is on in the preference menu, but
Like this:
Basics don't have the “compare” screen, but there also the % submerged panel is on, but close by default.
Currently we don't actually have any code implemented for buoyancy basics. This is just an exact copy of the buoyancy explore screen. I wonder if we can add this to a list for when we implement the buoyancy basics sim.
Wait. In Buoyancy, should the panel default to closed also?
From https://github.com/phetsims/buoyancy/issues/112. We need to be able to toggle the default of this preference based on the sim running. In Buoyancy we want the preference to default off (not showing the panel), then in buoyancy basics we do want it by default. The query parameter should still override these defaults though, so we many need to outfit a null/true/false value so we know if the query parameter was provided. Another idea is to just use
QueryStringMachine.containsKey()
to know if the value was provided vs is the default.