Skip to content

Commit

Permalink
fix format issue
Browse files Browse the repository at this point in the history
  • Loading branch information
koji committed Mar 6, 2024
1 parent 9eec04c commit ce88a2c
Show file tree
Hide file tree
Showing 192 changed files with 2,371 additions and 2,330 deletions.
6 changes: 3 additions & 3 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ module.exports = {

framework: {
name: '@storybook/react-vite',
options: {}
options: {},
},

docs: {
autodocs: true
}
autodocs: true,
},
}
1 change: 0 additions & 1 deletion __mocks__/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ module.exports = {
openPath: vi.fn(),
},
}

1 change: 0 additions & 1 deletion app-shell/src/system-info/__tests__/dispatch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import type { Dispatch } from '../../types'
import type { UsbDeviceMonitor } from '../usb-devices'
import type { NetworkInterfaceMonitor } from '../network-interfaces'


vi.mock('../../os')
vi.mock('../usb-devices')
vi.mock('../network-interfaces')
Expand Down
2 changes: 0 additions & 2 deletions app-shell/src/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
import { app, shell, BrowserWindow } from 'electron'
import path from 'path'


import { getConfig } from './config'
import { RELOAD_UI } from './constants'
import { createLogger } from './log'

import type { Action } from './types'


const config = getConfig('ui')
const log = createLogger('ui')

Expand Down
1 change: 0 additions & 1 deletion app-shell/src/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { UI_INITIALIZED, UPDATE_VALUE } from './constants'
import type { UpdateInfo } from '@opentrons/app/src/redux/shell/types'
import type { Action, Dispatch, PlainError } from './types'


const autoUpdater = updater.autoUpdater

autoUpdater.logger = createLogger('update')
Expand Down
1 change: 0 additions & 1 deletion app/src/App/__tests__/OnDeviceDisplayAppFallback.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ const render = (props: FallbackProps) => {
})
}


describe('OnDeviceDisplayAppFallback', () => {
let props: FallbackProps
let mockTrackEvent: Mock
Expand Down
2 changes: 1 addition & 1 deletion app/src/__testing-utils__/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './renderWithProviders'
export * from './matchers'
export * from './matchers'
2 changes: 1 addition & 1 deletion app/src/__testing-utils__/renderWithProviders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { render } from '@testing-library/react'
import { createStore } from 'redux'

import type { PreloadedState, Store } from 'redux'
import type { RenderOptions, RenderResult } from '@testing-library/react'
import type { RenderOptions, RenderResult } from '@testing-library/react'

export interface RenderWithProvidersOptions<State> extends RenderOptions {
initialState?: State
Expand Down
7 changes: 3 additions & 4 deletions app/src/molecules/modals/ErrorModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface Props {
description: string
close?: () => unknown
closeUrl?: string
error: { message?: string;[key: string]: unknown } | null
error: { message?: string; [key: string]: unknown } | null
}

const DEFAULT_HEADING = 'Unexpected Error'
Expand Down Expand Up @@ -41,9 +41,8 @@ export function ErrorModal(props: Props): JSX.Element {
</p>
<p>{description}</p>
<p>
If you keep getting this message, try restarting your app and/or
robot. If this does not resolve the issue please contact Opentrons
Support.
If you keep getting this message, try restarting your app and/or robot.
If this does not resolve the issue please contact Opentrons Support.
</p>
</AlertModal>,
getModalPortalEl()
Expand Down
132 changes: 67 additions & 65 deletions app/src/organisms/ApplyHistoricOffsets/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,76 +108,78 @@ export function ApplyHistoricOffsets(
>
{t(noOffsetData ? 'learn_more' : 'view_data')}
</Link>
{showOffsetDataModal ? createPortal(
<LegacyModalShell
maxWidth="40rem"
header={
<LegacyModalHeader
title={t(
noOffsetData
? 'what_is_labware_offset_data'
: 'stored_offset_data'
)}
onClose={() => setShowOffsetDataModal(false)}
/>
}
>
<Flex
flexDirection={DIRECTION_COLUMN}
padding={
noOffsetData
? `${SPACING.spacing16} ${SPACING.spacing32} ${SPACING.spacing32}`
: SPACING.spacing32
{showOffsetDataModal
? createPortal(
<LegacyModalShell
maxWidth="40rem"
header={
<LegacyModalHeader
title={t(
noOffsetData
? 'what_is_labware_offset_data'
: 'stored_offset_data'
)}
onClose={() => setShowOffsetDataModal(false)}
/>
}
>
{noOffsetData ? (
<Trans
t={t}
i18nKey={'robot_has_no_offsets_from_previous_runs'}
components={{
block: (
<StyledText as="p" marginBottom={SPACING.spacing8} />
),
}}
/>
) : (
<StyledText as="p">
{t('robot_has_offsets_from_previous_runs')}
</StyledText>
)}
<ExternalLink
marginTop={noOffsetData ? '0px' : SPACING.spacing8}
href={HOW_OFFSETS_WORK_SUPPORT_URL}
<Flex
flexDirection={DIRECTION_COLUMN}
padding={
noOffsetData
? `${SPACING.spacing16} ${SPACING.spacing32} ${SPACING.spacing32}`
: SPACING.spacing32
}
>
{t('see_how_offsets_work')}
</ExternalLink>
{!noOffsetData ? (
isLabwareOffsetCodeSnippetsOn ? (
<LabwareOffsetTabs
TableComponent={
<LabwareOffsetTable
offsetCandidates={offsetCandidates}
labwareDefinitions={getLabwareDefinitionsFromCommands(
commands
)}
/>
}
JupyterComponent={JupyterSnippet}
CommandLineComponent={CommandLineSnippet}
{noOffsetData ? (
<Trans
t={t}
i18nKey={'robot_has_no_offsets_from_previous_runs'}
components={{
block: (
<StyledText as="p" marginBottom={SPACING.spacing8} />
),
}}
/>
) : (
<LabwareOffsetTable
offsetCandidates={offsetCandidates}
labwareDefinitions={getLabwareDefinitionsFromCommands(
commands
)}
/>
)
) : null}
</Flex>
</LegacyModalShell>,
getTopPortalEl()
) : null}
<StyledText as="p">
{t('robot_has_offsets_from_previous_runs')}
</StyledText>
)}
<ExternalLink
marginTop={noOffsetData ? '0px' : SPACING.spacing8}
href={HOW_OFFSETS_WORK_SUPPORT_URL}
>
{t('see_how_offsets_work')}
</ExternalLink>
{!noOffsetData ? (
isLabwareOffsetCodeSnippetsOn ? (
<LabwareOffsetTabs
TableComponent={
<LabwareOffsetTable
offsetCandidates={offsetCandidates}
labwareDefinitions={getLabwareDefinitionsFromCommands(
commands
)}
/>
}
JupyterComponent={JupyterSnippet}
CommandLineComponent={CommandLineSnippet}
/>
) : (
<LabwareOffsetTable
offsetCandidates={offsetCandidates}
labwareDefinitions={getLabwareDefinitionsFromCommands(
commands
)}
/>
)
) : null}
</Flex>
</LegacyModalShell>,
getTopPortalEl()
)
: null}
</Flex>
)
}
86 changes: 43 additions & 43 deletions app/src/organisms/CalibrateDeck/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,49 +137,49 @@ export function CalibrateDeck(
? PANEL_BY_STEP[currentStep]
: null
return createPortal(
<LegacyModalShell
width="47rem"
header={
<WizardHeader
title={t('deck_calibration')}
currentStep={
STEPS_IN_ORDER.findIndex(step => step === currentStep) ?? 0
}
totalSteps={STEPS_IN_ORDER.length - 1}
onExit={confirmExit}
/>
}
>
{showSpinner || currentStep == null || Panel == null ? (
<LoadingState />
) : showConfirmExit ? (
<ConfirmExit
exit={confirmExit}
back={cancelExit}
heading={t('progress_will_be_lost', {
sessionType: t('deck_calibration'),
})}
body={t('confirm_exit_before_completion', {
sessionType: t('deck_calibration'),
})}
/>
) : (
<Panel
sendCommands={sendCommands}
cleanUpAndExit={cleanUpAndExit}
tipRack={tipRack}
isMulti={isMulti}
mount={instrument?.mount.toLowerCase() as Mount}
currentStep={currentStep}
sessionType={session.sessionType}
supportedCommands={supportedCommands}
defaultTipracks={instrument?.defaultTipracks}
calInvalidationHandler={offsetInvalidationHandler}
allowChangeTipRack
/>
)}
</LegacyModalShell>,
getTopPortalEl()
<LegacyModalShell
width="47rem"
header={
<WizardHeader
title={t('deck_calibration')}
currentStep={
STEPS_IN_ORDER.findIndex(step => step === currentStep) ?? 0
}
totalSteps={STEPS_IN_ORDER.length - 1}
onExit={confirmExit}
/>
}
>
{showSpinner || currentStep == null || Panel == null ? (
<LoadingState />
) : showConfirmExit ? (
<ConfirmExit
exit={confirmExit}
back={cancelExit}
heading={t('progress_will_be_lost', {
sessionType: t('deck_calibration'),
})}
body={t('confirm_exit_before_completion', {
sessionType: t('deck_calibration'),
})}
/>
) : (
<Panel
sendCommands={sendCommands}
cleanUpAndExit={cleanUpAndExit}
tipRack={tipRack}
isMulti={isMulti}
mount={instrument?.mount.toLowerCase() as Mount}
currentStep={currentStep}
sessionType={session.sessionType}
supportedCommands={supportedCommands}
defaultTipracks={instrument?.defaultTipracks}
calInvalidationHandler={offsetInvalidationHandler}
allowChangeTipRack
/>
)}
</LegacyModalShell>,
getTopPortalEl()
)
}

Expand Down
Loading

0 comments on commit ce88a2c

Please sign in to comment.