Skip to content

Commit 0ea045a

Browse files
authored
chore: Cleanup the primer_react_css_modules_staff flag from the codebase (#5968)
1 parent 1066419 commit 0ea045a

File tree

6 files changed

+9
-8
lines changed

6 files changed

+9
-8
lines changed

.changeset/heavy-mangos-stay.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@primer/react': patch
3+
---
4+
5+
Remove the primer_react_css_modules_staff feature flag. Also needed to rework the feature flag logic for the NavList component.

.github/workflows/aat-reports.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ jobs:
9191
matrix:
9292
shard: [1, 2, 3, 4]
9393
env:
94-
VITE_PRIMER_REACT_CSS_MODULES_STAFF: 1
9594
VITE_PRIMER_REACT_CSS_MODULES_GA: 1
9695
steps:
9796
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

.github/workflows/vrt-reports.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ jobs:
9191
matrix:
9292
shard: [1, 2, 3, 4]
9393
env:
94-
VITE_PRIMER_REACT_CSS_MODULES_STAFF: 1
9594
VITE_PRIMER_REACT_CSS_MODULES_GA: 1
9695
steps:
9796
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

packages/react/.storybook/preview.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ const primerThemes = [
224224
]
225225

226226
const defaultFeatureFlags = new Map(DefaultFeatureFlags.flags)
227-
const featureFlagEnvList = new Set(['PRIMER_REACT_CSS_MODULES_STAFF', 'PRIMER_REACT_CSS_MODULES_GA'])
227+
const featureFlagEnvList = new Set(['PRIMER_REACT_CSS_MODULES_GA'])
228228

229229
for (const flag of featureFlagEnvList) {
230230
if (import.meta.env[`VITE_${flag}`] === '1') {

packages/react/src/FeatureFlags/DefaultFeatureFlags.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {FeatureFlagScope} from './FeatureFlagScope'
22

33
export const DefaultFeatureFlags = FeatureFlagScope.create({
4-
primer_react_css_modules_staff: false,
54
primer_react_css_modules_ga: false,
65
primer_react_action_list_item_as_button: false,
76
primer_react_select_panel_with_modern_action_list: false,

packages/react/src/NavList/NavList.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -437,8 +437,7 @@ export const GroupExpand = React.forwardRef<HTMLButtonElement, NavListGroupExpan
437437
const [currentPage, setCurrentPage] = React.useState(0)
438438
const groupId = useId()
439439

440-
const teamEnabled = useFeatureFlag('primer_react_css_modules_team')
441-
const staffEnabled = useFeatureFlag('primer_react_css_modules_staff')
440+
const gaEnabled = useFeatureFlag('primer_react_css_modules_ga')
442441

443442
const itemsPerPage = items.length / pages
444443
const amountToShow = pages === 0 ? items.length : Math.ceil(itemsPerPage * currentPage)
@@ -486,7 +485,7 @@ export const GroupExpand = React.forwardRef<HTMLButtonElement, NavListGroupExpan
486485
})}
487486
</>
488487
) : null}
489-
{(currentPage < pages || currentPage === 0) && !teamEnabled && !staffEnabled ? (
488+
{(currentPage < pages || currentPage === 0) && !gaEnabled ? (
490489
<Box as="li" sx={{listStyle: 'none'}}>
491490
<ActionList.Item
492491
as="button"
@@ -513,7 +512,7 @@ export const GroupExpand = React.forwardRef<HTMLButtonElement, NavListGroupExpan
513512
</ActionList.Item>
514513
</Box>
515514
) : null}
516-
{(currentPage < pages || currentPage === 0) && (teamEnabled || staffEnabled) ? (
515+
{(currentPage < pages || currentPage === 0) && gaEnabled ? (
517516
<ActionList.Item
518517
as="button"
519518
aria-expanded="false"

0 commit comments

Comments
 (0)