phetsims / chipper

Tools for developing and building PhET interactive simulations.
MIT License
11 stars 12 forks source link

Add required "asset" field to images/license.json #1411

Open pixelzoom opened 5 months ago

pixelzoom commented 5 months ago

Historically, PhET has 2 problems with the asset files used to create images:

(1) A corresponding assets/ file (e.g. Illustrator) does not get checked into GitHub. Then sometime in the future, we need to update the image, can't find the original artwork, and need to start over. And there is currently zero support for reminding devs and designers not to create this problem.

(2) It's not always clear which asset file was used to create an image file. There is not (and should not be) a 1:1 correspondence between images and asset files. The asset files sometimes have vague names. So (for example) figuring out which .ai file was used to export a .png file turns into more work than it needs to be. And it can be difficult to even determine if there is a corresponding asset file.

To prevent (1) and improve (2)... How about if we add a required "asset" tag to images/license.json? Its value would point to the asset that was used to create the image. grunt modulify would verify that every entry has an "asset" field, and that the asset file actually exists. So that we don't totally break grunt modulify, this could be a WARNING message.

pixelzoom commented 5 months ago

Posted in Slack#dev-public:

Interested devs and designers, please comment on https://github.com/phetsims/chipper/issues/1411 (Add required “asset” field to images/license.json)

pixelzoom commented 5 months ago

reportMedia.js checks the license files. It looks like grunt modulify is not calling reportMedia, and that is instead deferred until grunt build. That seems way too late -- missing licenses should be reported when the image is added, which is when grunt modulify is run. One new issue coming up...

pixelzoom commented 5 months ago

A couple of additional questions:

pixelzoom commented 5 months ago

I got zero response to this on Slack, and one 👍🏻 here. So I guess it's either not interesting or not a priority. Maybe we'll visit this sometime in the future. In the meantime, unassigning myself.