Skip to content

Commit

Permalink
Move Avatar component feature flag from primer_react_css_modules_team…
Browse files Browse the repository at this point in the history
… to primer_react_css_modules_staff (#5024)

* Move Avatar component to staff feature flag

* Create three-scissors-hide.md
  • Loading branch information
jonrohan authored Sep 26, 2024
1 parent c2dd024 commit 45f3597
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/three-scissors-hide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

Move Avatar component feature flag from primer_react_css_modules_team to primer_react_css_modules_staff
16 changes: 8 additions & 8 deletions e2e/components/Avatar.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ test.describe('Avatar', () => {
id: 'components-avatar--default',
globals: {
colorScheme: theme,
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
})

Expand All @@ -26,7 +26,7 @@ test.describe('Avatar', () => {
id: 'components-avatar--default',
globals: {
colorScheme: theme,
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
})
await expect(page).toHaveNoViolations({
Expand All @@ -49,7 +49,7 @@ test.describe('Avatar', () => {
id: 'components-avatar-features--size',
globals: {
colorScheme: theme,
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
})

Expand All @@ -62,7 +62,7 @@ test.describe('Avatar', () => {
id: 'components-avatar-features--size',
globals: {
colorScheme: theme,
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
})
await expect(page).toHaveNoViolations({
Expand All @@ -85,7 +85,7 @@ test.describe('Avatar', () => {
id: 'components-avatar-features--size-responsive',
globals: {
colorScheme: theme,
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
})

Expand All @@ -98,7 +98,7 @@ test.describe('Avatar', () => {
id: 'components-avatar-features--size-responsive',
globals: {
colorScheme: theme,
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
})
await expect(page).toHaveNoViolations({
Expand All @@ -121,7 +121,7 @@ test.describe('Avatar', () => {
id: 'components-avatar-features--square',
globals: {
colorScheme: theme,
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
})

Expand All @@ -134,7 +134,7 @@ test.describe('Avatar', () => {
id: 'components-avatar-features--square',
globals: {
colorScheme: theme,
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
})
await expect(page).toHaveNoViolations({
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/Avatar/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const Avatar = React.forwardRef<HTMLImageElement, AvatarProps>(function Avatar(
{alt = '', size = DEFAULT_AVATAR_SIZE, square = false, sx: sxProp = defaultSxProp, className, ...rest},
ref,
) {
const enabled = useFeatureFlag('primer_react_css_modules_team')
const enabled = useFeatureFlag('primer_react_css_modules_staff')
const isResponsive = isResponsiveValue(size)
const avatarSx = isResponsive
? merge<BetterCssProperties | BetterSystemStyleObject>(
Expand Down

0 comments on commit 45f3597

Please sign in to comment.