-
Notifications
You must be signed in to change notification settings - Fork 73
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: ensure circle elements in SVGs get currentColor fill #2687
Conversation
✅ Deploy Preview for paragon-openedx ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -56,7 +56,7 @@ module.exports = { | |||
[ | |||
"@svgr/babel-plugin-add-jsx-attribute", | |||
{ | |||
"elements": ["path"], | |||
"elements": ["path", "circle"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the actual fix here :) All other files changed are the result of running npm run build
in Paragon's icons
folder.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2687 +/- ##
=======================================
Coverage 92.83% 92.83%
=======================================
Files 235 235
Lines 4245 4245
Branches 1032 1032
=======================================
Hits 3941 3941
Misses 300 300
Partials 4 4 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was nervous when I first opened the PR haha
icons/jsx/index.jsx
Outdated
@@ -472,7 +472,6 @@ export { default as Check } from "./Check"; | |||
export { default as CheckBoxIcon } from "./CheckBoxIcon"; | |||
export { default as CheckBoxOutlineBlank } from "./CheckBoxOutlineBlank"; | |||
export { default as CheckCircle } from "./CheckCircle"; | |||
export { default as CheckCircleLightOutline } from "./CheckCircleLightOutline"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this in not intended? (same comment for icons/es5/index.js
file)
I think someone manually added jsx and js files for this icon but did not add the actual svg file to svg
folder, so npm run build
removes this import...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@viktorrusakov You are correct. Unfortunately, these lines will likely continue to be added until the appropriate SVG file is added...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'm just worried about making a breaking change here in this PR (Usage insights say that this icon is used in at least one MFE). Can you maybe manually remove these changes, so we can safely merge this? And then we create a separate issue to add the missing SVG file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we get #2869 merged we don't need to worry about this being a breaking change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brian-smith-tcril Yes, you're right, I merged it so there shouldn't be any problems now.
I took the liberty of updating this PR myself by rebasing it on master
as I know @adamstankiewicz is quite busy with enterprise work and might not get the chance to get to this PR soon. I validated that running npm run build
does not remove any icons anymore and that the fix works (this is one of the fixed icons that Adam added to the PR description)
I'm going to merge it in as it is quite an important fix and PR has been open for a long time now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e79e901
to
6bd462e
Compare
🎉 This PR is included in version 21.10.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 22.0.0-alpha.23 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
It looks our svgr config for the icons build process doesn't add
fill="currentColor
to elements in the SVGs, like it does for<path>
elements. Implication: any icon with a circle(s) is likely currently missing the circle(s) when rendered.Deploy Preview
https://deploy-preview-2687--paragon-openedx.netlify.app/foundations/icons
Merge Checklist
example
app?wittjeff
andadamstankiewicz
as reviewers on this PR.Post-merge Checklist