Skip to content

Commit 8b43995

Browse files
authored
feat(app): Robot Settings Design QA 2 (#11020)
closes #10893
1 parent d7ae58b commit 8b43995

23 files changed

+212
-112
lines changed

app/src/atoms/buttons/index.tsx

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,46 @@ export const SecondaryButton = styled(NewSecondaryBtn)`
140140
}
141141
`
142142

143+
const TOGGLE_DISABLED_STYLES = css`
144+
color: ${COLORS.darkGreyEnabled};
145+
146+
&:hover {
147+
color: ${COLORS.darkGreyHover};
148+
}
149+
150+
&:focus-visible {
151+
box-shadow: 0 0 0 3px ${COLORS.warning};
152+
}
153+
154+
&:disabled {
155+
colors: ${COLORS.greyDisabled};
156+
}
157+
`
158+
159+
const TOGGLE_ENABLED_STYLES = css`
160+
color: ${COLORS.blue};
161+
162+
&:hover {
163+
color: ${COLORS.blueHover};
164+
}
165+
166+
&:focus-visible {
167+
box-shadow: 0 0 0 3px ${COLORS.warning};
168+
}
169+
170+
&:disabled {
171+
colors: ${COLORS.greyDisabled};
172+
}
173+
`
174+
143175
export const ToggleButton = (props: ToggleBtnProps): JSX.Element => {
144-
const color = props.toggledOn ? COLORS.blue : COLORS.darkGreyEnabled
145-
return <ToggleBtn size={SIZE_2} color={color} {...props} />
176+
return (
177+
<ToggleBtn
178+
size={SIZE_2}
179+
css={props.toggledOn ? TOGGLE_ENABLED_STYLES : TOGGLE_DISABLED_STYLES}
180+
{...props}
181+
/>
182+
)
146183
}
147184

148185
interface SubmitPrimaryButtonProps {

app/src/organisms/Devices/ProtocolRun/SetupCalibrationItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export function SetupCalibrationItem({
6969
size={SIZE_1}
7070
color={calibratedDate != null ? COLORS.success : COLORS.warning}
7171
marginRight={SPACING.spacing4}
72-
name={calibratedDate != null ? 'check-circle' : 'alert-circle'}
72+
name={calibratedDate != null ? 'ot-check' : 'alert-circle'}
7373
/>
7474
) : null}
7575
<Flex flexDirection={DIRECTION_COLUMN} gridGap={SPACING.spacing2}>

app/src/organisms/Devices/ProtocolRun/SetupStep.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,7 @@ export function SetupStep({
113113
}
114114
marginRight={SPACING.spacing3}
115115
name={
116-
calibrationStatusComplete
117-
? 'check-circle'
118-
: 'alert-circle'
116+
calibrationStatusComplete ? 'ot-check' : 'alert-circle'
119117
}
120118
id={'RunSetupCard_calibrationIcon'}
121119
/>

app/src/organisms/Devices/RobotSettings/AdvancedTab/DisableHoming.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import {
66
Flex,
77
ALIGN_CENTER,
88
JUSTIFY_SPACE_BETWEEN,
9-
Box,
10-
SPACING,
119
TYPOGRAPHY,
10+
SPACING,
11+
Box,
1212
} from '@opentrons/components'
1313

1414
import { StyledText } from '../../../../atoms/text'
@@ -48,9 +48,8 @@ export function DisableHoming({
4848
<Flex alignItems={ALIGN_CENTER} justifyContent={JUSTIFY_SPACE_BETWEEN}>
4949
<Box width="70%">
5050
<StyledText
51-
as="h2"
52-
fontWeight={TYPOGRAPHY.fontWeightSemiBold}
53-
paddingBottom={SPACING.spacing4}
51+
css={TYPOGRAPHY.pSemiBold}
52+
paddingBottom={SPACING.spacing2}
5453
id="AdvancedSettings_disableHoming"
5554
>
5655
{t('disable_homing')}

app/src/organisms/Devices/RobotSettings/AdvancedTab/FactoryReset.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import {
55
Flex,
66
ALIGN_CENTER,
77
JUSTIFY_SPACE_BETWEEN,
8-
Box,
98
SPACING,
109
SPACING_AUTO,
10+
Box,
1111
TYPOGRAPHY,
1212
} from '@opentrons/components'
1313

@@ -42,9 +42,8 @@ export function FactoryReset({
4242
<Flex alignItems={ALIGN_CENTER} justifyContent={JUSTIFY_SPACE_BETWEEN}>
4343
<Box width="70%">
4444
<StyledText
45-
as="h2"
46-
fontWeight={TYPOGRAPHY.fontWeightSemiBold}
47-
marginBottom={SPACING.spacing4}
45+
css={TYPOGRAPHY.pSemiBold}
46+
marginBottom={SPACING.spacing2}
4847
id="AdvancedSettings_factoryReset"
4948
>
5049
{t('factory_reset')}

app/src/organisms/Devices/RobotSettings/AdvancedTab/LegacySettings.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@ export function LegacySettings({
4545
}
4646

4747
return (
48-
<Flex alignItems={ALIGN_CENTER} justifyContent={JUSTIFY_SPACE_BETWEEN}>
48+
<Flex
49+
alignItems={ALIGN_CENTER}
50+
justifyContent={JUSTIFY_SPACE_BETWEEN}
51+
marginTop="2.5rem"
52+
>
4953
<Box width="70%">
5054
<StyledText
5155
as="h2"

app/src/organisms/Devices/RobotSettings/AdvancedTab/OpenJupyterControl.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,8 @@ export function OpenJupyterControl({
3434
<Flex alignItems={ALIGN_CENTER} justifyContent={JUSTIFY_SPACE_BETWEEN}>
3535
<Box width="70%">
3636
<StyledText
37-
as="h2"
38-
fontWeight={TYPOGRAPHY.fontWeightSemiBold}
39-
marginBottom={SPACING.spacing4}
37+
css={TYPOGRAPHY.pSemiBold}
38+
marginBottom={SPACING.spacing2}
4039
id="AdvancedSettings_About"
4140
>
4241
{t('jupyter_notebook')}

app/src/organisms/Devices/RobotSettings/AdvancedTab/RobotServerVersion.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,8 @@ export function RobotServerVersion({
6262
<Flex alignItems={ALIGN_CENTER} justifyContent={JUSTIFY_SPACE_BETWEEN}>
6363
<Box width="70%">
6464
<StyledText
65-
as="h2"
66-
fontWeight={TYPOGRAPHY.fontWeightSemiBold}
67-
paddingBottom={SPACING.spacing4}
65+
css={TYPOGRAPHY.pSemiBold}
66+
paddingBottom={SPACING.spacing2}
6867
id="AdvancedSettings_RobotServerVersion"
6968
>
7069
{t('robot_server_versions')}

app/src/organisms/Devices/RobotSettings/AdvancedTab/ShortTrashBin.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,8 @@ export function ShortTrashBin({
4848
<Flex alignItems={ALIGN_CENTER} justifyContent={JUSTIFY_SPACE_BETWEEN}>
4949
<Box width="70%">
5050
<StyledText
51-
as="h2"
52-
fontWeight={TYPOGRAPHY.fontWeightSemiBold}
53-
paddingBottom={SPACING.spacing4}
51+
css={TYPOGRAPHY.pSemiBold}
52+
paddingBottom={SPACING.spacing2}
5453
id="AdvancedSettings_devTools"
5554
>
5655
{t('short_trash_bin')}

app/src/organisms/Devices/RobotSettings/AdvancedTab/Troubleshooting.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ export function Troubleshooting({
4848
}, [robotLogsDownloading, updateDownloadLogsStatus])
4949

5050
return (
51-
<Flex alignItems={ALIGN_CENTER} justifyContent={JUSTIFY_SPACE_BETWEEN}>
51+
<Flex
52+
alignItems={ALIGN_CENTER}
53+
justifyContent={JUSTIFY_SPACE_BETWEEN}
54+
marginTop="2.5rem"
55+
>
5256
<Box width="70%">
5357
<StyledText
5458
as="h2"

0 commit comments

Comments
 (0)