Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(app): enable gen2 multi pipettes #5297

Merged
merged 2 commits into from
Mar 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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