There was already some exploration into having a "Notes" field for the Asset Injectors, which was squashed as adding too much complexity to the form.

https://www.drupal.org/project/asset_injector/issues/3232173

I would suggest perhaps some kind of default template that could pre-populate the code field with, so that people could then create docblocks or notations themselves as a facsimile of a notes field.

For example, on our team we use this module mainly for live site hotfixes after a release, and we try to enforce the following comment in the fields to add notes to the hotfix:

/*
Date Added: MM/DD/YYYY
Added By: First Last <email@andrew.cmu.edu>
Requested By: First Last <email@andrew.cmu.edu>
Related Ticket: DPL-XXXX
Affects:
  - itemize pages
  - or "Global"
Dependencies:
  - Other Injected Assets by Name
Explanation:
  - This hotfix will lorem ipsum dolor.
Removal criteria:
  - When can this asset be removed?
*/

-- code goes here after the comment --

This could allow folks to add helpful comments guiding an asset injection, perhaps even some boilerplate templates for JS injections.

Comments

nessthehero created an issue.