✨ (grapher) improve SVG output for manual manipulation #3621
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #3607
Adds labels to SVG groups and elements for more intuitive manual inspection and manipulation.
Figma displays an element's ID as its title. I researched if there is a way to customize this and show something else as an element's title, e.g. a
data-name
attribute or so, but I couldn't find anything. Since it's a bit odd to assign IDs to elements like that, I added amakeIdForHumanConsumption
function that communicates that these IDs are for human inspection only and are not used in code, thus can be safely deleted.I also made an effort to groups elements together, e.g. a tick's line and label is rendered into one group element.
PS: I also fixed this annoyance 👇🏻
Figma screenshot