Closed magnusbaeck closed 2 years ago
As some have had problems editing the SVGs maybe we need to state somewhere what tools to use as that is not obvious
For editing the embedded SVGs, you mean? Yes, I wasn't able to find such a tool either. Even if such tools exist, why would we then keep the standalone SVG files? Right now it seems like the intended workflow is to edit the standalone file with any SVG editor and then copy/paste the file's contents it into the HTML file.
Yes, let us not copy the SVG copy into the HTML but inline it instead.
Wait, did you mean "include it instead"? It's the current inlining situation that's problematic.
I was trying to agree with you...
Description
SVG images are currently both inlined in the HTML files (index.html and test-orchestration.html) and stored in discrete files in the svg directory. To make editing easier we should only use the discrete files and include them in the HTML via OBJECT elements (IMG won't work because it doesn't support interactivity like the hyperlinks we use). https://vecta.io/blog/best-way-to-embed-svg and https://stackoverflow.com/questions/4476526/do-i-use-img-object-or-embed-for-svg-files indicate that OBJECT elements work fine for interactive SVGs. A data-include attribute might also work.
Motivation
It's currently tedious to edit the files and there's no automatic mechanism for keeping the copies of data in sync (or checking whether they are in sync).
Exemplification
In #10 I'm going to have to update overview.svg, and as it stands I have to update that file and copy/paste it into index.html (with correct indentation).
Benefits
It'll be much easier to edit the SVG images. Reviews of such changes will also be easier and the risk of mistakes will decrease.
Possible Drawbacks
None I can think of, but I don't know what considerations were done when the current method was chosen. Maybe it was reasonable at the time for backwards compatibility reasons but browsers have moved on since 2016.