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): add inPlace and moveToAddressableArea command text #13958

Merged
merged 22 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b573960
debug
ncdiehl11 Nov 7, 2023
b9ef036
add check for tip attached in moveToAddressableArea
jerader Nov 7, 2023
736ca51
fix ternary for no tip attached
jerader Nov 7, 2023
b0eb442
feat(protocol-designer): wire up drop drop tip in waste chute commands
ncdiehl11 Nov 7, 2023
fc2bcf7
check for wasteChute
ncdiehl11 Nov 7, 2023
77b8e96
update tip state after dropTipInPlace, add test for replaceTip in was…
ncdiehl11 Nov 8, 2023
92c7760
lint
ncdiehl11 Nov 8, 2023
8d65cd7
feat(app): add command text for new commands
ncdiehl11 Nov 8, 2023
86cc374
initial tests
ncdiehl11 Nov 9, 2023
7606b19
add tests for all inPlace + moveToAddressableArea commands
ncdiehl11 Nov 9, 2023
4e8de51
factor PipettingRunTimeCommand type into AtLocation and InPlace
ncdiehl11 Nov 9, 2023
a21e340
reset unintended files out of scope of this PR
ncdiehl11 Nov 9, 2023
424f001
reset pipetting types for now
ncdiehl11 Nov 9, 2023
8783742
Merge branch 'edge' into feat_app-add-inplace-command-text
ncdiehl11 Nov 9, 2023
8df2b6d
feat(app): add command text for new commands
ncdiehl11 Nov 8, 2023
dfc36b0
initial tests
ncdiehl11 Nov 9, 2023
632bfe5
add tests for all inPlace + moveToAddressableArea commands
ncdiehl11 Nov 9, 2023
669e49f
factor PipettingRunTimeCommand type into AtLocation and InPlace
ncdiehl11 Nov 9, 2023
cebb9b3
restore files outside the scope of this PR
ncdiehl11 Nov 9, 2023
08a5b1a
fix import order, use ternaries, remove unnecessary nullish coalescence
ncdiehl11 Nov 9, 2023
050d8c8
for now, revert to a single type for all pipette commands
ncdiehl11 Nov 9, 2023
c029ad3
alphabetically order PipettingRunTimeCommand union
ncdiehl11 Nov 13, 2023
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
Prev Previous commit
Next Next commit
initial tests
  • Loading branch information
ncdiehl11 committed Nov 9, 2023
commit dfc36b0913c09227a2eb31a326ff0e22963067ab
12 changes: 3 additions & 9 deletions app/src/organisms/CommandText/PipettingCommandText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,8 @@ export const PipettingCommandText = ({
}: PipettingCommandTextProps): JSX.Element | null => {
const { t } = useTranslation('protocol_command_text')

let labwareId = ''
let wellName = ''
if ('labwareId' in command.params) {
labwareId = command.params.labwareId
}
if ('wellName' in command.params) {
wellName = command.params.wellName
}
const labwareId = command.params.labwareId ?? null
const wellName = command.params.wellId ?? null

const allPreviousCommands = robotSideAnalysis.commands.slice(
0,
Expand All @@ -57,7 +51,7 @@ export const PipettingCommandText = ({
const { volume, flowRate } = command.params
return t('aspirate', {
well_name: wellName,
labware: getLabwareName(robotSideAnalysis, labwareId),
labware: getLabwareName(robotSideAnalysis, labwareId ?? ''),
labware_location: displayLocation,
volume: volume,
flow_rate: flowRate,
Expand Down
19 changes: 19 additions & 0 deletions app/src/organisms/CommandText/__tests__/CommandText.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react'
import { renderWithProviders } from '@opentrons/components'
import {
DropTipInPlaceRunTimeCommand,
FLEX_ROBOT_TYPE,
PrepareToAspirateRunTimeCommand,
} from '@opentrons/shared-data'
Expand Down Expand Up @@ -204,6 +205,24 @@ describe('CommandText', () => {
)[0]
getByText('Returning tip to A1 of Opentrons 96 Tip Rack 300 µL in Slot 9')
})
it('renders correct text for dropTipInPlace', () => {
const { getByText } = renderWithProviders(
<CommandText
robotSideAnalysis={mockRobotSideAnalysis}
robotType={FLEX_ROBOT_TYPE}
command={
{
commandType: 'dropTipInPlace',
params: {
pipetteId: 'f6d1c83c-9d1b-4d0d-9de3-e6d649739cfb',
},
} as DropTipInPlaceRunTimeCommand
}
/>,
{ i18nInstance: i18n }
)[0]
getByText('Dropping tip in place')
})
it('renders correct text for pickUpTip', () => {
const command = mockRobotSideAnalysis.commands.find(
c => c.commandType === 'pickUpTip'
Expand Down
1 change: 1 addition & 0 deletions app/src/organisms/CommandText/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export function CommandText(props: Props): JSX.Element | null {
case 'dispense':
case 'blowout':
case 'dropTip':
case 'dropTipInPlace':
case 'pickUpTip': {
return (
<StyledText as="p" {...styleProps}>
Expand Down