Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a query parameter for default temperature units #186

Closed
jbphet opened this issue Jun 22, 2022 · 3 comments
Closed

Add a query parameter for default temperature units #186

jbphet opened this issue Jun 22, 2022 · 3 comments
Assignees

Comments

@jbphet
Copy link
Contributor

jbphet commented Jun 22, 2022

This has been done for other sims (I think SOM is an example), so we should do it in a similar way.

@jbphet
Copy link
Contributor Author

jbphet commented Jun 24, 2022

I just looked through the code base, and I'm not finding a precedent for being able to set the units to any of the allowable values. Instead, in state-of-matter and number-line-integers, I'm seeing a parameter called defaultCelsius. For some history relative to states-of-matter, please see phetsims/states-of-matter#216.

I'm going to start of with a different approach here. I'll create a query parameter called defaultTemperatureUnits and will allow it to take 'F', 'C', or 'K' as values, and go from there.

@jbphet
Copy link
Contributor Author

jbphet commented Jun 24, 2022

@arouinfar - This is now implemented as described in the previous comment. It works for the first two screens, but not for the third one, since temperature units control is not yet implemented for that screen. Please check it out, and let me know if this seems like it will work. We can change the query parameter and values if you have thoughts on how to improve it.

@arouinfar
Copy link
Contributor

I'm going to start of with a different approach here. I'll create a query parameter called defaultTemperatureUnits and will allow it to take 'F', 'C', or 'K' as values, and go from there.

This looks great to me @jbphet. I opened up phetsims/states-of-matter#361 to do the same in SOM(B) when it's republished off of master.

I don't think there's anything else we need to do for this issue, since adding a user-facing control to the Options/Preferences dialog is being tracked in #187.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants