Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(app): Error Recovery 8.2 DQA #16880

Merged
merged 8 commits into from
Nov 19, 2024
2 changes: 1 addition & 1 deletion app/src/assets/localization/en/app_settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions app/src/assets/localization/en/error_recovery.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"ignore_similar_errors_later_in_run": "Ignore similar errors later in the run?",
"inspect_the_robot": "<block>First, inspect the robot to ensure it's prepared to continue the run from the next step.</block><block>Then, close the robot door before proceeding.</block>",
"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",
Expand All @@ -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": "<block>Recovery Mode provides you with guided and manual controls for handling errors at runtime.</block><br/><block>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.</block>",
"release": "Release",
"release_labware_from_gripper": "Release labware from gripper",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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' })

Expand Down Expand Up @@ -172,7 +172,7 @@ describe('RecoverySplash', () => {

render(props)

clickButtonLabeled('Launch Recovery Mode')
clickButtonLabeled('Launch recovery mode')

expect(mockMakeToast).toHaveBeenCalled()
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,6 @@ const ANIMATION_CONTAINER_STYLE = css`
const ANIMATION_STYLE = css`
@media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} {
width: 27rem;
height: 18.75rem;
height: 20.25rem;
}
`
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -73,5 +74,6 @@ const LARGE_MODAL_STYLE = css`
@media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} {
height: 100%;
overflow: ${OVERFLOW_HIDDEN};
user-select: none;
}
`
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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={<OnOffToggle isOn={isEREnabled} />}
onClick={toggleERSettings}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.'
)
Expand Down
5 changes: 5 additions & 0 deletions components/src/icons/icon-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Loading