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

fix(app): fix calibration copy, 96 wizard attach title #13927

Merged
merged 2 commits into from
Nov 6, 2023
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
1 change: 1 addition & 0 deletions app/src/assets/localization/en/device_settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"are_you_sure_you_want_to_disconnect": "Are you sure you want to disconnect from {{ssid}}?",
"attach_a_pipette_before_calibrating": "Attach a pipette in order to perform calibration",
"boot_scripts": "Boot scripts",
"both": "Both",
"browse_file_system": "Browse file system",
"bug_fixes": "Bug Fixes",
"calibrate_deck": "Calibrate deck",
Expand Down
7 changes: 5 additions & 2 deletions app/src/organisms/PipetteWizardFlows/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,11 @@ export const PipetteWizardFlows = (

const attachedPipettes = useAttachedPipettesFromInstrumentsQuery()
const memoizedPipetteInfo = React.useMemo(() => props.pipetteInfo ?? null, [])
const isGantryEmpty =
attachedPipettes[LEFT] == null && attachedPipettes[RIGHT] == null
const isGantryEmpty = React.useMemo(
() => attachedPipettes[LEFT] == null && attachedPipettes[RIGHT] == null,
[]
)

const pipetteWizardSteps = React.useMemo(
() =>
memoizedPipetteInfo == null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { StyledText } from '../../../atoms/text'
import { OverflowMenu } from './OverflowMenu'
import { formatLastCalibrated, getDisplayNameForTipRack } from './utils'
import { getCustomLabwareDefinitions } from '../../../redux/custom-labware'
import { LEFT } from '../../../redux/pipettes'
import {
useAttachedPipettes,
useIsFlex,
Expand Down Expand Up @@ -66,10 +67,13 @@ export function PipetteOffsetCalibrationItems({
const attachedPipettesFromPipetteQuery = useAttachedPipettes()
const attachedPipetteFromInstrumentQuery = useAttachedPipettesFromInstrumentsQuery()
const isFlex = useIsFlex(robotName)
const attachedPipettes = Boolean(isFlex)
const attachedPipettes = isFlex
? attachedPipetteFromInstrumentQuery
: attachedPipettesFromPipetteQuery

const is96Attached =
// @ts-expect-error isFlex is a type narrower but not recognized as one
isFlex && attachedPipettes?.[LEFT]?.instrumentName === 'p1000_96'
return (
<StyledTable>
<thead>
Expand Down Expand Up @@ -97,7 +101,7 @@ export function PipetteOffsetCalibrationItems({
as="p"
textTransform={TYPOGRAPHY.textTransformCapitalize}
>
{calibration.mount}
{is96Attached ? t('both') : calibration.mount}
</StyledText>
</StyledTableCell>
{isFlex ? null : (
Expand Down
Loading