Skip to content
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

fix(icon): reorder the elements in circle-slash.svg #1938

Conversation

Ffada94
Copy link

@Ffada94 Ffada94 commented Mar 1, 2024

What is the purpose of this pull request?

  • New Icon
  • Bug fix
  • New Feature
  • Documentation update
  • Other:

Description

Adding a fill value to the CircleSlash React component caused the line element to be painted over.

This was due to the ordering of the elements within the SVG. Elements are painted in the order they are listed.

This commit swaps the ordering of the elements.

Before Submitting

Adding a fill value to the circle-slash.svg file caused the line element to be painted over.

This was due to the ordering of the elements within the SVG. 

This commit swaps the ordering of the elements.
@github-actions github-actions bot added the 🎨 icon About new icons label Mar 1, 2024
Copy link

github-actions bot commented Mar 1, 2024

Added or changed icons

icons/circle-slash.svg

Preview cohesion icons/message-square-dot.svg
icons/circle-slash.svg
icons/parking-circle.svg
Preview stroke widths icons/circle-slash.svg
icons/circle-slash.svg
icons/circle-slash.svg
DPI Preview (24px) icons/circle-slash.svg
Icon X-rays icons/circle-slash.svg

Copy link
Member

@jguddas jguddas left a comment

Choose a reason for hiding this comment

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

Oh, that's not something I have thought about.

Currently, the rule is all path elements first and then sort alphabetically.
But maybe there is a better heuristic for sorting?

If we can agree on changing to a better heuristic, we can merge this.

@karsa-mistmere
Copy link
Member

karsa-mistmere commented Mar 2, 2024

Oh, that's not something I have thought about.

Currently, the rule is all path elements first and then sort alphabetically. But maybe there is a better heuristic for sorting?

If we can agree on changing to a better heuristic, we can merge this.

Honestly, I wish your optimization script didn't reorder elements at all. 😶
(It usually also makes it hard to see in changes to see what actually changed.)

@jguddas
Copy link
Member

jguddas commented Mar 2, 2024

Oh, that's not something I have thought about.
Currently, the rule is all path elements first and then sort alphabetically. But maybe there is a better heuristic for sorting?
If we can agree on changing to a better heuristic, we can merge this.

Honestly, I wish your optimization script didn't reorder elements at all. 😶 (It usually also makes it hard to see in changes to see what actually changed.)

We need some deterministic way to sort since there is no way to remember where an element originally was placed. So if we don't have sorting it will never stabilize and every time you edit something you will have the problem of things moving around and the diff being hard to read.

What we could do is sort by bounding-box volume, biggest to smallest.

@karsa-mistmere karsa-mistmere changed the title fix(icon):Reorder the elements in circle-slash.svg fix(icon): reorder the elements in circle-slash.svg Mar 6, 2024
@jguddas jguddas mentioned this pull request Aug 6, 2024
7 tasks
@jguddas jguddas closed this Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎨 icon About new icons
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants