Skip to content

Commit

Permalink
chore(app): create ff for exposing multi GEN2 pipettes (#4364)
Browse files Browse the repository at this point in the history
  • Loading branch information
b-cooper committed Nov 6, 2019
1 parent 42e132f commit 0edc7e4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Expand Up @@ -24,6 +24,7 @@ module.exports = {
'react/display-name': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'no-extra-boolean-cast': 'off',
},

globals: {},
Expand Down
7 changes: 6 additions & 1 deletion app/src/components/ChangePipette/PipetteSelection.js
@@ -1,7 +1,9 @@
// @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 @@ -11,7 +13,10 @@ export type PipetteSelectionProps = {
}

export default function PipetteSelection(props: PipetteSelectionProps) {
const nameBlacklist = ['p20_multi_gen2', 'p300_multi_gen2']
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>
Expand Down
2 changes: 1 addition & 1 deletion app/src/config/index.js
Expand Up @@ -14,8 +14,8 @@ export * from './types'

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

// trigger a config value update to the app-shell via shell middleware
Expand Down
2 changes: 1 addition & 1 deletion app/src/config/types.js
Expand Up @@ -9,8 +9,8 @@ export type DiscoveryCandidates = string | Array<string>

export type DevInternalFlag =
| 'allPipetteConfig'
| 'tempdeckControls'
| 'customLabware'
| 'enableMultiGEN2'

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

0 comments on commit 0edc7e4

Please sign in to comment.