Skip to content

Remove titles from SVG files - Fixes #2225 #2226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 18, 2023

Conversation

lindapaiste
Copy link
Collaborator

Fixes #2225

Changes:

  • Primary purpose of this PR:
    • Removed <title> tags from all svg files.
  • Changes to components:
    • Copied the translated aria-label text to a title attribute for a few icon buttons: play, stop, preferences, folder open/close. This will show up in a tooltip when the button is hovered. I'm not sure if we actually want this?
  • Additional cleanup of SVG files:
    • Removed software tags like <desc>Created with Sketch.</desc> and <!-- Generator: Sketch 47 (45396) - http://www.bohemiancoding.com/sketch -->.
    • Removed empty <defs></defs>.
    • Collapsed multiple group (<g>) tags into one for some files.
    • For triangles, I removed all of the nested transforms and wrote the three points relative to to root viewbox.
    • In some cases I removed the hard-coded color and replaced it with currentColor since we override the color via CSS anyway. I can roll this back if we want to keep the intrinsic color. It only matters for files which we load using the ?byUrl approach, as those will have the color that is specified in the .svg file.

You'll understand the differences in svgs better if you click the <> button to "Display the source diff".

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123

Copy link
Collaborator

@raclim raclim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your work on these changes!

@raclim raclim merged commit 8951ddf into processing:develop Jul 18, 2023
@lindapaiste lindapaiste deleted the fix/svg-titles branch July 23, 2023 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unhelpful tooltip "Triangle"
2 participants