Skip to content

Commit

Permalink
feat(protocol-designer): y position tooltip and migration copy (#15225)
Browse files Browse the repository at this point in the history
  • Loading branch information
jerader authored May 21, 2024
1 parent 8f56392 commit 1a32d61
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 24 deletions.
2 changes: 1 addition & 1 deletion protocol-designer/cypress/e2e/migrations.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ describe('Protocol fixtures migrate and match snapshots', () => {
if (migrationModal === 'v8.1') {
cy.get('div')
.contains(
'The default dispense height is now 1mm from the bottom of the well'
'The default dispense height is now 1 mm from the bottom of the well'
)
.should('exist')
cy.get('button').contains('ok', { matchCase: false }).click()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import {
RadioGroup,
SPACING,
StyledText,
Tooltip,
useHoverTooltip,
} from '@opentrons/components'
import { getMainPagePortalEl } from '../../../portals/MainPageModalPortal'
import { getIsTouchTipField } from '../../../../form-types'
Expand Down Expand Up @@ -51,11 +53,12 @@ export const TipPositionModal = (
wellYWidthMm,
closeModal,
} = props
const [targetProps, tooltipProps] = useHoverTooltip()
const zSpec = specs.z
const ySpec = specs.y
const xSpec = specs.x

const { t } = useTranslation(['modal', 'button'])
const { t } = useTranslation(['modal', 'button', 'tooltip'])

if (zSpec == null || xSpec == null || ySpec == null) {
console.error(
Expand Down Expand Up @@ -255,7 +258,12 @@ export const TipPositionModal = (
value={xValue ?? ''}
/>
</Flex>
<Flex flexDirection={DIRECTION_COLUMN} gridGap={SPACING.spacing4}>
<Flex
flexDirection={DIRECTION_COLUMN}
gridGap={SPACING.spacing4}
width="max-content"
{...targetProps}
>
<StyledText as="label" paddingLeft={SPACING.spacing24}>
{t('tip_position.field_titles.y_position')}
</StyledText>
Expand All @@ -271,6 +279,7 @@ export const TipPositionModal = (
units="mm"
value={yValue ?? ''}
/>
<Tooltip {...tooltipProps}>{t('tooltip:y_position_value')}</Tooltip>
</Flex>
<Flex flexDirection={DIRECTION_COLUMN} gridGap={SPACING.spacing4}>
<StyledText as="label" paddingLeft={SPACING.spacing24}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,24 +145,6 @@ export const SourceDestFields = (props: SourceDestFieldsProps): JSX.Element => {
</>
)}

<CheckboxRowField
{...propsForFields[addFieldNamePrefix('touchTip_checkbox')]}
label={t('step_edit_form.field.touchTip.label')}
className={styles.small_field}
>
<TipPositionField
propsForFields={propsForFields}
zField={`${prefix}_touchTip_mmFromBottom`}
labwareId={
formData[
getLabwareFieldForPositioningField(
addFieldNamePrefix('touchTip_mmFromBottom')
)
]
}
/>
</CheckboxRowField>

{prefix === 'dispense' && (
<CheckboxRowField
{...propsForFields.blowout_checkbox}
Expand Down Expand Up @@ -192,6 +174,25 @@ export const SourceDestFields = (props: SourceDestFieldsProps): JSX.Element => {
/>
</CheckboxRowField>
)}

<CheckboxRowField
{...propsForFields[addFieldNamePrefix('touchTip_checkbox')]}
label={t('step_edit_form.field.touchTip.label')}
className={styles.small_field}
>
<TipPositionField
propsForFields={propsForFields}
zField={`${prefix}_touchTip_mmFromBottom`}
labwareId={
formData[
getLabwareFieldForPositioningField(
addFieldNamePrefix('touchTip_mmFromBottom')
)
]
}
/>
</CheckboxRowField>

<CheckboxRowField
{...propsForFields[addFieldNamePrefix('airGap_checkbox')]}
label={t('step_edit_form.field.airGap.label')}
Expand Down
4 changes: 2 additions & 2 deletions protocol-designer/src/localization/en/modal.json
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@
},
"toV8_1Migration": {
"body1": "Your protocol will be automatically updated to the latest version.",
"body2": "The default dispense height is now 1mm from the bottom of the well. If your protocol contains any dispense commands without a custom height, it will be automatically updated.",
"body3": "As always, please contact us with any questions or feedback."
"body2": "The default dispense height is now 1 mm from the bottom of the well, instead of 0.5 mm. All dispense commands without a custom height will change to use the new default height.",
"body3": "Additionally, blowout actions now precede touch tip actions. The new order affects all dispenses that include both actions."
},
"toV8Migration": {
"body1": "Your protocol will be automatically updated to the latest version.",
Expand Down
3 changes: 2 additions & 1 deletion protocol-designer/src/localization/en/tooltip.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"not_enough_space_for_temp": "There is not enough space on the deck to add more temperature modules",
"not_in_beta": "ⓘ Coming Soon",
"missing_tiprack": "Missing a tiprack? Make sure it is added to the deck",
"y_position_value": "A negative value moves towards the front",

"step_description": {
"heaterShaker": "Set heat, shake, or labware latch commands for the Heater-Shaker module",
Expand Down Expand Up @@ -41,7 +42,7 @@
"dispense_flowRate": "The speed at which the pipette dispenses",
"dispense_mix_checkbox": "Pipette up and down after dispensing",
"dispense_mmFromBottom": "Adjust tip position for dispense",
"dispense_touchTip_checkbox": "Touch tip to each side of well after dispensing",
"dispense_touchTip_checkbox": "Touch tip to each side of well after dispensing and other dispense advanced setting commands",
"dispense_touchTip_mmFromBottom": "Distance from the bottom of the well",
"disposalVolume_checkbox": "Aspirate extra volume that is disposed of after a multi-dispense is complete. We recommend a disposal volume of at least the pipette's minimum.",
"heaterShakerSetTimer": "Once this counter has elapsed, the module will deactivate the heater and shaker",
Expand Down

0 comments on commit 1a32d61

Please sign in to comment.