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(odd): robot dashboard recently run protocols #12490

Merged
merged 32 commits into from
Apr 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
bda5440
Add RecentRun card
koji Apr 7, 2023
75ae485
Add EmptyRecentRun component
koji Apr 7, 2023
18e312a
Update EmptyRecentRun.tsx
koji Apr 7, 2023
69740d7
change alt
koji Apr 12, 2023
f4ac08e
create useMissingProtocolHardware
jerader Apr 12, 2023
b7d061a
Merge branch 'feat_update-robotdashboard-design' of https://github.co…
jerader Apr 12, 2023
34bb787
Merge branch 'edge' into feat_update-robotdashboard-design
jerader Apr 12, 2023
2220a27
feat(odd): robot dashboard recently run protocols
jerader Apr 13, 2023
8fd78a6
add plurals to i18n
jerader Apr 13, 2023
19c9c72
remove capitalization since we are using the i18n format function
jerader Apr 13, 2023
31dc1c1
update test case
koji Apr 13, 2023
5cb1e0d
add onClick functionality to recentRunCard
jerader Apr 13, 2023
c2a09bf
Merge branch 'feat_update-robotdashboard-design' of https://github.co…
jerader Apr 13, 2023
f45889b
move, rename and add test for component
koji Apr 13, 2023
269e15a
Merge branch 'edge' into feat_update-robotdashboard-design
koji Apr 13, 2023
0e89a0d
update test
koji Apr 13, 2023
02f3244
Update RecentProtocolRunCard.test.tsx
koji Apr 13, 2023
e6df766
Update RecentProtocolRunCard.tsx
koji Apr 13, 2023
af04dda
fix test cases
koji Apr 13, 2023
5f1d1ed
simplify the condition
koji Apr 13, 2023
3b73a3e
add test for Carousel
koji Apr 14, 2023
b02d395
fix lint-js errors
koji Apr 14, 2023
7bb0fba
modify text styling
koji Apr 14, 2023
3f2dee0
Update RobotDashboard.tsx
koji Apr 14, 2023
3beee2e
add test for useRequiredProtocolLabware
koji Apr 14, 2023
39b6e1b
update the text when missing pipette and module
koji Apr 14, 2023
e110f09
update the conditions for each cases
koji Apr 14, 2023
8f5ee44
fix test errors
koji Apr 14, 2023
9ad5d8e
fix test issue
koji Apr 17, 2023
25fd796
address comments
koji Apr 17, 2023
234473f
fix truncated protocol name by adding a height of max-content
jerader Apr 20, 2023
2687acf
update css and rename file name
koji Apr 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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",
koji marked this conversation as resolved.
Show resolved Hide resolved
"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.

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