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

use ColorProfile in all new sims #642

Closed
2 of 3 tasks
pixelzoom opened this issue Nov 12, 2020 · 10 comments
Closed
2 of 3 tasks

use ColorProfile in all new sims #642

pixelzoom opened this issue Nov 12, 2020 · 10 comments
Assignees

Comments

@pixelzoom
Copy link
Contributor

pixelzoom commented Nov 12, 2020

While discussing phetsims/fourier-making-waves#5, @kathy-phet asked me to create this issue and label it for discussion at design meeting.

It was proposed that all new sims should use ColorProfile, regardless of whether they currently only have 1 profile. This will facilitate future needs for PhET-iO (e.g. mutable color Properties) and a11y (e.g. high-contract profile).

If this is adopted, then:

  • It should probably be added to the CRC
  • simula-rasa should create a default ColorProfile
  • Generate {{REPO}}-colors.html for all new sims
@arouinfar
Copy link

Having a ColorProfile also makes it much simpler for designers to play with colors on a local copy.

@zepumph
Copy link
Member

zepumph commented Dec 3, 2020

At dev meeting today, we decided that this makes sense. Every sim will have a color profile.

We didn't feel like every single color in the sim needed to run on this though. For example every Text fill. But if you feel like designers may want to play around with colors, or if PhET-iO may want clients to customize colors.

@samreid wondered if there was some amount that is over-doing this, for example 30 matches of stroke: in natural selection. From the looks of that search though, many/most are already factored out to color constants.

@pixelzoom will take care of the automating steps above. @ariel-phet doesn't want this in the CRC at the moment.

@pixelzoom
Copy link
Contributor Author

Summary of the above commits:

  • replaced SimulaRasasColors.js with SimulaRasaColorProfile.js
  • added "colorProfile": true, to package.json
  • ran grunt update to update simula-rasa_en.html and create simula-rasa-colors.html

To test, I created a new repo using these commands:

% cd perennial
% grunt create-sim --repo="foo" --author="PixelZoom" --title="Foo"

.. then tested foo_en.html and foo-colors.html in Chrome.

@ariel-phet please assign someone to review, or close if you don't feel that it needs to be reviewed.

@ariel-phet
Copy link

@pixelzoom I think we can go without review here. Thanks for moving this issue forward!

@pixelzoom
Copy link
Contributor Author

Reopening.

This new policy is not being followed. So we decided to add an item to the master checklist, and to the CRC. I'll handle that.

@pixelzoom pixelzoom reopened this Jul 2, 2021
@pixelzoom pixelzoom assigned pixelzoom and unassigned ariel-phet Jul 2, 2021
pixelzoom added a commit to phetsims/phet-info that referenced this issue Jul 6, 2021
pixelzoom added a commit to phetsims/simula-rasa that referenced this issue Jul 6, 2021
@pixelzoom
Copy link
Contributor Author

Since grunt create-sim creates a sim with {{Prefix}}ColorProfile.js, I didn't see the point in adding this to the master checklist. I added doc in SimulaRaseColoProfile.js noting that ColorProfile is required, and referencing this issue.

In the CRC, I added an item to the "Repository Structure" section, the same section that include {{PREFIX}}QueryParameters.js.

Closing.

@samreid
Copy link
Member

samreid commented Jul 6, 2021

I didn't see the point in adding this to the master checklist.

What about the following cases?

  • Reviewing a sim that predates simula-rasa? Would we want to check on the ColorProfile support?
  • What about a sim that was built with a modern simula-rasa, but the developer hasn't embraced ColorProfile appropriately? (i.e. it has the ColorProfile file, but it isn't used properly)?

Would we want this to be called out in the checklist for a while, at least until enough developers get in the habit? Or would we just expect developers to check on this during the normal review process anyways?

@samreid samreid reopened this Jul 6, 2021
@zepumph
Copy link
Member

zepumph commented Jul 6, 2021

In both of those cases, wouldn't the CRC be the spot in which things were checked on? Updating the master checklist in either of those cases wouldn't help because likely either of those would already have a copied snapshot of that checklist in the first issue in that repo. Maybe instead @samreid you are noting that we should eagerly look into places where we should have a colorProfile in sims that currently don't. What about a dev meeting where we all take a few minutes to see if we individually are working on a sim in which this should be added?

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Jul 6, 2021

This requirement was discussed thoroughly as dev meetings, and it has since been announced on dev-public a couple of times. Anyone who didn't get the message is not paying attention.

Furthermore, a developer who creates a new sim without a ColorProfile is either not running grunt create-sim (violating the master checklist) or is deleting the default ColorProfile that gets created by grunt create-sim. So if they're already ignoring the master checklist, or deleting something that is clearly documented as "this is required", then I don't think that adding more things to the master checklist is going to help them.

Also note that ColorProfile was requested by designers, see #642 (comment). So if a sim somehow gets all the way to code review without a ColorProfile, then either no one had a reason to use colors.html, or they figured that the sim didn't support it and didn't ask for it. Either way, something is wrong.

@samreid
Copy link
Member

samreid commented Jul 7, 2021

CRC commit phetsims/phet-info@bb048da seems like a good level of detail to me, I don't have any other recommendations for this issue, re-closing.

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

5 participants