From e6ae0f47485d8ce7a83986cfc8af911863a55901 Mon Sep 17 00:00:00 2001 From: Brent Hagen Date: Tue, 20 Aug 2024 15:24:17 -0400 Subject: [PATCH] fix(app): fix quick transfer DQA spacing issues (#16068) fixes a variety of quick transfer spacing and layout DQA issues closes RQA-2969, RQA-2970, RQA-2972, RQA-2978 --- .../localization/en/quick_transfer.json | 2 +- .../QuickTransferFlow/ConfirmExitModal.tsx | 2 +- .../QuickTransferFlow/NameQuickTransfer.tsx | 70 ++++++----- .../QuickTransferFlow/SaveOrRunModal.tsx | 7 +- .../QuickTransferFlow/SelectDestWells.tsx | 3 +- .../QuickTransferFlow/SelectSourceWells.tsx | 3 +- .../WellSelection/Selection384Wells.tsx | 114 +++++++++--------- .../DeleteTransferConfirmationModal.tsx | 41 ++----- 8 files changed, 121 insertions(+), 121 deletions(-) diff --git a/app/src/assets/localization/en/quick_transfer.json b/app/src/assets/localization/en/quick_transfer.json index b754376c81a..5bb266367e5 100644 --- a/app/src/assets/localization/en/quick_transfer.json +++ b/app/src/assets/localization/en/quick_transfer.json @@ -151,5 +151,5 @@ "well_ratio": "Quick transfers with multiple source wells can either be one-to-one (select {{wells}} for this transfer) or consolidate (select 1 destination well).", "well_selection": "Well selection", "wells": "wells", - "will_be_deleted": " will be permanently deleted." + "will_be_deleted": "{{transferName}} will be permanently deleted." } diff --git a/app/src/organisms/QuickTransferFlow/ConfirmExitModal.tsx b/app/src/organisms/QuickTransferFlow/ConfirmExitModal.tsx index 4577fb3c5a8..f6b0143dbb2 100644 --- a/app/src/organisms/QuickTransferFlow/ConfirmExitModal.tsx +++ b/app/src/organisms/QuickTransferFlow/ConfirmExitModal.tsx @@ -29,7 +29,7 @@ export const ConfirmExitModal = (props: ConfirmExitModalProps): JSX.Element => { > diff --git a/app/src/organisms/QuickTransferFlow/NameQuickTransfer.tsx b/app/src/organisms/QuickTransferFlow/NameQuickTransfer.tsx index 6c255680200..a68867e895f 100644 --- a/app/src/organisms/QuickTransferFlow/NameQuickTransfer.tsx +++ b/app/src/organisms/QuickTransferFlow/NameQuickTransfer.tsx @@ -6,12 +6,13 @@ import { LegacyStyledText, SPACING, DIRECTION_COLUMN, + JUSTIFY_CENTER, POSITION_FIXED, COLORS, TYPOGRAPHY, } from '@opentrons/components' import { getTopPortalEl } from '../../App/portal' -import { AlphanumericKeyboard } from '../../atoms/SoftwareKeyboard' +import { FullKeyboard } from '../../atoms/SoftwareKeyboard' import { InputField } from '../../atoms/InputField' import { ChildNavigation } from '../ChildNavigation' @@ -42,42 +43,53 @@ export function NameQuickTransfer(props: NameQuickTransferProps): JSX.Element { buttonIsDisabled={name === '' || error != null} /> - - - {t('enter_characters')} - - - {error} - - - { - setName(input) - }} - keyboardRef={keyboardRef} + + + {t('enter_characters')} + + + {error} + + + { + setName(input) + }} + keyboardRef={keyboardRef} + /> + , getTopPortalEl() ) diff --git a/app/src/organisms/QuickTransferFlow/SaveOrRunModal.tsx b/app/src/organisms/QuickTransferFlow/SaveOrRunModal.tsx index 2ec9d1e8b51..50fad88d3c4 100644 --- a/app/src/organisms/QuickTransferFlow/SaveOrRunModal.tsx +++ b/app/src/organisms/QuickTransferFlow/SaveOrRunModal.tsx @@ -33,13 +33,10 @@ export const SaveOrRunModal = (props: SaveOrRunModalProps): JSX.Element => { > - + {t('save_to_run_later')} diff --git a/app/src/organisms/QuickTransferFlow/SelectDestWells.tsx b/app/src/organisms/QuickTransferFlow/SelectDestWells.tsx index 6acc2c6968d..75612d711be 100644 --- a/app/src/organisms/QuickTransferFlow/SelectDestWells.tsx +++ b/app/src/organisms/QuickTransferFlow/SelectDestWells.tsx @@ -150,10 +150,11 @@ export function SelectDestWells(props: SelectDestWellsProps): JSX.Element { {labwareDefinition != null ? ( diff --git a/app/src/organisms/QuickTransferFlow/SelectSourceWells.tsx b/app/src/organisms/QuickTransferFlow/SelectSourceWells.tsx index 342bb157193..bd0aaceb65c 100644 --- a/app/src/organisms/QuickTransferFlow/SelectSourceWells.tsx +++ b/app/src/organisms/QuickTransferFlow/SelectSourceWells.tsx @@ -82,10 +82,11 @@ export function SelectSourceWells(props: SelectSourceWellsProps): JSX.Element { {state.source != null && displayLabwareDefinition != null ? ( diff --git a/app/src/organisms/WellSelection/Selection384Wells.tsx b/app/src/organisms/WellSelection/Selection384Wells.tsx index b857c9040ee..5a687d985a5 100644 --- a/app/src/organisms/WellSelection/Selection384Wells.tsx +++ b/app/src/organisms/WellSelection/Selection384Wells.tsx @@ -3,7 +3,6 @@ import { useTranslation } from 'react-i18next' import flatten from 'lodash/flatten' import { - Box, Checkbox, DIRECTION_COLUMN, Flex, @@ -131,16 +130,17 @@ export function Selection384Wells({ ) } return ( - - {labwareRender} + + {labwareRender} {channels === 1 ? ( {i18n.format(t('select_by'), 'capitalize')} - { - setSelectBy('columns') - setLastSelectedIndex(lastSelectedIndex => - lastSelectedIndex != null - ? Math.floor(lastSelectedIndex / ROW_COUNT_384) - : lastSelectedIndex - ) - }} - radioButtonType="small" - /> - { - setSelectBy('wells') - setLastSelectedIndex(lastSelectedIndex => - lastSelectedIndex != null - ? (lastSelectedIndex + 1) * ROW_COUNT_384 - 1 - : lastSelectedIndex - ) - }} - radioButtonType="small" - /> + + { + setSelectBy('columns') + setLastSelectedIndex(lastSelectedIndex => + lastSelectedIndex != null + ? Math.floor(lastSelectedIndex / ROW_COUNT_384) + : lastSelectedIndex + ) + }} + radioButtonType="small" + /> + { + setSelectBy('wells') + setLastSelectedIndex(lastSelectedIndex => + lastSelectedIndex != null + ? (lastSelectedIndex + 1) * ROW_COUNT_384 - 1 + : lastSelectedIndex + ) + }} + radioButtonType="small" + /> + ) } @@ -269,27 +271,29 @@ function StartingWell({ {i18n.format(t('starting_well'), 'capitalize')} - {checkboxWellOptions.map(well => ( - { - if (channels === 96) { - if (startingWellState[well]) { - deselectWells([well]) - } else { - selectWells({ [well]: null }) + + {checkboxWellOptions.map(well => ( + { + if (channels === 96) { + if (startingWellState[well]) { + deselectWells([well]) + } else { + selectWells({ [well]: null }) + } } - } - setStartingWellState(startingWellState => ({ - ...startingWellState, - [well]: !startingWellState[well], - })) - }} - /> - ))} + setStartingWellState(startingWellState => ({ + ...startingWellState, + [well]: !startingWellState[well], + })) + }} + /> + ))} + ) } @@ -321,7 +325,7 @@ function ButtonControls(props: ButtonControlsProps): JSX.Element { 'capitalize' )} - + - - {transferName} - {t('will_be_deleted')} - + + + + + ) } - -const TransferNameText = styled.span` - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 3; - overflow: ${OVERFLOW_HIDDEN}; - overflow-wrap: ${OVERFLOW_WRAP_ANYWHERE}; - font-weight: ${TYPOGRAPHY.fontWeightBold}; - font-size: ${TYPOGRAPHY.fontSize22}; - line-height: ${TYPOGRAPHY.lineHeight28}; - color: ${COLORS.grey60}; -` -const AdditionalText = styled.span` - font-weight: ${TYPOGRAPHY.fontWeightRegular}; - font-size: ${TYPOGRAPHY.fontSize22}; - line-height: ${TYPOGRAPHY.lineHeight28}; - color: ${COLORS.grey60}; -`