Open pixelzoom opened 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)
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...
A couple of additional questions:
Do we need a way to opt-out of the "assets" field? For example, we may have an image file that has no asset because it was acquired from a clipart library.
Do other resource types have assets? How is PhET keeping track of the assets that were used to create .mp3 sound files?
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.
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 breakgrunt modulify
, this could be a WARNING message.