phetsims / density

"Density" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
0 stars 6 forks source link

Add 2nd Unit Option for European Locale #147

Closed RVieyra closed 1 year ago

RVieyra commented 2 years ago

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.

DianaTavares commented 2 years 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.

RVieyra commented 2 years ago

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.

arouinfar commented 1 year ago

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.

image

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:

@DianaTavares what do you think?

DianaTavares commented 1 year ago

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?

arouinfar commented 1 year ago

Discussed with @DianaTavares and @jonathanolson yesterday and we decided to include this feature in the 1.1 release.

jonathanolson commented 1 year ago

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.

jonathanolson commented 1 year ago

It also looks like it might link multiple string Properties to things when only one is used.

jonathanolson commented 1 year ago
image

Some layout issues in Buoyancy that might require some design work.

jonathanolson commented 1 year ago

Initial implementation done. @arouinfar and @DianaTavares can you see how this looks?

arouinfar commented 1 year ago

@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.

DianaTavares commented 1 year ago

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. image

Then we can close this issue!

DianaTavares commented 1 year ago

I re-open because I don't know what is the next steps:

arouinfar commented 1 year ago

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.

Nancy-Salpepi commented 1 year ago

After discussing with @arouinfar on slack, beakerUnitsControl should be volumeUnitsControl.

Screenshot 2023-04-20 at 2 23 11 PM
arouinfar commented 1 year ago

Tagging https://github.com/phetsims/qa/issues/930 since there are change requests.

jonathanolson commented 1 year ago

Done above, @arouinfar does that look good?

arouinfar commented 1 year ago

Looks good, thanks @jonathanolson!