Inline SVGs with helper module
Description
Using a basic helper module, this PR resolves most of #5880. To fully conclude that:
- The changeset icons should be extracted too, but the definitions should also be put outside the list. #5884 aims to do part of this without the helper.
- The directions sprite could benefit from another method
InlineSvg.definethat is outside this PR's scope
How has this been tested?
Verifying that the local Rails output matches
Do you want both optimizing svg by micromanaging their attributes and externalizing them as effectively "binary" data? How is that supposed to work at the same time?
Neither.
You already optimized the SVGs when you added them into the templates[^1]. The additional xmlns is only for increased compatibility during development.
Pulling the SVGs out increases the visualizability (file thumbnails you wouldn't get when they're packed into templates) and supports the separation of concerns raised in the original issue.
Just because you understand both SVG internals and layout doesn't mean every contributor should have to. By keeping them separated, layout edits don’t require SVG expertise, and SVG tweaks won’t accidentally break the layout.
[^1]: see, e.g., the original new.svg
Looks good to me, thanks.