Skip to content

Commit

Permalink
feat(app): enable gen2 multi pipettes (#5297)
Browse files Browse the repository at this point in the history
Closes #4698
  • Loading branch information
sfoster1 authored Mar 27, 2020
1 parent d827805 commit 707f0ab
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 19 deletions.
7 changes: 0 additions & 7 deletions app/src/components/ChangePipette/PipetteSelection.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// @flow
import * as React from 'react'
import { useSelector } from 'react-redux'

import { PipetteSelect } from '@opentrons/components'
import { getConfig } from '../../config'
import styles from './styles.css'

const LABEL = 'Select the pipette you wish to attach:'
Expand All @@ -13,17 +11,12 @@ export type PipetteSelectionProps = {
}

export function PipetteSelection(props: PipetteSelectionProps) {
const config = useSelector(getConfig)
const nameBlacklist = Boolean(config.devInternal?.enableMultiGEN2)
? []
: ['p20_multi_gen2', 'p300_multi_gen2']
return (
<label className={styles.pipette_selection}>
<span className={styles.pipette_selection_label}>{LABEL}</span>
<PipetteSelect
pipetteName={props.pipetteName}
onPipetteChange={props.onPipetteChange}
nameBlacklist={nameBlacklist}
/>
</label>
)
Expand Down
1 change: 0 additions & 1 deletion app/src/config/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import type { DevInternalFlag } from './types'

export const DEV_INTERNAL_FLAGS: Array<DevInternalFlag> = [
'allPipetteConfig',
'enableMultiGEN2',
'enableBundleUpload',
]

Expand Down
5 changes: 1 addition & 4 deletions app/src/config/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ export type UpdateChannel = 'latest' | 'beta' | 'alpha'

export type DiscoveryCandidates = string | Array<string>

export type DevInternalFlag =
| 'allPipetteConfig'
| 'enableMultiGEN2'
| 'enableBundleUpload'
export type DevInternalFlag = 'allPipetteConfig' | 'enableBundleUpload'

export type FeatureFlags = $Shape<{|
[DevInternalFlag]: boolean | void,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// @flow
import React, { useMemo } from 'react'
import { useSelector } from 'react-redux'
import {
DropdownField,
FormGroup,
Expand All @@ -19,7 +18,6 @@ import formStyles from '../../forms/forms.css'
import { getOnlyLatestDefs } from '../../../labware-defs/utils'

import type { FormPipettesByMount } from '../../../step-forms'
import { getEnableMultiGEN2Pipettes } from '../../../feature-flags/selectors'

export type Props = {|
initialTabIndex?: number,
Expand Down Expand Up @@ -66,7 +64,6 @@ export function PipetteFields(props: Props) {
errors,
touched,
} = props
const enableMultiGEN2 = useSelector(getEnableMultiGEN2Pipettes)

const tiprackOptions = useMemo(() => {
const defs = getOnlyLatestDefs()
Expand All @@ -91,15 +88,11 @@ export function PipetteFields(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 (
<PipetteSelect
enableNoneOption
tabIndex={tabIndex}
nameBlacklist={nameBlacklist}
pipetteName={pipetteName != null ? pipetteName : null}
onPipetteChange={pipetteName => {
const nameAccessor = `pipettesByMount.${mount}.pipetteName`
Expand Down

0 comments on commit 707f0ab

Please sign in to comment.