Skip to content

Commit

Permalink
Moving Heading feature flag from staff ship to ga ship (#4971)
Browse files Browse the repository at this point in the history
* Moving Heading component to ga flag

* Create nice-moles-know.md
  • Loading branch information
jonrohan authored Sep 17, 2024
1 parent 93553a5 commit ff56b04
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/nice-moles-know.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

Changed Heading feature flag from `primer_react_css_modules_staff` to `primer_react_css_modules_ga`
4 changes: 2 additions & 2 deletions e2e/components/Heading.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ test.describe('Heading', () => {
id: story.id,
globals: {
featureFlags: {
primer_react_css_modules_staff: true,
primer_react_css_modules_ga: true,
},
},
})
Expand All @@ -51,7 +51,7 @@ test.describe('Heading', () => {
id: story.id,
globals: {
featureFlags: {
primer_react_css_modules_staff: true,
primer_react_css_modules_ga: true,
},
},
})
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/Heading/Heading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const StyledHeading = styled.h2<StyledHeadingProps>`
`

const Heading = forwardRef(({as: Component = 'h2', className, variant, ...props}, forwardedRef) => {
const enabled = useFeatureFlag('primer_react_css_modules_staff')
const enabled = useFeatureFlag('primer_react_css_modules_ga')
const innerRef = React.useRef<HTMLHeadingElement>(null)
useRefObjectAsForwardedRef(forwardedRef, innerRef)

Expand Down
8 changes: 4 additions & 4 deletions packages/react/src/Heading/__tests__/Heading.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ describe('Heading', () => {
).toHaveStyleRule('font-style', 'italic')
})

describe('with primer_react_css_modules_staff enabled', () => {
describe('with primer_react_css_modules_ga enabled', () => {
it('should only include css modules class', () => {
HTMLRender(
<FeatureFlags
flags={{
primer_react_css_modules_staff: true,
primer_react_css_modules_ga: true,
}}
>
<Heading>test</Heading>
Expand All @@ -163,7 +163,7 @@ describe('Heading', () => {
const {container} = HTMLRender(
<FeatureFlags
flags={{
primer_react_css_modules_staff: true,
primer_react_css_modules_ga: true,
}}
>
<Heading className="test">test</Heading>
Expand All @@ -176,7 +176,7 @@ describe('Heading', () => {
HTMLRender(
<FeatureFlags
flags={{
primer_react_css_modules_staff: true,
primer_react_css_modules_ga: true,
}}
>
<Heading
Expand Down

0 comments on commit ff56b04

Please sign in to comment.