Skip to content

Commit

Permalink
feat(protocol-designer): create MoaM feature flag (#14728)
Browse files Browse the repository at this point in the history
closes AUTH-238
  • Loading branch information
jerader authored Mar 25, 2024
1 parent 40236b5 commit c3f1bf0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions protocol-designer/src/feature-flags/reducers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const initialFlags: Flags = {
OT_PD_ALLOW_ALL_TIPRACKS:
process.env.OT_PD_ALLOW_ALL_TIPRACKS === '1' || false,
OT_PD_ENABLE_MULTI_TIP: process.env.OT_PD_ENABLE_MULTI_TIP === '1' || false,
OT_PD_ENABLE_MOAM: process.env.OT_PD_ENABLE_MOAM === '1' || false,
}
// @ts-expect-error(sa, 2021-6-10): cannot use string literals as action type
// TODO IMMEDIATELY: refactor this to the old fashioned way if we cannot have type safety: https://github.com/redux-utilities/redux-actions/issues/282#issuecomment-595163081
Expand Down
4 changes: 4 additions & 0 deletions protocol-designer/src/feature-flags/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ export const getEnableMultiTip: Selector<boolean> = createSelector(
getFeatureFlagData,
flags => flags.OT_PD_ENABLE_MULTI_TIP ?? false
)
export const getEnableMoam: Selector<boolean> = createSelector(
getFeatureFlagData,
flags => flags.OT_PD_ENABLE_MOAM ?? false
)
1 change: 1 addition & 0 deletions protocol-designer/src/feature-flags/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export type FlagTypes =
| 'OT_PD_DISABLE_MODULE_RESTRICTIONS'
| 'OT_PD_ALLOW_ALL_TIPRACKS'
| 'OT_PD_ENABLE_MULTI_TIP'
| 'OT_PD_ENABLE_MOAM'
// flags that are not in this list only show in prerelease mode
export const userFacingFlags: FlagTypes[] = [
'OT_PD_DISABLE_MODULE_RESTRICTIONS',
Expand Down
4 changes: 4 additions & 0 deletions protocol-designer/src/localization/en/feature_flags.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,9 @@
"OT_PD_ENABLE_MULTI_TIP": {
"title": "Enable multi tiprack support",
"description": "Allow users to select multiple tipracks per pipette"
},
"OT_PD_ENABLE_MOAM": {
"title": "Enable multiples of a module",
"description": "Allow users to select multiples of a module"
}
}

0 comments on commit c3f1bf0

Please sign in to comment.