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

feat(components, app): move CommandText and TimelineScrubber components #17284

Merged
merged 10 commits into from
Jan 16, 2025
Prev Previous commit
Next Next commit
move command text over
jerader committed Jan 15, 2025
commit 985784e40646d6a0a4d3ce9cde25826bf72df5ec
4 changes: 2 additions & 2 deletions app/src/local-resources/commands/hooks/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export { useCommandTextString } from './useCommandTextString'
export { useCommandTextString } from '@opentrons/components/src/organisms/CommandText/useCommandTextString'

export type {
UseCommandTextStringParams,
GetCommandText,
GetCommandTextResult,
GetTCRunExtendedProfileCommandTextResult,
GetTCRunProfileCommandTextResult,
} from './useCommandTextString'
} from '@opentrons/components/src/organisms/CommandText/useCommandTextString'
276 changes: 276 additions & 0 deletions components/src/organisms/CommandText/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,276 @@
import pick from 'lodash/pick'
import { css } from 'styled-components'

import type { ComponentProps } from 'react'
import type {
LabwareDefinition2,
RobotType,
RunTimeCommand,
} from '@opentrons/shared-data'
import { Flex } from '../../primitives'
import type { StyleProps } from '../../primitives'

import { LegacyStyledText, StyledText } from '../../atoms'
import { ALIGN_CENTER, DIRECTION_COLUMN } from '../../styles'
import { RESPONSIVENESS, SPACING } from '../../ui-style-constants'
import { useCommandTextString } from './useCommandTextString'
import type { GetTCRunExtendedProfileCommandTextResult } from './useCommandTextString'
import type { CommandTextData } from '../ProtocolTimelineScrubber/types'

interface LegacySTProps {
as?: ComponentProps<typeof LegacyStyledText>['as']
modernStyledTextDefaults?: false
}

interface ModernSTProps {
desktopStyle?: ComponentProps<typeof StyledText>['desktopStyle']
oddStyle?: ComponentProps<typeof StyledText>['oddStyle']
modernStyledTextDefaults: true
}

type STProps = LegacySTProps | ModernSTProps

interface BaseProps extends StyleProps {
command: RunTimeCommand
allRunDefs: LabwareDefinition2[]
commandTextData: CommandTextData
robotType: RobotType
isOnDevice?: boolean
propagateCenter?: boolean
propagateTextLimit?: boolean
}
export function CommandText(props: BaseProps & STProps): JSX.Element | null {
const commandText = useCommandTextString({
...props,
})

switch (commandText.kind) {
case 'thermocycler/runProfile': {
return (
<ThermocyclerRunProfile
{...props}
commandText={commandText.commandText}
stepTexts={commandText.stepTexts}
/>
)
}
case 'thermocycler/runExtendedProfile': {
return (
<ThermocyclerRunExtendedProfile
{...props}
commandText={commandText.commandText}
profileElementTexts={commandText.profileElementTexts}
/>
)
}
default: {
return (
<CommandStyledText {...props}>
{commandText.commandText}
</CommandStyledText>
)
}
}
}

const forwardSTProps = (props: STProps): STProps =>
pick(props, ['as', 'oddStyle', 'desktopStyle', 'modernStyledTextDefaults'])

const isModernSTProps = (props: STProps): props is ModernSTProps =>
props.hasOwnProperty('desktopStyle') ||
props.hasOwnProperty('oddStyle') ||
!!props.modernStyledTextDefaults

function CommandStyledText(
props: STProps & {
children: JSX.Element[] | JSX.Element | string
} & StyleProps
): JSX.Element {
if (isModernSTProps(props)) {
return (
<StyledText
desktopStyle={props.desktopStyle ?? 'bodyDefaultRegular'}
oddStyle={props.oddStyle ?? 'bodyTextRegular'}
{...props}
>
{props.children}
</StyledText>
)
} else {
return (
<LegacyStyledText as={props.as ?? 'p'} {...props}>
{props.children}
</LegacyStyledText>
)
}
}

const shouldPropagateCenter = (
propagateCenter: boolean,
isOnDevice?: boolean
): boolean => isOnDevice === true || propagateCenter
const shouldPropagateTextLimit = (
propagateTextLimit: boolean,
isOnDevice?: boolean
): boolean => isOnDevice === true || propagateTextLimit

type ThermocyclerRunProfileProps = BaseProps &
STProps &
Omit<GetTCRunProfileCommandTextResult, 'kind'>

function ThermocyclerRunProfile(
props: ThermocyclerRunProfileProps
): JSX.Element {
const {
isOnDevice,
propagateCenter = false,
propagateTextLimit = false,
commandText,
stepTexts,
...styleProps
} = props

// TODO(sfoster): Command sometimes wraps this in a cascaded display: -webkit-box
// to achieve multiline text clipping with an automatically inserted ellipsis, which works
// everywhere except for here where it overrides this property in the flex since this is
// the only place where CommandText uses a flex.
// The right way to handle this is probably to take the css that's in Command and make it
// live here instead, but that should be done in a followup since it would touch everything.
// See also the margin-left on the <li>s, which is needed to prevent their bullets from
// clipping if a container set overflow: hidden.
return (
<Flex
flexDirection={DIRECTION_COLUMN}
{...styleProps}
alignItems={
shouldPropagateCenter(propagateCenter, isOnDevice)
? ALIGN_CENTER
: undefined
}
css={`
@media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} {
display: flex !important;
} ;
`}
>
<CommandStyledText
{...forwardSTProps(props)}
marginBottom={SPACING.spacing4}
{...styleProps}
>
{commandText}
</CommandStyledText>
<CommandStyledText
{...forwardSTProps(props)}
marginLeft={SPACING.spacing16}
>
<ul>
{shouldPropagateTextLimit(propagateTextLimit, isOnDevice) ? (
<li css={LIST_STYLE}>{stepTexts[0]}</li>
) : (
stepTexts.map((step: string, index: number) => (
<li css={LIST_STYLE} key={index}>
{' '}
{step}
</li>
))
)}
</ul>
</CommandStyledText>
</Flex>
)
}

type ThermocyclerRunExtendedProfileProps = BaseProps &
STProps &
Omit<GetTCRunExtendedProfileCommandTextResult, 'kind'>

function ThermocyclerRunExtendedProfile(
props: ThermocyclerRunExtendedProfileProps
): JSX.Element {
const {
isOnDevice,
propagateCenter = false,
propagateTextLimit = false,
commandText,
profileElementTexts,
...styleProps
} = props

// TODO(sfoster): Command sometimes wraps this in a cascaded display: -webkit-box
// to achieve multiline text clipping with an automatically inserted ellipsis, which works
// everywhere except for here where it overrides this property in the flex since this is
// the only place where CommandText uses a flex.
// The right way to handle this is probably to take the css that's in Command and make it
// live here instead, but that should be done in a followup since it would touch everything.
// See also the margin-left on the <li>s, which is needed to prevent their bullets from
// clipping if a container set overflow: hidden.
return (
<Flex
flexDirection={DIRECTION_COLUMN}
{...styleProps}
alignItems={
shouldPropagateCenter(propagateCenter, isOnDevice)
? ALIGN_CENTER
: undefined
}
css={`
@media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} {
display: flex !important;
} ;
`}
>
<CommandStyledText
{...forwardSTProps(props)}
marginBottom={SPACING.spacing4}
{...styleProps}
>
{commandText}
</CommandStyledText>
<CommandStyledText
{...forwardSTProps(props)}
marginLeft={SPACING.spacing16}
>
<ul>
{shouldPropagateTextLimit(propagateTextLimit, isOnDevice) ? (
<li css={LIST_STYLE}>
{profileElementTexts[0].kind === 'step'
? profileElementTexts[0].stepText
: profileElementTexts[0].cycleText}
</li>
) : (
profileElementTexts.map((element, index: number) =>
element.kind === 'step' ? (
<li css={LIST_STYLE} key={`tc-outer-step-${index}`}>
{' '}
{element.stepText}
</li>
) : (
<li css={LIST_STYLE} key={`tc-outer-step-${index}`}>
{element.cycleText}
<ul>
{element.stepTexts.map(
({ stepText }, stepIndex: number) => (
<li
css={LIST_STYLE}
key={`tc-inner-step-${index}.${stepIndex}`}
>
{' '}
{stepText}
</li>
)
)}
</ul>
</li>
)
)
)}
</ul>
</CommandStyledText>
</Flex>
)
}

const LIST_STYLE = css`
margin-left: ${SPACING.spacing4};
`
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { useTranslation } from 'react-i18next'
import * as utils from './utils'

import type { TFunction } from 'i18next'
import type {
RunTimeCommand,
RobotType,
@@ -12,16 +10,17 @@ import type {
TCProfileCycleText,
GetDirectTranslationCommandText,
} from './utils'
import type { CommandTextData } from '/app/local-resources/commands/types'
import { CommandTextData } from '../../ProtocolTimelineScrubber/types'

export interface UseCommandTextStringParams {
command: RunTimeCommand | null
allRunDefs: LabwareDefinition2[]
commandTextData: CommandTextData | null
robotType: RobotType
t?: any
}

export type GetCommandText = UseCommandTextStringParams & { t: TFunction }
export type GetCommandText = UseCommandTextStringParams
export interface GetGenericCommandTextResult {
kind: 'generic'
/* The actual command text. Ex "Homing all gantry, pipette, and plunger axes" */
@@ -50,8 +49,7 @@ export type GetCommandTextResult =
export function useCommandTextString(
params: UseCommandTextStringParams
): GetCommandTextResult {
const { command } = params
const { t } = useTranslation('protocol_command_text')
const { command, t } = params

const fullParams = { ...params, t }

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { DeprecatedDelayRunTimeCommand } from '@opentrons/shared-data/command'
import type { DeprecatedDelayRunTimeCommand } from '@opentrons/shared-data'
import type { HandlesCommands } from '../types'

export function getDelayCommandText({
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions components/src/organisms/index.ts
Original file line number Diff line number Diff line change
@@ -2,3 +2,4 @@ export * from './DeckLabelSet'
export * from './EndUserAgreementFooter'
export * from './Toolbox'
export * from './ProtocolTimelineScrubber'
export * from './CommandText'

Unchanged files with check annotations Beta

</Flex>
</Btn>
)
}

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / opentrons ai frontend unit tests

opentrons-ai-client/src/App.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / opentrons ai frontend unit tests

opentrons-ai-client/src/OpentronsAI.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / opentrons ai frontend unit tests

opentrons-ai-client/src/atoms/SendButton/__tests__/SendButton.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / opentrons ai frontend unit tests

opentrons-ai-client/src/molecules/Accordion/__tests__/Accordion.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / opentrons ai frontend unit tests

opentrons-ai-client/src/molecules/ChatDisplay/__tests__/ChatDisplay.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / opentrons ai frontend unit tests

opentrons-ai-client/src/molecules/ChatFooter/__tests__/ChatFooter.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / opentrons ai frontend unit tests

opentrons-ai-client/src/molecules/ControlledAddLiquidInputs/__tests__/ControlledAddLiquidInputs.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / opentrons ai frontend unit tests

opentrons-ai-client/src/molecules/ControlledAddTextAreaFields/__tests__/ControlledAddTextAreaFields.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / opentrons ai frontend unit tests

opentrons-ai-client/src/molecules/ControlledEmptySelectorButtonGroup/__tests__/ControlledEmptySelectorButtonGroup.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / opentrons ai frontend unit tests

opentrons-ai-client/src/molecules/ControlledLabwareListItems/__tests__/ControlledLabwareListItems.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / labware library unit tests

labware-library/src/labware-creator/__tests__/StackingOffsets.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / labware library unit tests

labware-library/src/labware-creator/components/__tests__/FormAlerts.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / labware library unit tests

labware-library/src/labware-creator/components/__tests__/sections/CreateNewDefinition.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / labware library unit tests

labware-library/src/labware-creator/components/__tests__/sections/Description.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / labware library unit tests

labware-library/src/labware-creator/components/__tests__/sections/Export.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / labware library unit tests

labware-library/src/labware-creator/components/__tests__/sections/File.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / labware library unit tests

labware-library/src/labware-creator/components/__tests__/sections/Footprint.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / labware library unit tests

labware-library/src/labware-creator/components/__tests__/sections/Grid.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / labware library unit tests

labware-library/src/labware-creator/components/__tests__/sections/GridOffset.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / labware library unit tests

labware-library/src/labware-creator/components/__tests__/sections/HandPlacedTipFit.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / components unit tests

components/src/instrument/__tests__/InstrumentInfo.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / components unit tests

components/src/modals/__tests__/Modal.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / components unit tests

components/src/modals/__tests__/ModalHeader.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / components unit tests

components/src/atoms/ListItem/__tests__/ListItem.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / components unit tests

components/src/atoms/MenuList/__tests__/MenuList.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / components unit tests

components/src/atoms/buttons/__tests__/AltPrimaryButton.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / components unit tests

components/src/atoms/buttons/__tests__/EmptySelectorButton.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / components unit tests

components/src/atoms/buttons/__tests__/LargeButton.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / components unit tests

components/src/atoms/buttons/__tests__/RadioButton.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / components unit tests

components/src/atoms/buttons/__tests__/SecondaryButton.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / protocol designer unit tests

protocol-designer/src/analytics/__tests__/reduxActionToAnalyticsEvent.test.ts

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / protocol designer unit tests

protocol-designer/src/file-data/__tests__/commandsSelectors.test.ts

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / protocol designer unit tests

protocol-designer/src/file-data/__tests__/createFile.test.ts

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / protocol designer unit tests

protocol-designer/src/labware-ingred/__tests__/actions.test.ts

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / protocol designer unit tests

protocol-designer/src/load-file/__tests__/actions.test.ts

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / protocol designer unit tests

protocol-designer/src/resources/__tests__/ProtocolDesignerAppFallback.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / protocol designer unit tests

protocol-designer/src/step-forms/test/reducers.test.ts

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / protocol designer unit tests

protocol-designer/src/top-selectors/__tests__/timelineFrames.test.ts

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / protocol designer unit tests

protocol-designer/src/tutorial/__tests__/selectors.test.ts

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / protocol designer unit tests

protocol-designer/src/molecules/LiquidButton/__tests__/LiquidButton.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / opentrons app frontend unit tests

opentrons-ai-client/src/App.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / opentrons app frontend unit tests

app/src/App/__tests__/App.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / opentrons app frontend unit tests

app/src/App/__tests__/DesktopApp.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / opentrons app frontend unit tests

app/src/App/__tests__/Navbar.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / opentrons app frontend unit tests

app/src/App/__tests__/OnDeviceDisplayApp.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / opentrons app frontend unit tests

app/src/App/__tests__/OnDeviceDisplayAppFallback.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / opentrons app frontend unit tests

app/src/App/__tests__/hooks.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / opentrons app frontend unit tests

protocol-designer/src/resources/__tests__/ProtocolDesignerAppFallback.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / opentrons app frontend unit tests

app/src/atoms/InlineNotification/__tests__/InlineNotification.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31

Check failure on line 82 in app/src/atoms/buttons/FloatingActionButton.tsx

GitHub Actions / opentrons app frontend unit tests

app/src/atoms/InstrumentContainer/__tests__/InstrumentContainer.test.tsx

Error: Cannot create styled-component for component: undefined. ❯ throwStyledError node_modules/styled-components/src/utils/error.js:39:11 ❯ constructWithOptions node_modules/styled-components/src/constructors/constructWithOptions.js:15:12 ❯ Proxy._styled node_modules/styled-components/src/constructors/styled.js:8:33 ❯ app/src/atoms/buttons/FloatingActionButton.tsx:82:2 ❯ app/src/atoms/buttons/index.ts:4:31
>
{index + 1}
</LegacyStyledText>
<CommandText

Check failure on line 73 in components/src/organisms/ProtocolTimelineScrubber/CommandItem.tsx

GitHub Actions / js checks

Cannot find name 'CommandText'. Did you mean 'CommandItem'?
command={command}
commandTextData={getCommandTextData(analysis)}
robotType={robotType}
units?: string
type?: string
}
interface PipetteQuirksField {

Check warning on line 62 in api-client/src/pipettes/types.ts

GitHub Actions / js checks

A record is preferred over an index signature
[quirkId: string]: boolean
}
interface QuirksField {
quirks?: PipetteQuirksField
}
export type PipetteSettingsFieldsMap = QuirksField & {

Check warning on line 69 in api-client/src/pipettes/types.ts

GitHub Actions / js checks

A record is preferred over an index signature
[fieldId: string]: PipetteSettingsField
}
export interface IndividualPipetteSettings {
fields: PipetteSettingsFieldsMap
}
type PipetteSettingsById = Partial<{ [id: string]: IndividualPipetteSettings }>

Check warning on line 77 in api-client/src/pipettes/types.ts

GitHub Actions / js checks

A record is preferred over an index signature
export type PipetteSettings = PipetteSettingsById
export interface PipetteSettingsUpdateFieldsMap {

Check warning on line 81 in api-client/src/pipettes/types.ts

GitHub Actions / js checks

A record is preferred over an index signature
[fieldId: string]: PipetteSettingsUpdateField
}
} | null
export interface UpdatePipetteSettingsData {
fields: { [fieldId: string]: PipetteSettingsUpdateField }

Check warning on line 90 in api-client/src/pipettes/types.ts

GitHub Actions / js checks

A record is preferred over an index signature
}
export interface ResourceLink {
href: string
meta?: Partial<{ [key: string]: string | null | undefined }>

Check warning on line 14 in api-client/src/types.ts

GitHub Actions / js checks

A record is preferred over an index signature
}
export type ResourceLinks = Record<
export const appRestart = (message: string): AppRestartAction => ({
type: APP_RESTART,
payload: {
message: message,

Check warning on line 360 in app-shell-odd/src/actions.ts

GitHub Actions / js checks

Expected property shorthand
},
meta: { shell: true },
})
export const reloadUi = (message: string): ReloadUiAction => ({
type: RELOAD_UI,
payload: {
message: message,

Check warning on line 368 in app-shell-odd/src/actions.ts

GitHub Actions / js checks

Expected property shorthand
},
meta: { shell: true },
})
export const sendLog = (message: string): SendLogAction => ({
type: SEND_LOG,
payload: {
message: message,

Check warning on line 376 in app-shell-odd/src/actions.ts

GitHub Actions / js checks

Expected property shorthand
},
meta: { shell: true },
})
export const updateBrightness = (message: string): UpdateBrightnessAction => ({
type: UPDATE_BRIGHTNESS,
payload: {
message: message,

Check warning on line 384 in app-shell-odd/src/actions.ts

GitHub Actions / js checks

Expected property shorthand
},
meta: { shell: true },
})
}
export const AllBorderRadiuses = Template.bind({})
const allBorderRadiuses = Object.entries(BORDERS)

Check failure on line 64 in app/src/DesignTokens/BorderRadius/BorderRadius.stories.tsx

GitHub Actions / js checks

Unsafe argument of type `any` assigned to a parameter of type `{ [s: string]: unknown; } | ArrayLike<unknown>`
AllBorderRadiuses.args = {
borderRadius: allBorderRadiuses,
}
'opacity',
]
const filteredColors = Object.entries(COLORS).filter(([key]) =>

Check failure on line 117 in app/src/DesignTokens/Colors/Colors.stories.tsx

GitHub Actions / js checks

Unsafe argument of type `any` assigned to a parameter of type `{ [s: string]: unknown; } | ArrayLike<unknown>`
order.some(color => key.toLowerCase().includes(color))
)
}
export const AllSpacing = Template.bind({})
const allSpacings = Object.entries(SPACING)

Check failure on line 68 in app/src/DesignTokens/Spacing/Spacing.stories.tsx

GitHub Actions / js checks

Unsafe argument of type `any` assigned to a parameter of type `{ [s: string]: unknown; } | ArrayLike<unknown>`
AllSpacing.args = {
spacings: allSpacings,
}
iconName: {
control: {
type: 'select',
options: Object.keys(ICON_DATA_BY_NAME),

Check failure on line 13 in app/src/atoms/buttons/FloatingActionButton.stories.tsx

GitHub Actions / js checks

Unsafe argument of type `any` assigned to a parameter of type `{}`
},
defaultValue: undefined,
},
control: {
type: 'select',
},
options: Object.keys(ICON_DATA_BY_NAME),

Check failure on line 13 in app/src/atoms/buttons/MediumButton.stories.tsx

GitHub Actions / js checks

Unsafe argument of type `any` assigned to a parameter of type `{}`
},
buttonCategory: {
control: {
control: {
type: 'select',
},
options: Object.keys(ICON_DATA_BY_NAME),

Check failure on line 20 in app/src/molecules/CardButton/CardButton.stories.tsx

GitHub Actions / js checks

Unsafe argument of type `any` assigned to a parameter of type `{}`
},
},
decorators: [
children: JSX.Element[] | JSX.Element | string
} & StyleProps
): JSX.Element {
if (isModernSTProps(props)) {

Check failure on line 98 in app/src/molecules/Command/CommandText.tsx

GitHub Actions / js checks

Unsafe argument of type `any` assigned to a parameter of type `STProps`
return (
<StyledText
desktopStyle={props.desktopStyle ?? 'bodyDefaultRegular'}
props.highlightLabwareEventuallyIn.reduce(
(found, locationToMatch) =>
found ||
getIsLabwareMatch(labwareOnDeck.labwareLocation, locationToMatch),

Check failure on line 60 in app/src/molecules/InterventionModal/DeckMapContent.tsx

GitHub Actions / js checks

Unsafe argument of type `any` assigned to a parameter of type `LabwareLocation | ModuleLocation`
false
)
? {
props.modulesOnDeck?.map(module =>
props.highlightLabwareEventuallyIn.reduce(
(found, locationToMatch) =>
found || getIsLabwareMatch(module.moduleLocation, locationToMatch),

Check failure on line 78 in app/src/molecules/InterventionModal/DeckMapContent.tsx

GitHub Actions / js checks

Unsafe argument of type `any` assigned to a parameter of type `LabwareLocation | ModuleLocation`
false
)
? {
'default'
)
useEffect(() => {
setSelectedLocation != null && setSelectedLocation(selectedLocation)

Check failure on line 112 in app/src/molecules/InterventionModal/DeckMapContent.tsx

GitHub Actions / js checks

Unsafe argument of type `any` assigned to a parameter of type `ModuleLocation`
}, [selectedLocation, setSelectedLocation])
return <>{DeckLocationSelect}</>
}