Skip to content
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

Open
wants to merge 35 commits into
base: main
Choose a base branch
from

Conversation

jonrohan
Copy link
Member

@jonrohan jonrohan commented Nov 14, 2024

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_team

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

Copy link

changeset-bot bot commented Nov 14, 2024

🦋 Changeset detected

Latest commit: f7f982a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Minor

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

@github-actions github-actions bot added the staff Author is a staff member label Nov 14, 2024
Copy link
Contributor

👋 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!

@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Nov 14, 2024
@jonrohan
Copy link
Member Author

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

@jonrohan jonrohan requested review from hussam-i-am and langermank and removed request for tbenning November 20, 2024 00:30
Copy link
Member

@francinelucca francinelucca left a 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? 😅

Comment on lines +65 to +66
/* 2. + the non-overlapping part of the third and fourth avatar;thiscalcexplained */
min-width: calc(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/* 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 */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/* 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 */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/* 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);
Copy link
Collaborator

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?

Comment on lines +385 to +386
// @ts-ignore - it's not allowing CSS properties here
style={enabled ? (getResponsiveAvatarSizeStyles() as React.CSSProperties) : undefined}
Copy link
Collaborator

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

Suggested change
// @ts-ignore - it's not allowing CSS properties here
style={enabled ? (getResponsiveAvatarSizeStyles() as React.CSSProperties) : undefined}
style={enabled ? getResponsiveAvatarSizeStyles() : undefined}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-tests: failing Changes in this PR cause breaking changes in gh/gh staff Author is a staff member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants