From 0f115947f1b663b2e57ea1987064ffa423a2b3df Mon Sep 17 00:00:00 2001 From: Jamey Huffnagle Date: Mon, 18 Nov 2024 19:31:59 -0500 Subject: [PATCH] fix(app): Error Recovery 8.2 DQA (#16880) Closes RQA-3608, RQA-3609, RQA-3611, RQA-3613, RQA-3610, RQA-3612, and RQA-3615 --- app/src/assets/localization/en/app_settings.json | 2 +- app/src/assets/localization/en/error_recovery.json | 4 ++-- .../AdvancedTab/__tests__/EnableErrorRecoveryMode.test.tsx | 2 +- .../organisms/DropTipWizardFlows/steps/BeforeBeginning.tsx | 4 ++++ .../ErrorRecoveryFlows/__tests__/RecoverySplash.test.tsx | 4 ++-- .../ErrorRecoveryFlows/shared/GripperIsHoldingLabware.tsx | 2 +- .../ErrorRecoveryFlows/shared/GripperReleaseLabware.tsx | 2 +- .../ErrorRecoveryFlows/shared/RecoveryInterventionModal.tsx | 2 ++ .../ErrorRecoveryFlows/shared/TwoColLwInfoAndDeck.tsx | 2 +- .../shared/__tests__/TwoColLwInfoAndDeck.test.tsx | 2 +- .../pages/ODD/RobotSettingsDashboard/RobotSettingsList.tsx | 2 +- .../__tests__/RobotSettingsDashboard.test.tsx | 2 +- components/src/icons/icon-data.ts | 5 +++++ 13 files changed, 23 insertions(+), 12 deletions(-) diff --git a/app/src/assets/localization/en/app_settings.json b/app/src/assets/localization/en/app_settings.json index 3f957ebe608..77ee3a9fd3f 100644 --- a/app/src/assets/localization/en/app_settings.json +++ b/app/src/assets/localization/en/app_settings.json @@ -40,7 +40,7 @@ "enable_dev_tools_description": "Enabling this setting opens Developer Tools on app launch, enables additional logging and gives access to feature flags.", "error_boundary_desktop_app_description": "You need to reload the app. Contact support with the following error message:", "error_boundary_title": "An unknown error has occurred", - "error_recovery_mode": "Error Recovery Mode", + "error_recovery_mode": "Recovery mode", "error_recovery_mode_description": "Pause on protocol errors instead of canceling the run.", "feature_flags": "Feature Flags", "general": "General", diff --git a/app/src/assets/localization/en/error_recovery.json b/app/src/assets/localization/en/error_recovery.json index 392c9c694c3..b46e276c48b 100644 --- a/app/src/assets/localization/en/error_recovery.json +++ b/app/src/assets/localization/en/error_recovery.json @@ -43,7 +43,7 @@ "ignore_similar_errors_later_in_run": "Ignore similar errors later in the run?", "inspect_the_robot": "First, inspect the robot to ensure it's prepared to continue the run from the next step.Then, close the robot door before proceeding.", "labware_released_from_current_height": "The labware will be released from its current height.", - "launch_recovery_mode": "Launch Recovery Mode", + "launch_recovery_mode": "Launch recovery mode", "manually_fill_liquid_in_well": "Manually fill liquid in well {{well}}", "manually_fill_well_and_skip": "Manually fill well and skip to next step", "manually_move_lw_and_skip": "Manually move labware and skip to next step", @@ -60,7 +60,7 @@ "proceed_to_cancel": "Proceed to cancel", "proceed_to_tip_selection": "Proceed to tip selection", "recovery_action_failed": "{{action}} failed", - "recovery_mode": "Recovery Mode", + "recovery_mode": "Recovery mode", "recovery_mode_explanation": "Recovery Mode provides you with guided and manual controls for handling errors at runtime.
You can make changes to ensure the step in progress when the error occurred can be completed or choose to cancel the protocol. When changes are made and no subsequent errors are detected, the method completes. Depending on the conditions that caused the error, you will only be provided with appropriate options.", "release": "Release", "release_labware_from_gripper": "Release labware from gripper", diff --git a/app/src/organisms/Desktop/Devices/RobotSettings/AdvancedTab/__tests__/EnableErrorRecoveryMode.test.tsx b/app/src/organisms/Desktop/Devices/RobotSettings/AdvancedTab/__tests__/EnableErrorRecoveryMode.test.tsx index a2d4824951f..9406e38f768 100644 --- a/app/src/organisms/Desktop/Devices/RobotSettings/AdvancedTab/__tests__/EnableErrorRecoveryMode.test.tsx +++ b/app/src/organisms/Desktop/Devices/RobotSettings/AdvancedTab/__tests__/EnableErrorRecoveryMode.test.tsx @@ -32,7 +32,7 @@ describe('EnableErrorRecoveryMode', () => { it('should render text and toggle button', () => { render(props) - screen.getByText('Error Recovery Mode') + screen.getByText('Recovery mode') screen.getByText('Pause on protocol errors instead of canceling the run.') expect( screen.getByLabelText('enable_error_recovery_mode') diff --git a/app/src/organisms/DropTipWizardFlows/steps/BeforeBeginning.tsx b/app/src/organisms/DropTipWizardFlows/steps/BeforeBeginning.tsx index bbcb908ea24..82be17832b4 100644 --- a/app/src/organisms/DropTipWizardFlows/steps/BeforeBeginning.tsx +++ b/app/src/organisms/DropTipWizardFlows/steps/BeforeBeginning.tsx @@ -235,6 +235,10 @@ const CONTAINER_STYLE = css` display: ${DISPLAY_FLEX}; flex-direction: ${DIRECTION_COLUMN}; grid-gap: ${SPACING.spacing16}; + + @media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} { + grid-gap: ${SPACING.spacing8}; + } ` const ODD_MEDIUM_BUTTON_STYLE = css` diff --git a/app/src/organisms/ErrorRecoveryFlows/__tests__/RecoverySplash.test.tsx b/app/src/organisms/ErrorRecoveryFlows/__tests__/RecoverySplash.test.tsx index da3ddc07629..6bb18c4c5ec 100644 --- a/app/src/organisms/ErrorRecoveryFlows/__tests__/RecoverySplash.test.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/__tests__/RecoverySplash.test.tsx @@ -132,7 +132,7 @@ describe('RecoverySplash', () => { render(props) const primaryBtn = screen.getByRole('button', { - name: 'Launch Recovery Mode', + name: 'Launch recovery mode', }) const secondaryBtn = screen.getByRole('button', { name: 'Cancel run' }) @@ -172,7 +172,7 @@ describe('RecoverySplash', () => { render(props) - clickButtonLabeled('Launch Recovery Mode') + clickButtonLabeled('Launch recovery mode') expect(mockMakeToast).toHaveBeenCalled() }) diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/GripperIsHoldingLabware.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/GripperIsHoldingLabware.tsx index 94ef850834c..036f1aff3d0 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/GripperIsHoldingLabware.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/GripperIsHoldingLabware.tsx @@ -14,11 +14,11 @@ import { import { RecoverySingleColumnContentWrapper } from './RecoveryContentWrapper' import { RecoveryFooterButtons } from './RecoveryFooterButtons' import { ODD_ONLY, DESKTOP_ONLY, RECOVERY_MAP } from '../constants' +import { RecoveryRadioGroup } from '/app/organisms/ErrorRecoveryFlows/shared/RecoveryRadioGroup' import type { JSX } from 'react' import type { TFunction } from 'i18next' import type { RecoveryContentProps } from '../types' -import { RecoveryRadioGroup } from '/app/organisms/ErrorRecoveryFlows/shared/RecoveryRadioGroup' type HoldingLabwareOption = 'yes' | 'no' export const HOLDING_LABWARE_OPTIONS: HoldingLabwareOption[] = [ diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/GripperReleaseLabware.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/GripperReleaseLabware.tsx index 3e0c24756d2..2c433775a83 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/GripperReleaseLabware.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/GripperReleaseLabware.tsx @@ -95,6 +95,6 @@ const ANIMATION_CONTAINER_STYLE = css` const ANIMATION_STYLE = css` @media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} { width: 27rem; - height: 18.75rem; + height: 20.25rem; } ` diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/RecoveryInterventionModal.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/RecoveryInterventionModal.tsx index ccfaa8376ba..82974023805 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/RecoveryInterventionModal.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/RecoveryInterventionModal.tsx @@ -63,6 +63,7 @@ const SMALL_MODAL_STYLE = css` padding: ${SPACING.spacing32}; height: 100%; overflow: ${OVERFLOW_HIDDEN}; + user-select: none; } ` const LARGE_MODAL_STYLE = css` @@ -73,5 +74,6 @@ const LARGE_MODAL_STYLE = css` @media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} { height: 100%; overflow: ${OVERFLOW_HIDDEN}; + user-select: none; } ` diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/TwoColLwInfoAndDeck.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/TwoColLwInfoAndDeck.tsx index e378b25d769..00fa95072c1 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/TwoColLwInfoAndDeck.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/TwoColLwInfoAndDeck.tsx @@ -102,9 +102,9 @@ export function TwoColLwInfoAndDeck( >['infoProps']['type'] => { switch (selectedRecoveryOption) { case MANUAL_MOVE_AND_SKIP.ROUTE: - case MANUAL_REPLACE_AND_RETRY.ROUTE: return 'location-arrow-location' default: + case MANUAL_REPLACE_AND_RETRY.ROUTE: return 'location' } } diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/TwoColLwInfoAndDeck.test.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/TwoColLwInfoAndDeck.test.tsx index 15094e5aacb..0629038f800 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/TwoColLwInfoAndDeck.test.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/TwoColLwInfoAndDeck.test.tsx @@ -98,7 +98,7 @@ describe('TwoColLwInfoAndDeck', () => { expect(vi.mocked(LeftColumnLabwareInfo)).toHaveBeenCalledWith( expect.objectContaining({ title: 'Manually replace labware on deck', - type: 'location-arrow-location', + type: 'location', bannerText: 'Ensure labware is accurately placed in the slot to prevent further errors.', }), diff --git a/app/src/pages/ODD/RobotSettingsDashboard/RobotSettingsList.tsx b/app/src/pages/ODD/RobotSettingsDashboard/RobotSettingsList.tsx index 043b2b8b843..cbc0d68e353 100644 --- a/app/src/pages/ODD/RobotSettingsDashboard/RobotSettingsList.tsx +++ b/app/src/pages/ODD/RobotSettingsDashboard/RobotSettingsList.tsx @@ -200,7 +200,7 @@ export function RobotSettingsList(props: RobotSettingsListProps): JSX.Element { settingName={t('app_settings:error_recovery_mode')} dataTestId="RobotSettingButton_error_recovery_mode" settingInfo={t('app_settings:error_recovery_mode_description')} - iconName="recovery" + iconName="recovery-alt" rightElement={} onClick={toggleERSettings} /> diff --git a/app/src/pages/ODD/RobotSettingsDashboard/__tests__/RobotSettingsDashboard.test.tsx b/app/src/pages/ODD/RobotSettingsDashboard/__tests__/RobotSettingsDashboard.test.tsx index 00b70120809..9fa824ec0b9 100644 --- a/app/src/pages/ODD/RobotSettingsDashboard/__tests__/RobotSettingsDashboard.test.tsx +++ b/app/src/pages/ODD/RobotSettingsDashboard/__tests__/RobotSettingsDashboard.test.tsx @@ -113,7 +113,7 @@ describe('RobotSettingsDashboard', () => { screen.getByText('Robot System Version') screen.getByText('Network Settings') screen.getByText('Status LEDs') - screen.getByText('Error Recovery Mode') + screen.getByText('Recovery mode') screen.getByText( 'Control the strip of color lights on the front of the robot.' ) diff --git a/components/src/icons/icon-data.ts b/components/src/icons/icon-data.ts index 9f8338c7e87..c4f2cb46466 100644 --- a/components/src/icons/icon-data.ts +++ b/components/src/icons/icon-data.ts @@ -655,6 +655,11 @@ export const ICON_DATA_BY_NAME: Record< 'M24.4 49.6H34.2V38.6H44.2V29.8H34.2V18.8H24.4V29.8H13.4V38.6H24.4V49.6ZM28.8 72C20.46 69.9 13.575 65.115 8.145 57.645C2.715 50.175 0 41.88 0 32.76V10.8L28.8 0L57.6 10.8V32.76C57.6 41.88 54.885 50.175 49.455 57.645C44.025 65.115 37.14 69.9 28.8 72Z', viewBox: '0 0 58 72', }, + 'recovery-alt': { + path: + 'M14.5 27.2563H17.5V11.4062H14.5V27.2563ZM16 40.4062C11.3333 39.2396 7.5 36.5312 4.5 32.2812C1.5 28.0312 0 23.3729 0 18.3062V6.40625L16 0.40625L32 6.40625V18.3062C32 23.3729 30.5 28.0312 27.5 32.2812C24.5 36.5312 20.6667 39.2396 16 40.4062ZM16 37.3063C19.8333 36.0396 22.9583 33.6479 25.375 30.1313C27.7917 26.6146 29 22.6729 29 18.3062V8.50625L16 3.60625L3 8.50625V18.3062C3 22.6729 4.20833 26.6146 6.625 30.1313C9.04167 33.6479 12.1667 36.0396 16 37.3063Z M23.85 17.9062V20.9062H8V17.9062H23.85Z M17.5 17.9062H14.5V20.9062H17.5V17.9062Z', + viewBox: '0 0 32 41', + }, 'radiobox-blank': { path: 'M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z',