Closed RVieyra closed 1 year ago
I like the idea! I agree with this being added. It doesn't require any changes in the design because it is the same number. Just all the L will change to dm^3. Even in the translation utility, I think the Italian can change the L for dm^3, but I think is better to have a quarry parameter for that. No sure what are the actions that I need to do to continue with this plan.
Hi Diana,
To be clear, we are hoping for having the two options within the simulation, so people could toggle between the two.
I agree with @kathy-phet that we should not use the Translation Utility to modify units, so if any other translator asks, let's tell them to not make unit changes there.
Density will likely be republished with PhET-iO in the near-ish future, so I think it would be good to consider how to address this request. This looks like a pretty straightforward case of adding a control to the Preferences dialog with a corresponding query parameter.
Beer's Law Lab is a recent example of this. The Preferences dialog contains controls for beaker and concentration meter units, which are respectively settable with the beakerUnits
and concentrationMeterUnits
query parameters.
For Density, we could have a RadioButtonGroup called "Volume Units" with options of L and dm3. The corresponding query parameter could be volumeUnits
. I'm not sure value we would use for dm3, here are few options:
cubicDecimeters
dmCubed
decimetersCubed
@DianaTavares what do you think?
Love the idea! And I like the option of decimetersCubed
. It is large but very explicit.
Do I have to do something else to go with this?
Discussed with @DianaTavares and @jonathanolson yesterday and we decided to include this feature in the 1.1 release.
[x] Add Volume Units control to the Simulation tab of the Preferences dialog
[x] Create volumeUnits
query parameter that accepts values liters
(default) and decimetersCubed
.
[x] The Volume Units control and underlying property (let's call it volumeUnitsProperty
) should be instrumented. Concentration is a good example of this. The properties powering the Preferences can be found in the tree under global.model.preferences
.
[x] volumeUnitsProperty
should be phetioFeatured: true
. This can be done internally in sim code or by manually adding it to the overrides file. (As of https://github.com/phetsims/phet-io/issues/1873#issuecomment-1460709508, we're moving away from overrides and internalizing phetioFeatured, so I think either method is fine.)
Note: Usually I'd create string patterns that just took units, but I'm having to duplicate a lot of strings so that we don't lose those in translations after the updates.
It also looks like it might link multiple string Properties to things when only one is used.
Some layout issues in Buoyancy that might require some design work.
Initial implementation done. @arouinfar and @DianaTavares can you see how this looks?
@jonathanolson I reviewed Density and Buoyancy on master and the behavior matches everything I asked for in https://github.com/phetsims/density/issues/147#issuecomment-1487332934, thanks! The tree structure looks good, as do the links back to the stringProperties.
Some layout issues in Buoyancy that might require some design work.
I think this issue existed before this change. There is some overlap for L, but it definitely gets worse in dm3. We can probably optimize the maxWidth
for the L case, and live with dm3 shrinking a bit.
I look amazing @jonathanolson the density readout in buoyancy is going to change its place (here is the issue related with it: https://github.com/phetsims/buoyancy/issues/32) and in this new place, the change of units will not be a problem.
Then we can close this issue!
I re-open because I don't know what is the next steps:
I re-open because I don't know what is the next steps:
Now the sim needs to be republished?
Yes, we need to republish the simulation so users can use this new feature. We are planning to republish Density with PhET-iO in the near future, and we will also republish the standard phet-brand version as part of that process. I'll tag this issue as fixed-awaiting-deploy
so we don't lose track of it.
I can update the teacher tips, but once the sim is re-published
Great idea! I'll open a separate issue for that.
After discussing with @arouinfar on slack, beakerUnitsControl
should be volumeUnitsControl
.
Tagging https://github.com/phetsims/qa/issues/930 since there are change requests.
Done above, @arouinfar does that look good?
Looks good, thanks @jonathanolson!
Diana,
I have spoken with @kathy-phet based on some user feedback from Europe (Italy, specifically), in which density is regularly reported as kg/m^3, not kg/L. Kg/m^3 would produce numbers far too small for this sim, but kg/dm^3 is a better option that is more in line with Italian norms.
@kathy-phet would like to ask the design team to consider adding kg/dm^3 as a second option for units within this sim as part of the PhET iO update later this year.
Please let me know if you have any questions.