Skip to content

Commit

Permalink
Moving Label and Text to primer_react_css_modules_staff ship feature …
Browse files Browse the repository at this point in the history
…flag (#5000)

* Moving Label and Text to staff ship feature flag

* Create serious-sheep-love.md

* Create big-pumas-sit.md
  • Loading branch information
jonrohan authored and TylerJDev committed Sep 23, 2024
1 parent 6941fd2 commit 25aae74
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 32 deletions.
5 changes: 5 additions & 0 deletions .changeset/big-pumas-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

`Text` component CSS module feature flag changed to `primer_react_css_modules_staff`
5 changes: 5 additions & 0 deletions .changeset/serious-sheep-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

`Label` component CSS module feature flag changed to `primer_react_css_modules_staff`
52 changes: 26 additions & 26 deletions e2e/components/Label.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ test.describe('Label', () => {
globals: {
colorScheme: theme,
featureFlags: {
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
},
})
Expand All @@ -29,7 +29,7 @@ test.describe('Label', () => {
globals: {
colorScheme: theme,
featureFlags: {
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
},
})
Expand All @@ -54,7 +54,7 @@ test.describe('Label', () => {
globals: {
colorScheme: theme,
featureFlags: {
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
},
})
Expand All @@ -69,7 +69,7 @@ test.describe('Label', () => {
globals: {
colorScheme: theme,
featureFlags: {
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
},
})
Expand All @@ -94,7 +94,7 @@ test.describe('Label', () => {
globals: {
colorScheme: theme,
featureFlags: {
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
},
})
Expand All @@ -109,7 +109,7 @@ test.describe('Label', () => {
globals: {
colorScheme: theme,
featureFlags: {
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
},
})
Expand All @@ -134,7 +134,7 @@ test.describe('Label', () => {
globals: {
colorScheme: theme,
featureFlags: {
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
},
})
Expand All @@ -149,7 +149,7 @@ test.describe('Label', () => {
globals: {
colorScheme: theme,
featureFlags: {
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
},
})
Expand All @@ -174,7 +174,7 @@ test.describe('Label', () => {
globals: {
colorScheme: theme,
featureFlags: {
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
},
})
Expand All @@ -189,7 +189,7 @@ test.describe('Label', () => {
globals: {
colorScheme: theme,
featureFlags: {
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
},
})
Expand All @@ -214,7 +214,7 @@ test.describe('Label', () => {
globals: {
colorScheme: theme,
featureFlags: {
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
},
})
Expand All @@ -229,7 +229,7 @@ test.describe('Label', () => {
globals: {
colorScheme: theme,
featureFlags: {
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
},
})
Expand All @@ -254,7 +254,7 @@ test.describe('Label', () => {
globals: {
colorScheme: theme,
featureFlags: {
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
},
})
Expand All @@ -269,7 +269,7 @@ test.describe('Label', () => {
globals: {
colorScheme: theme,
featureFlags: {
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
},
})
Expand All @@ -294,7 +294,7 @@ test.describe('Label', () => {
globals: {
colorScheme: theme,
featureFlags: {
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
},
})
Expand All @@ -309,7 +309,7 @@ test.describe('Label', () => {
globals: {
colorScheme: theme,
featureFlags: {
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
},
})
Expand All @@ -334,7 +334,7 @@ test.describe('Label', () => {
globals: {
colorScheme: theme,
featureFlags: {
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
},
})
Expand All @@ -349,7 +349,7 @@ test.describe('Label', () => {
globals: {
colorScheme: theme,
featureFlags: {
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
},
})
Expand All @@ -374,7 +374,7 @@ test.describe('Label', () => {
globals: {
colorScheme: theme,
featureFlags: {
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
},
})
Expand All @@ -389,7 +389,7 @@ test.describe('Label', () => {
globals: {
colorScheme: theme,
featureFlags: {
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
},
})
Expand All @@ -414,7 +414,7 @@ test.describe('Label', () => {
globals: {
colorScheme: theme,
featureFlags: {
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
},
})
Expand All @@ -429,7 +429,7 @@ test.describe('Label', () => {
globals: {
colorScheme: theme,
featureFlags: {
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
},
})
Expand All @@ -454,7 +454,7 @@ test.describe('Label', () => {
globals: {
colorScheme: theme,
featureFlags: {
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
},
})
Expand All @@ -469,7 +469,7 @@ test.describe('Label', () => {
globals: {
colorScheme: theme,
featureFlags: {
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
},
})
Expand All @@ -494,7 +494,7 @@ test.describe('Label', () => {
globals: {
colorScheme: theme,
featureFlags: {
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
},
})
Expand All @@ -509,7 +509,7 @@ test.describe('Label', () => {
globals: {
colorScheme: theme,
featureFlags: {
primer_react_css_modules_team: enabled,
primer_react_css_modules_staff: enabled,
},
},
})
Expand Down
8 changes: 4 additions & 4 deletions e2e/components/Text.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ test.describe('Text', () => {
id: story.id,
globals: {
featureFlags: {
primer_react_css_modules_team: true,
primer_react_css_modules_staff: true,
},
},
})
Expand All @@ -60,7 +60,7 @@ test.describe('Text', () => {
id: story.id,
globals: {
featureFlags: {
primer_react_css_modules_team: false,
primer_react_css_modules_staff: false,
},
},
})
Expand All @@ -74,7 +74,7 @@ test.describe('Text', () => {
id: story.id,
globals: {
featureFlags: {
primer_react_css_modules_team: true,
primer_react_css_modules_staff: true,
},
},
})
Expand All @@ -86,7 +86,7 @@ test.describe('Text', () => {
id: story.id,
globals: {
featureFlags: {
primer_react_css_modules_team: false,
primer_react_css_modules_staff: false,
},
},
})
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/Label/Label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const StyledLabel = styled.span<LabelProps>`
`

const Label = React.forwardRef(function Label({as, size = 'small', variant = 'default', className, ...rest}, ref) {
const enabled = useFeatureFlag('primer_react_css_modules_team')
const enabled = useFeatureFlag('primer_react_css_modules_staff')
if (enabled) {
const Component = as || 'span'
if (rest.sx) {
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/Text/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const StyledText = styled.span<StyledTextProps>`
`

const Text = forwardRef(({as: Component = 'span', className, size, weight, ...props}, forwardedRef) => {
const enabled = useFeatureFlag('primer_react_css_modules_team')
const enabled = useFeatureFlag('primer_react_css_modules_staff')

const innerRef = React.useRef<HTMLElement>(null)
useRefObjectAsForwardedRef(forwardedRef, innerRef)
Expand Down

0 comments on commit 25aae74

Please sign in to comment.