Skip to content

Commit

Permalink
feat(protocol-designer): allow user to change pipette selection
Browse files Browse the repository at this point in the history
Instead of locking users into their initial pipette selection, we now allow users to select and
change their pipette while designing their protocol. In the best case, the change will happen
silently and will not effect the protocol at all. In the worst case, changing pipettes might require
users fixing invalidated parts of many affected steps and adding more tipracks to accomodate the
change.

Closes #2474, #2475, #2477
  • Loading branch information
b-cooper committed Nov 2, 2018
1 parent e34e4e3 commit 62fc7d6
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ import startCase from 'lodash/startCase'
import isEmpty from 'lodash/isEmpty'
import isEqual from 'lodash/isEqual'

import type {PipetteData} from '../../step-generation'
import type {PipetteData} from '../../../step-generation'
import i18n from '../../../localization'
import type {BaseState, ThunkDispatch} from '../../types'
import type {BaseState, ThunkDispatch} from '../../../types'
import {pipetteOptions} from '../../../pipettes/pipetteData'
import type {PipetteFields} from '../../../load-file'
import {
thunks as pipetteThunks,
selectors as pipetteSelectors,
Expand All @@ -27,7 +28,6 @@ import PipetteDiagram from '../NewFileModal/PipetteDiagram'
import TiprackDiagram from '../NewFileModal/TiprackDiagram'
import styles from './EditPipettesModal.css'
import modalStyles from '../modal.css'
import type {PipetteFields} from '../../load-file'
import StepChangesWarningModal from './StepChangesWarningModal'

type State = EditPipettesFields & {isWarningModalOpen: boolean}
Expand Down Expand Up @@ -64,8 +64,8 @@ const tiprackOptions = [
const DEFAULT_SELECTION = {pipetteModel: '', tiprackModel: null}

const pipetteDataToFormState = (pipetteData) => ({
pipetteModel: pipetteData ? pipetteData.model : '',
tiprackModel: (pipetteData && pipetteData.tiprack) ? pipetteData.tiprack.model : null,
pipetteModel: (pipetteData && pipetteData.model) ? pipetteData.model : '',
tiprackModel: (pipetteData && pipetteData.tiprackModel) ? pipetteData.tiprackModel : null,
})

class EditPipettesModal extends React.Component<Props, State> {
Expand Down

0 comments on commit 62fc7d6

Please sign in to comment.