Skip to content

Commit

Permalink
feat(protocol-designer): z position tooltip and migration copy
Browse files Browse the repository at this point in the history
  • Loading branch information
jerader committed May 20, 2024
1 parent 6090b72 commit 75abb7a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
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,11 @@ export const TipPositionModal = (
value={xValue ?? ''}
/>
</Flex>
<Flex flexDirection={DIRECTION_COLUMN} gridGap={SPACING.spacing4}>
<Flex
flexDirection={DIRECTION_COLUMN}
gridGap={SPACING.spacing4}
{...targetProps}
>
<StyledText as="label" paddingLeft={SPACING.spacing24}>
{t('tip_position.field_titles.y_position')}
</StyledText>
Expand Down Expand Up @@ -290,6 +297,8 @@ export const TipPositionModal = (
value={zValue !== null ? zValue : ''}
/>
</Flex>

<Tooltip {...tooltipProps}>{t('tooltip:y_position_value')}</Tooltip>
</Flex>
) : null

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ export const getToV8_1MigrationMessage = (props: ModalProps): ModalContents => {
</p>
<p>{t('migrations.toV8_1Migration.body2')}</p>
<p>{t('migrations.toV8_1Migration.body3')}</p>
<p>{t('migrations.toV8_1Migration.body4')}</p>
</div>
),
}
Expand Down
3 changes: 2 additions & 1 deletion protocol-designer/src/localization/en/modal.json
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,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."
"body3": "Additionally, we have updated the default order for advanced settings. If both a touch tip and blow out are selected, the order is now swapped and will emit a touch tip followed by a blow out",
"body4": "As always, please contact us with any questions or feedback."
},
"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 75abb7a

Please sign in to comment.