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

Moving Heading feature flag from staff ship to ga ship #4971

Merged
merged 2 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading