From 1a32d618e2ac6179388eadaa058e0b05d2f90533 Mon Sep 17 00:00:00 2001 From: Jethary Rader <66035149+jerader@users.noreply.github.com> Date: Tue, 21 May 2024 07:32:57 -0400 Subject: [PATCH] feat(protocol-designer): y position tooltip and migration copy (#15225) closes AUTH-398 AUTH-409 --- .../cypress/e2e/migrations.cy.js | 2 +- .../TipPositionField/TipPositionModal.tsx | 13 ++++++- .../forms/MoveLiquidForm/SourceDestFields.tsx | 37 ++++++++++--------- .../src/localization/en/modal.json | 4 +- .../src/localization/en/tooltip.json | 3 +- 5 files changed, 35 insertions(+), 24 deletions(-) diff --git a/protocol-designer/cypress/e2e/migrations.cy.js b/protocol-designer/cypress/e2e/migrations.cy.js index 08fd71b7206..e31402f9996 100644 --- a/protocol-designer/cypress/e2e/migrations.cy.js +++ b/protocol-designer/cypress/e2e/migrations.cy.js @@ -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() diff --git a/protocol-designer/src/components/StepEditForm/fields/TipPositionField/TipPositionModal.tsx b/protocol-designer/src/components/StepEditForm/fields/TipPositionField/TipPositionModal.tsx index 2ec2e7f41ab..297b2bdb9a0 100644 --- a/protocol-designer/src/components/StepEditForm/fields/TipPositionField/TipPositionModal.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/TipPositionField/TipPositionModal.tsx @@ -10,6 +10,8 @@ import { RadioGroup, SPACING, StyledText, + Tooltip, + useHoverTooltip, } from '@opentrons/components' import { getMainPagePortalEl } from '../../../portals/MainPageModalPortal' import { getIsTouchTipField } from '../../../../form-types' @@ -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( @@ -255,7 +258,12 @@ export const TipPositionModal = ( value={xValue ?? ''} /> - + {t('tip_position.field_titles.y_position')} @@ -271,6 +279,7 @@ export const TipPositionModal = ( units="mm" value={yValue ?? ''} /> + {t('tooltip:y_position_value')} diff --git a/protocol-designer/src/components/StepEditForm/forms/MoveLiquidForm/SourceDestFields.tsx b/protocol-designer/src/components/StepEditForm/forms/MoveLiquidForm/SourceDestFields.tsx index f37060c242c..6e972dac3a1 100644 --- a/protocol-designer/src/components/StepEditForm/forms/MoveLiquidForm/SourceDestFields.tsx +++ b/protocol-designer/src/components/StepEditForm/forms/MoveLiquidForm/SourceDestFields.tsx @@ -145,24 +145,6 @@ export const SourceDestFields = (props: SourceDestFieldsProps): JSX.Element => { )} - - - - {prefix === 'dispense' && ( { /> )} + + + + +