Skip to content

Commit

Permalink
feat(odd): robot dashboard recently run protocols (#12490)
Browse files Browse the repository at this point in the history
closes RCORE-559 RCORE-586

Co-authored-by: koji <[email protected]>
  • Loading branch information
jerader and koji authored Apr 20, 2023
1 parent 1b54efb commit 5bf61cc
Show file tree
Hide file tree
Showing 27 changed files with 975 additions and 206 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
9 changes: 9 additions & 0 deletions app/src/assets/localization/en/device_details.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,15 @@
"both_mounts": "Both Mounts",
"ready": "Ready",
"run_again": "Run again",
"no_recent_runs": "No recent runs",
"no_recent_runs_description": "After you run some protocols, they will appear here.",
"last_run_time": "last run {{number}}",
"ready_to_run": "ready to run",
"missing_module": "missing {{num}} module",
"missing_module_plural": "missing {{count}} modules",
"missing_pipette": "missing {{num}} pipette",
"missing_pipettes_plural": "missing {{count}} pipettes",
"missing_both": "missing hardware",
"have_not_run": "No recent runs",
"have_not_run_description": "After you run some protocols, they will appear here."
}
6 changes: 4 additions & 2 deletions app/src/atoms/Chip/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import {

import { StyledText } from '../text'

import type { IconName } from '@opentrons/components'
import type { IconName, StyleProps } from '@opentrons/components'

export type ChipType = 'basic' | 'success' | 'warning' | 'neutral'

interface ChipProps {
interface ChipProps extends StyleProps {
/** Display background color? */
background?: boolean
/** Chip icon */
Expand Down Expand Up @@ -70,6 +70,7 @@ export function Chip({
iconName,
type,
text,
...styleProps
}: ChipProps): JSX.Element {
const backgroundColor =
background === false && type !== 'basic'
Expand All @@ -85,6 +86,7 @@ export function Chip({
padding={`${SPACING.spacing3} ${SPACING.spacing4}`}
gridGap={SPACING.spacing3}
data-testid={`Chip_${type}`}
{...styleProps}
>
{type !== 'basic' && (
<Icon
Expand Down
35 changes: 0 additions & 35 deletions app/src/molecules/MiniCardButton/MiniCardButton.stories.tsx

This file was deleted.

44 changes: 0 additions & 44 deletions app/src/molecules/MiniCardButton/__tests__/MiniCardButton.test.tsx

This file was deleted.

62 changes: 0 additions & 62 deletions app/src/molecules/MiniCardButton/index.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion app/src/organisms/NameRobot/ConfirmRobotName.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {

import { StyledText } from '../../atoms/text'
import { StepMeter } from '../../atoms/StepMeter'
import screenImage from '../../assets/images/odd/[email protected]'
import screenImage from '../../assets/images/on-device-display/[email protected]'

const IMAGE_ALT = 'finish setting up a robot'

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import * as React from 'react'
import { useTranslation } from 'react-i18next'

import {
Flex,
DIRECTION_COLUMN,
ALIGN_CENTER,
COLORS,
SPACING,
TYPOGRAPHY,
} from '@opentrons/components'

import { StyledText } from '../../../atoms/text'

import abstractImage from '../../../assets/images/on-device-display/empty_recent_protocol_run.png'

export function EmptyRecentRun(): JSX.Element {
const { t } = useTranslation('device_details')
return (
<Flex
width="100%"
height="27.25rem"
backgroundColor={`${COLORS.darkBlackEnabled}${COLORS.opacity15HexCode}`}
flexDirection={DIRECTION_COLUMN}
alignItems={ALIGN_CENTER}
padding="5.25rem 3.75rem"
>
<Flex marginBottom={SPACING.spacing4}>
<img
src={abstractImage}
alt="There is no recent run protocol"
width="284px"
height="166px"
/>
</Flex>
<Flex
flexDirection={DIRECTION_COLUMN}
gridGap={SPACING.spacing3}
alignItems={ALIGN_CENTER}
>
<StyledText
fontSize={TYPOGRAPHY.fontSize32}
lineHeight={TYPOGRAPHY.lineHeight42}
fontWeight={TYPOGRAPHY.fontWeightLevel2_bold}
>
{t('no_recent_runs')}
</StyledText>
<StyledText
fontSize={TYPOGRAPHY.fontSize28}
lineHeight={TYPOGRAPHY.lineHeight36}
fontWeight={TYPOGRAPHY.fontWeightRegular}
color={COLORS.darkBlack_seventy}
>
{t('no_recent_runs_description')}
</StyledText>
</Flex>
</Flex>
)
}
Loading

0 comments on commit 5bf61cc

Please sign in to comment.