-
Notifications
You must be signed in to change notification settings - Fork 538
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
feat(AvatarStack): Convert AvatarStack to CSS modules behind team feature flag #5299
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Josh Black <[email protected]>
🦋 Changeset detectedLatest commit: f7f982a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks! |
Ok, this is ready again. This time I've fixed the issues we saw when shipping last time https://github.com/github/github/pull/351862 |
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.
Mostly LGTM, just a few comment cleanup suggestions and one question:
I see integration PR is failing, is that just because it needs the new changes on the separate dotcom PR? 👀
non-blocking: I'm wondering if this story is working as supposed to. It behaves the same in prod but are the sizes even doing anything here? 😅
/* 2. + the non-overlapping part of the third and fourth avatar;thiscalcexplained */ | ||
min-width: calc( |
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.
/* 2. + the non-overlapping part of the third and fourth avatar;thiscalcexplained */ | |
min-width: calc( | |
/* 2. + the non-overlapping part of the third and fourth avatar */ | |
min-width: calc( |
|
||
/* 1. avatar size + the non-overlapping part of the second avatar */ | ||
|
||
/* 2. + the non-overlapping part of the third avatar;thiscalcexplained */ |
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.
/* 2. + the non-overlapping part of the third avatar;thiscalcexplained */ | |
/* 2. + the non-overlapping part of the third avatar */ |
|
||
/* 1. avatar size + the non-overlapping part of the second avatar */ | ||
|
||
/* 2. + the border widths of the first two avatars;thiscalcexplained */ |
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.
/* 2. + the border widths of the first two avatars;thiscalcexplained */ | |
/* 2. + the border widths of the first two avatars */ |
@@ -6,8 +6,6 @@ | |||
/* stylelint-disable-next-line primer/typography */ | |||
line-height: 1; | |||
border-radius: 50%; | |||
/* stylelint-disable-next-line primer/box-shadow */ | |||
box-shadow: 0 0 0 1px var(--avatar-borderColor); |
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.
Is this no longer needed?
// @ts-ignore - it's not allowing CSS properties here | ||
style={enabled ? (getResponsiveAvatarSizeStyles() as React.CSSProperties) : undefined} |
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 think you can get rid of the ts-ignore and the as React.CSSProperties since it is being aliased within the function
// @ts-ignore - it's not allowing CSS properties here | |
style={enabled ? (getResponsiveAvatarSizeStyles() as React.CSSProperties) : undefined} | |
style={enabled ? getResponsiveAvatarSizeStyles() : undefined} |
Closes https://github.com/github/primer/issues/4024
Changelog
Changed
Update
AvatarStack
component to use CSS modules behind the feature flag primer_react_css_modules_teamRollout strategy
Testing & Reviewing
Merge checklist