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
Octicons v2 #774
Octicons v2 #774
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/primer/primer-components/2a5esddzx |
@@ -590,10 +583,7 @@ declare module '@primer/components/lib/CircleOcticon' { | |||
import {CircleOcticon} from '@primer/components' | |||
export default CircleOcticon | |||
} | |||
declare module '@primer/components/lib/StyledOcticon' { |
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.
It doesn't look like @primer/styled-octicons
exports types so I think we're going to need to do that over in that repo before merging this PR
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.
Just kidding, looks like it does: https://github.com/primer/octicons/blob/master/lib/octicons_styled/script/build.js#L30
Game plan as of last week:
Open Questions:
@BinaryMuse brought up a good point that it feels a little weird to have a library that implements primer-y react components separate from Ultimately I don't think it matters too much where it lives. Whether or not we use |
This week I've been testing out whether or not using something like |
Ok! After much discussion with @BinaryMuse we've decided to keep Here's the reasoning:
I'm still open to deciding to use |
I'm going to close this PR and open a new one that's not a hot mess, since changes for the approach going forward should be pretty minimal 😂 |
This PR updates Primer React Components to use
@primer/styled-octicons
instead of@primer/octicons-react
🚨 Breaking Changes 🚨
@primer/octicons-react
StyledOcticon
has been deprecatedTODO
@primer/styled-octicons
package to replaceStyledOcticon
Create @primer/styled-octicons package octicons#417@primer/styled-octicons
a peer dependencyNotes
CircleOcticon
component looks buggy because the size of the icon and the size of the circle are set to the same value. This isn't new in this PR, it's always been visually broken like this but seems more noticeable with some of the newer Octicons. I created a follow-up issue here