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

Rename SimColorProfile.js files to SimColors.js #686

Closed
samreid opened this issue Jul 19, 2021 · 6 comments
Closed

Rename SimColorProfile.js files to SimColors.js #686

samreid opened this issue Jul 19, 2021 · 6 comments

Comments

@samreid
Copy link
Member

samreid commented Jul 19, 2021

From #515, we would like to rename sim color files to be SimColors.js instead of SimColorProfile.js. #515 is getting a bit long, so I moved this to a side issue.

@samreid samreid self-assigned this Jul 19, 2021
samreid added a commit to phetsims/simula-rasa that referenced this issue Jul 19, 2021
@samreid
Copy link
Member Author

samreid commented Jul 19, 2021

In the above commit, the docs are pointing to the old style ColorProfile.js names, I decided to make it consistent until we can address all occurrences.

@samreid
Copy link
Member Author

samreid commented Jul 27, 2021

@pixelzoom said in #515 (comment)

I'd like to shed the "ColorProfile" baggage, and call this file MyRepoColors.js. And I intend to put both ColorDef and ProfileColorProperty instances in this file.

@samreid
Copy link
Member Author

samreid commented Jul 28, 2021

call this file MyRepoColors.js

Before I work on converting these files, can we decide on the casing? Should it be myRepoColors.js or MyRepoColors.js?

@samreid samreid assigned pixelzoom and unassigned samreid Jul 28, 2021
@pixelzoom
Copy link
Contributor

pixelzoom commented Jul 28, 2021

Here's what I (mostly) see being done across the PhET code base. We've never formalized this, but I think it makes sense.

  • If the file exports an instance of a class (has a constructor), then it's a singleton, and use lowercase. Like soundManager.js.

  • If the file exports an object literal that's a collection of constants, use uppercase, e.g. MyRepoConstants.js.

What we're doing here for colors feels like the latter, so MyRepoColors.js.

@pixelzoom pixelzoom assigned samreid and unassigned pixelzoom Jul 28, 2021
samreid added a commit to phetsims/area-model-common that referenced this issue Jul 28, 2021
samreid added a commit to phetsims/area-model-common that referenced this issue Jul 28, 2021
samreid added a commit to phetsims/blackbody-spectrum that referenced this issue Jul 28, 2021
samreid added a commit to phetsims/build-a-nucleus that referenced this issue Jul 28, 2021
samreid added a commit to phetsims/charges-and-fields that referenced this issue Jul 28, 2021
samreid added a commit to phetsims/density-buoyancy-common that referenced this issue Jul 28, 2021
samreid added a commit to phetsims/build-a-fraction that referenced this issue Jul 28, 2021
samreid added a commit to phetsims/fractions-mixed-numbers that referenced this issue Jul 28, 2021
samreid added a commit to phetsims/fractions-common that referenced this issue Jul 28, 2021
samreid added a commit to phetsims/fractions-intro that referenced this issue Jul 28, 2021
samreid added a commit to phetsims/fractions-equality that referenced this issue Jul 28, 2021
samreid added a commit to phetsims/geometric-optics that referenced this issue Jul 28, 2021
samreid added a commit to phetsims/gravity-and-orbits that referenced this issue Jul 28, 2021
samreid added a commit to phetsims/masses-and-springs-basics that referenced this issue Jul 28, 2021
samreid added a commit to phetsims/masses-and-springs that referenced this issue Jul 28, 2021
samreid added a commit to phetsims/molecule-shapes that referenced this issue Jul 28, 2021
samreid added a commit to phetsims/number-line-distance that referenced this issue Jul 28, 2021
samreid added a commit to phetsims/proportion-playground that referenced this issue Jul 28, 2021
samreid added a commit to phetsims/ratio-and-proportion that referenced this issue Jul 28, 2021
samreid added a commit to phetsims/rutherford-scattering that referenced this issue Jul 28, 2021
samreid added a commit to phetsims/states-of-matter that referenced this issue Jul 28, 2021
@samreid
Copy link
Member Author

samreid commented Jul 28, 2021

OK I renamed files to SimColors.js. @pixelzoom would you like to spot check?

@pixelzoom
Copy link
Contributor

👍🏻 closing.

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

No branches or pull requests

2 participants