diff --git a/protocol-designer/src/components/modals/FilePipettesModal/PipetteFields.js b/protocol-designer/src/components/modals/FilePipettesModal/PipetteFields.js index 8951725a77e..d6ec951db62 100644 --- a/protocol-designer/src/components/modals/FilePipettesModal/PipetteFields.js +++ b/protocol-designer/src/components/modals/FilePipettesModal/PipetteFields.js @@ -1,5 +1,6 @@ // @flow import React, { useMemo } from 'react' +import { useSelector } from 'react-redux' import { DropdownField, FormGroup, @@ -22,6 +23,7 @@ import formStyles from '../../forms/forms.css' import { getOnlyLatestDefs } from '../../../labware-defs/utils' import type { FormPipette, FormPipettesByMount } from '../../../step-forms' +import { getEnableMultiGEN2Pipettes } from '../../../feature-flags/selectors' type Props = {| initialTabIndex?: number, @@ -38,6 +40,7 @@ type PipetteSelectProps = {| mount: Mount, tabIndex: number |} export default function ChangePipetteFields(props: Props) { const { values, onFieldChange } = props + const enableMultiGEN2 = useSelector(getEnableMultiGEN2Pipettes) const tiprackOptions = useMemo(() => { const defs = getOnlyLatestDefs() @@ -66,11 +69,14 @@ export default function ChangePipetteFields(props: Props) { const renderPipetteSelect = (props: PipetteSelectProps) => { const { tabIndex, mount } = props const pipetteName = values[mount].pipetteName + const nameBlacklist = enableMultiGEN2 + ? [] + : ['p20_multi_gen2', 'p300_multi_gen2'] return ( { const name = value !== null ? value.name : null diff --git a/protocol-designer/src/feature-flags/reducers.js b/protocol-designer/src/feature-flags/reducers.js index d5ae6f06d8e..8eef273b55c 100644 --- a/protocol-designer/src/feature-flags/reducers.js +++ b/protocol-designer/src/feature-flags/reducers.js @@ -15,6 +15,7 @@ const initialFlags: Flags = { PRERELEASE_MODE: false, OT_PD_ENABLE_MODULES: false, OT_PD_DISABLE_MODULE_RESTRICTIONS: false, + OT_PD_ENABLE_MULTI_GEN2_PIPETTES: false, } const flags = handleActions( diff --git a/protocol-designer/src/feature-flags/selectors.js b/protocol-designer/src/feature-flags/selectors.js index 24aff151c23..797ef7240e2 100644 --- a/protocol-designer/src/feature-flags/selectors.js +++ b/protocol-designer/src/feature-flags/selectors.js @@ -18,3 +18,8 @@ export const getDisableModuleRestrictions: Selector = createSelector( getFeatureFlagData, flags => flags.OT_PD_DISABLE_MODULE_RESTRICTIONS ) + +export const getEnableMultiGEN2Pipettes: Selector = createSelector( + getFeatureFlagData, + flags => flags.OT_PD_ENABLE_MULTI_GEN2_PIPETTES +) diff --git a/protocol-designer/src/feature-flags/types.js b/protocol-designer/src/feature-flags/types.js index 3c3d45fca68..4e50ea0d857 100644 --- a/protocol-designer/src/feature-flags/types.js +++ b/protocol-designer/src/feature-flags/types.js @@ -14,9 +14,12 @@ export type FlagTypes = | 'PRERELEASE_MODE' | 'OT_PD_ENABLE_MODULES' | 'OT_PD_DISABLE_MODULE_RESTRICTIONS' + | 'OT_PD_ENABLE_MULTI_GEN2_PIPETTES' // flags that are not in this list only show in prerelease mode -export const userFacingFlags: Array = [] +export const userFacingFlags: Array = [ + 'OT_PD_ENABLE_MULTI_GEN2_PIPETTES', +] export type Flags = $Shape<{| [flag: FlagTypes]: ?boolean, diff --git a/protocol-designer/src/localization/en/feature_flags.json b/protocol-designer/src/localization/en/feature_flags.json index 579eedba2b9..cddf9ed53a2 100644 --- a/protocol-designer/src/localization/en/feature_flags.json +++ b/protocol-designer/src/localization/en/feature_flags.json @@ -11,5 +11,9 @@ "title": "Disable module restrictions", "description_1": "Turn off all restrictions on module placement, labware placement on modules, and related pipette crash guidance.", "description_2": "NOT recommended! Switching from default positions may cause crashes and the Protocol Designer cannot yet give guidance on what to expect. Use at your own discretion. " + }, + "OT_PD_ENABLE_MULTI_GEN2_PIPETTES": { + "title": "Enable multi GEN2 pipettes in PD", + "description": "Allow multi GEN2 pipettes to be specified from Pipette Selection" } }