-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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: pictogram rendering bugs #4081
Conversation
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.
Left some questions above!
@joshblack you're too quick, I answered both in the PR comment |
Deploy preview for the-carbon-components ready! Built with commit f750530 https://deploy-preview-4081--the-carbon-components.netlify.com |
Deploy preview for carbon-elements ready! Built with commit f750530 |
Deploy preview for carbon-components-react ready! Built with commit f750530 https://deploy-preview-4081--carbon-components-react.netlify.com |
@joshblack Also added a |
There’s also 13 pictograms without categories. They’re under “undefined” at the preview link. |
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.
Ignore this lol
@vpicone my preference would be to treat all of them as |
@joshblack ah I was thrown off by the components directory. My thought was they’re going to have a different height/width behavior as well as a different display name would warrant them having distinct components. |
What would be the difference for |
If we had unified |
@vpicone wouldn't the case be that we just wouldn't pass in those props, or they would be // Icons
<Icon width={20} height={20} />
<Icon size="md" />
// Pictograms
<Icon width={64} height={48} />
<Icon /> |
That size prop would be broken for pictograms. Using it would result in rendering smaller than they are intended to be shown. It also wouldn’t make sense having “lg” render smaller than the default size. |
@vpicone didn't mean for the prop values themselves to have any meaning really, just was trying to demonstrate that folks can pass them in or not and the underlying SVG would be fine. If we don't want folks to pass along a |
@joshblack but we’re still calling them icons? Should they have a different display name/prop types? |
@vpicone we could change the underlying name to |
@vpicone let me track down the |
Across what attributes is search operating? It should be the same as icons scope and ordering. |
@chrisconnors-ibm it is, with the removal of subcategories. |
@joshblack what about the prop types? How would we differentiate that for icons vs pictograms |
@vpicone I had assumed with the generated components, what do you think? |
@joshblack I think I just got confused with the component directory, I assumed it meant other components would go there not just |
(although I bet the two we're adding in #4041 in in are the only ones with aliases) |
9aae141
to
30260db
Compare
@joshblack I removed the Pictogram component stuff, I think maybe I'm just misunderstanding how this abstraction is supposed to work. Opened #4090 to discuss further. This now just fixes rendering bugs from the svgo optimization. |
Closes #4080
white boxes: We were both moving attributes to group elements while trying to take them away, this prevented us from adequately stripping/collapsing wrapper groups with more than one layer.
black boxes: we were only removing rectangles that matched the icon sizes:
['16', '20', '24', '32']
. Since we're not gonna need bespoke pictogram sizes, extending this again shouldn't be necessary.Preview link: https://carbon-pictograms.now.sh/guidelines/iconography/pictograms