Skip to content

Commit 58cc293

Browse files
refactor(app): hide app module changes behind a feature flag (#7478)
1 parent 41d4069 commit 58cc293

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

app/src/pages/Calibrate/CalibratePanel/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { useTranslation } from 'react-i18next'
66

77
import { SidePanel } from '@opentrons/components'
88
import { selectors as robotSelectors } from '../../../redux/robot'
9+
import { useFeatureFlag } from '../../../redux/config'
910
import { getProtocolLabwareList } from '../../../redux/calibration/labware'
1011
import { ProtocolModuleList } from '../../../organisms/ProtocolModuleList'
1112
import { PipetteList } from './PipetteList'
@@ -26,12 +27,13 @@ export function CalibratePanel(): React.Node {
2627
allLabware,
2728
lw => lw.type && lw.isTiprack
2829
)
30+
const showModuleList = useFeatureFlag('moduleAugmentation')
2931

3032
return (
3133
<SidePanel title={t('cal_panel_title')}>
3234
<div className={styles.setup_panel}>
3335
<PipetteList robotName={robotName} tipracks={tipracks} />
34-
<ProtocolModuleList />
36+
{showModuleList && <ProtocolModuleList />}
3537
<LabwareGroup
3638
robotName={robotName}
3739
tipracks={tipracks}

app/src/pages/Robots/RobotSettings/__tests__/CalibrationCard.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ describe('CalibrationCard', () => {
142142
getFeatureFlags.mockReturnValue({
143143
allPipetteConfig: false,
144144
enableBundleUpload: false,
145+
moduleAugmentation: false,
145146
})
146147
getAttachedPipettes.mockReturnValue(mockAttachedPipettes)
147148
getAttachedPipetteCalibrations.mockReturnValue(

app/src/redux/config/constants.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export const CONFIG_VERSION_LATEST: 1 = 1
77
export const DEV_INTERNAL_FLAGS: Array<DevInternalFlag> = [
88
'allPipetteConfig',
99
'enableBundleUpload',
10+
'moduleAugmentation',
1011
]
1112

1213
// action type constants

app/src/redux/config/schema-types.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ export type UpdateChannel = 'latest' | 'beta' | 'alpha'
77

88
export type DiscoveryCandidates = string | Array<string>
99

10-
export type DevInternalFlag = 'allPipetteConfig' | 'enableBundleUpload'
10+
export type DevInternalFlag =
11+
| 'allPipetteConfig'
12+
| 'enableBundleUpload'
13+
| 'moduleAugmentation'
1114

1215
export type FeatureFlags = $Shape<{|
1316
[DevInternalFlag]: boolean | void,

0 commit comments

Comments
 (0)