USWDS - Icons: Remove style tags from indeterminate checkbox svgs#6162
Merged
Conversation
added 2 commits
October 29, 2024 16:33
- This should remove a conflict with cypress testing
mahoneycm
approved these changes
Nov 1, 2024
mahoneycm
left a comment
Contributor
There was a problem hiding this comment.
LGTM!
- Confirm that this update removes the inline <style> tags in the affected SVG code
- Confirm that removing style tags will resolve the issue (I'm basing this off of the reporters explanation. I wasn't sure of a good way to test locally with cypress without setting up a config and writing a script)
- Confirm no visual regressions with these icons
- Confirm that there are no inline <style> tags in any other SVG files in the design system
mejiaj
reviewed
Nov 1, 2024
mejiaj
left a comment
Contributor
There was a problem hiding this comment.
No regressions found when testing, but we should remove the inline style rule that @mahoneycm mentioned. It doesn't match the other icons we provide.
amyleadem
commented
Nov 1, 2024
| <path class="st0" d="M2.9,35.9c0,1.1,0.4,2,1.2,2.8c0.8,0.8,1.7,1.2,2.8,1.2h7.9h42.3c1.1,0,2-0.4,2.8-1.2s1.2-1.7,1.2-2.8l0,0V28 | ||
| c0-1.1-0.4-2-1.2-2.8S58.2,24,57.1,24H6.9c-1.1,0-2,0.4-2.8,1.2S2.9,26.9,2.9,28V35.9z"/> | ||
| </svg> | ||
| <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 64 64"><path fill="#FFF" fill-rule="evenodd" d="M2.9 35.9c0 1.1.4 2 1.2 2.8s1.7 1.2 2.8 1.2h50.2c1.1 0 2-.4 2.8-1.2s1.2-1.7 1.2-2.8V28c0-1.1-.4-2-1.2-2.8S58.2 24 57.1 24H6.9c-1.1 0-2 .4-2.8 1.2S2.9 26.9 2.9 28z" clip-rule="evenodd"/></svg> No newline at end of file |
Contributor
Author
There was a problem hiding this comment.
Replaced style="fill-rule:evenodd;clip-rule:evenodd;fill:#fff" with clip-rule="evenodd", fill-rule="evenodd", and fill: #fff in 0f68f96.
mejiaj
approved these changes
Nov 1, 2024
This was referenced Nov 5, 2024
thisisdano
approved these changes
Nov 6, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Removed style tags from indeterminate checkbox SVGs. These style tags were unnecessary and caused a conflict with Cypress automated testing.
Breaking change
This is not a breaking change.
Asset change
Users should update the
checkbox-indeterminate.svgandcheckbox-indeterminate-alt.svgfiles in their projects to prevent this issue.Related issue
Closes #6011
Note
I have opened #6163 as a follow-up issue to run SVGO on all of our icons and include
npm run fix:iconsas part of our release process.Related pull requests
Changelog PR
Preview link
Indeterminate checkbox story
Problem statement
The
checkbox-indeterminate.svgandcheckbox-indeterminate-alt.svgfiles contain unnecessary inline<style>tags that can make testing with Cypress difficult.Solution
Running
svgoon the checkbox-indeterminate SVG files removed the style tags and optimzed the files.Testing and review
<style>tags in the affected SVG code<style>tags in any other SVG files in the design system