Skip to content

Commit

Permalink
refactor(app): Update protocol page colors to helix designs (#14534)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjhuff authored Feb 21, 2024
1 parent f30f52a commit 4e42317
Show file tree
Hide file tree
Showing 15 changed files with 58 additions and 40 deletions.
2 changes: 1 addition & 1 deletion app/src/atoms/InstrumentContainer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const InstrumentContainer = (

return (
<Flex
backgroundColor={COLORS.grey20}
backgroundColor={`${COLORS.black90}${COLORS.opacity20HexCode}`}
borderRadius={BORDERS.radiusSoftCorners}
paddingX={SPACING.spacing8}
paddingY={SPACING.spacing2}
Expand Down
6 changes: 3 additions & 3 deletions app/src/atoms/buttons/ToggleButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Btn, Icon, COLORS, SIZE_1, SIZE_2 } from '@opentrons/components'
import type { StyleProps } from '@opentrons/components'

const TOGGLE_DISABLED_STYLES = css`
color: ${COLORS.grey60};
color: ${COLORS.grey50};
&:hover {
color: ${COLORS.grey55};
Expand All @@ -17,7 +17,7 @@ const TOGGLE_DISABLED_STYLES = css`
}
&:disabled {
color: ${COLORS.grey40};
color: ${COLORS.grey30};
}
`

Expand All @@ -33,7 +33,7 @@ const TOGGLE_ENABLED_STYLES = css`
}
&:disabled {
color: ${COLORS.grey40};
color: ${COLORS.grey30};
}
`

Expand Down
6 changes: 3 additions & 3 deletions app/src/atoms/buttons/__tests__/ToggleButton.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe('ToggleButton', () => {
props.disabled = true
const { getByLabelText } = render(props)
const button = getByLabelText('toggle button')
expect(button).toHaveStyleRule('color', `${String(COLORS.grey40)}`, {
expect(button).toHaveStyleRule('color', `${String(COLORS.grey30)}`, {
modifier: ':disabled',
})
})
Expand All @@ -73,7 +73,7 @@ describe('ToggleButton', () => {
props.toggledOn = false
const { getByLabelText } = render(props)
const button = getByLabelText('toggle button')
expect(button).toHaveStyle(`color: ${String(COLORS.grey60)}`)
expect(button).toHaveStyle(`color: ${String(COLORS.grey50)}`)
expect(button).toHaveStyle(`height: ${String(SIZE_2)}`)
expect(button).toHaveStyle(`width: ${String(SIZE_2)}`)
expect(button).toHaveAttribute('aria-checked', 'false')
Expand Down Expand Up @@ -106,7 +106,7 @@ describe('ToggleButton', () => {
props.disabled = true
const { getByLabelText } = render(props)
const button = getByLabelText('toggle button')
expect(button).toHaveStyleRule('color', `${String(COLORS.grey40)}`, {
expect(button).toHaveStyleRule('color', `${String(COLORS.grey30)}`, {
modifier: ':disabled',
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export function LiquidsListItem(props: LiquidsListItemProps): JSX.Element {
border: 1px solid ${COLORS.white};
&:hover {
cursor: pointer;
${BORDERS.cardOutlineBorder}
border: 1px solid ${COLORS.grey30};
}
`
const handleSetOpenItem = (): void => {
Expand Down
4 changes: 2 additions & 2 deletions app/src/organisms/DropTipWizard/BeforeBeginning.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export const BeforeBeginning = (

const UNSELECTED_OPTIONS_STYLE = css`
background-color: ${COLORS.white};
border: 1px solid ${COLORS.grey20};
border: 1px solid ${COLORS.grey30};
border-radius: ${BORDERS.radiusSoftCorners};
height: 12.5625rem;
width: 14.5625rem;
Expand All @@ -197,7 +197,7 @@ const UNSELECTED_OPTIONS_STYLE = css`
grid-gap: ${SPACING.spacing8};
&:hover {
border: 1px solid ${COLORS.grey30};
border: 1px solid ${COLORS.grey35};
}
@media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const ProtocolLiquidsDetails = (
flexDirection={DIRECTION_COLUMN}
>
<Icon
color={COLORS.grey30}
color={COLORS.grey50}
alignSelf={ALIGN_CENTER}
size="1.25rem"
name="ot-alert"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export const RobotConfigurationDetails = (
moduleType={getModuleType(module.params.model)}
marginRight={SPACING.spacing4}
alignSelf={ALIGN_CENTER}
color={COLORS.grey60}
color={COLORS.grey50}
height={SIZE_1}
minWidth={SIZE_1}
minHeight={SIZE_1}
Expand Down Expand Up @@ -208,7 +208,7 @@ export const RobotConfigurationDetailsItem = (
flex="0 0 auto"
fontWeight={TYPOGRAPHY.fontWeightSemiBold}
marginRight={SPACING.spacing16}
color={COLORS.grey50}
color={COLORS.grey60}
textTransform={TYPOGRAPHY.textTransformCapitalize}
width="4.625rem"
>
Expand Down
12 changes: 6 additions & 6 deletions app/src/organisms/ProtocolDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ export function ProtocolDetails(
flexDirection={DIRECTION_COLUMN}
data-testid="ProtocolDetails_creationMethod"
>
<StyledText as="h6" color={COLORS.grey50}>
<StyledText as="h6" color={COLORS.grey60}>
{t('creation_method')}
</StyledText>
<StyledText as="p">
Expand All @@ -438,7 +438,7 @@ export function ProtocolDetails(
flexDirection={DIRECTION_COLUMN}
data-testid="ProtocolDetails_lastUpdated"
>
<StyledText as="h6" color={COLORS.grey50}>
<StyledText as="h6" color={COLORS.grey60}>
{t('last_updated')}
</StyledText>
<StyledText as="p">
Expand All @@ -451,7 +451,7 @@ export function ProtocolDetails(
flexDirection={DIRECTION_COLUMN}
data-testid="ProtocolDetails_lastAnalyzed"
>
<StyledText as="h6" color={COLORS.grey50}>
<StyledText as="h6" color={COLORS.grey60}>
{t('last_analyzed')}
</StyledText>
<StyledText as="p">
Expand Down Expand Up @@ -481,7 +481,7 @@ export function ProtocolDetails(
flexDirection={DIRECTION_COLUMN}
data-testid="ProtocolDetails_author"
>
<StyledText as="h6" color={COLORS.grey50}>
<StyledText as="h6" color={COLORS.grey60}>
{t('org_or_author')}
</StyledText>
<StyledText
Expand All @@ -498,7 +498,7 @@ export function ProtocolDetails(
flexDirection={DIRECTION_COLUMN}
data-testid="ProtocolDetails_description"
>
<StyledText as="h6" color={COLORS.grey50}>
<StyledText as="h6" color={COLORS.grey60}>
{t('description')}
</StyledText>
{analysisStatus === 'loading' ? (
Expand Down Expand Up @@ -567,7 +567,7 @@ export function ProtocolDetails(
color={
analysisStatus !== 'complete'
? COLORS.grey40
: COLORS.grey50
: COLORS.grey60
}
/>
</Btn>
Expand Down
22 changes: 18 additions & 4 deletions app/src/organisms/ProtocolsLanding/ProtocolCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,22 @@ function AnalysisInfo(props: AnalysisInfoProps): JSX.Element {
>
{
{
missing: <Icon name="ot-spinner" spin size={SIZE_3} />,
loading: <Icon name="ot-spinner" spin size={SIZE_3} />,
missing: (
<Icon
name="ot-spinner"
color={COLORS.grey60}
spin
size={SIZE_3}
/>
),
loading: (
<Icon
name="ot-spinner"
color={COLORS.grey60}
spin
size={SIZE_3}
/>
),
error: <Box size="6rem" backgroundColor={COLORS.grey30} />,
stale: <Box size="6rem" backgroundColor={COLORS.grey30} />,
complete:
Expand Down Expand Up @@ -208,7 +222,7 @@ function AnalysisInfo(props: AnalysisInfoProps): JSX.Element {
</Flex>
{/* data section */}
{analysisStatus === 'loading' ? (
<StyledText as="p" flex="1" color={COLORS.grey50}>
<StyledText as="p" flex="1" color={COLORS.grey60}>
{t('loading_data')}
</StyledText>
) : (
Expand Down Expand Up @@ -303,7 +317,7 @@ function AnalysisInfo(props: AnalysisInfoProps): JSX.Element {
justifyContent={JUSTIFY_FLEX_END}
data-testid={`ProtocolCard_date_${protocolDisplayName}`}
>
<StyledText as="label" color={COLORS.grey50}>
<StyledText as="label" color={COLORS.grey60}>
{`${t('updated')} ${format(
new Date(modified),
'M/d/yy HH:mm'
Expand Down
4 changes: 2 additions & 2 deletions app/src/organisms/ProtocolsLanding/ProtocolList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const SORT_BY_BUTTON_STYLE = css`
background-color: ${COLORS.transparent};
cursor: pointer;
&:hover {
background-color: ${COLORS.grey60};
background-color: ${COLORS.grey30};
}
&:active,
&:focus {
Expand Down Expand Up @@ -161,7 +161,7 @@ export function ProtocolList(props: ProtocolListProps): JSX.Element | null {
<StyledText
as="p"
fontWeight={TYPOGRAPHY.fontWeightSemiBold}
color={COLORS.grey50}
color={COLORS.grey60}
>
{t('shared:sort_by')}
</StyledText>
Expand Down
12 changes: 4 additions & 8 deletions app/src/organisms/RunPreview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,8 @@ export const RunPreviewComponent = (
>
{(command, index) => {
const isCurrent = index === currentRunCommandIndex
const borderColor = isCurrent ? COLORS.blue50 : COLORS.transparent
const backgroundColor = isCurrent ? COLORS.blue30 : COLORS.grey10
const contentColor = isCurrent ? COLORS.blue60 : COLORS.grey50
const backgroundColor = isCurrent ? COLORS.blue30 : COLORS.grey20
const iconColor = isCurrent ? COLORS.blue60 : COLORS.grey50
return (
<Flex
key={command.id}
Expand All @@ -114,9 +113,6 @@ export const RunPreviewComponent = (
flexDirection={DIRECTION_COLUMN}
gridGap={SPACING.spacing4}
width="100%"
border={`solid 1px ${
index === jumpedIndex ? COLORS.purple40 : borderColor
}`}
backgroundColor={
index === jumpedIndex ? '#F5E3FF' : backgroundColor
}
Expand All @@ -129,12 +125,12 @@ export const RunPreviewComponent = (
`}
>
<Flex alignItems={ALIGN_CENTER} gridGap={SPACING.spacing8}>
<CommandIcon command={command} color={contentColor} />
<CommandIcon command={command} color={iconColor} />
<CommandText
command={command}
robotSideAnalysis={robotSideAnalysis}
robotType={robotType}
color={contentColor}
color={COLORS.black90}
/>
</Flex>
</Flex>
Expand Down
8 changes: 6 additions & 2 deletions app/src/organisms/RunProgressMeter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,11 @@ export function RunProgressMeter(props: RunProgressMeterProps): JSX.Element {
textTransform={TYPOGRAPHY.textTransformCapitalize}
onClick={onDownloadClick}
>
<Flex gridGap={SPACING.spacing2} alignItems={ALIGN_CENTER}>
<Flex
gridGap={SPACING.spacing2}
alignItems={ALIGN_CENTER}
color={COLORS.grey60}
>
<Icon name="download" size={SIZE_1} />
{t('download_run_log')}
</Flex>
Expand Down Expand Up @@ -259,7 +263,7 @@ export function RunProgressMeter(props: RunProgressMeterProps): JSX.Element {
`}
innerStyles={css`
height: 0.375rem;
background-color: ${COLORS.grey50};
background-color: ${COLORS.grey60};
border-radius: ${BORDERS.radiusSoftCorners};
`}
>
Expand Down
6 changes: 5 additions & 1 deletion app/src/organisms/TaskList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,11 @@ function SubTask({
backgroundColor={isActiveSubTask ? COLORS.blue10 : COLORS.white}
justifyContent={JUSTIFY_SPACE_BETWEEN}
padding={SPACING.spacing16}
border={isActiveSubTask ? BORDERS.activeLineBorder : TASK_CONNECTOR_STYLE}
border={
isActiveSubTask
? BORDERS.activeLineBorder
: `1px solid ${COLORS.grey30}`
}
borderRadius={BORDERS.radiusSoftCorners}
gridGap={SPACING.spacing24}
width="100%"
Expand Down
6 changes: 3 additions & 3 deletions components/src/atoms/buttons/SecondaryButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const SecondaryButton = styled.button.withConfig<SecondaryButtonProps>({
})<SecondaryButtonProps>`
appearance: none;
cursor: pointer;
color: ${props => (props.isDangerous ? COLORS.red60 : COLORS.blue50)};
color: ${props => (props.isDangerous ? COLORS.red50 : COLORS.blue50)};
border: ${BORDERS.lineBorder};
border-color: ${props => (props.isDangerous ? COLORS.red50 : 'initial')};
border-radius: ${BORDERS.radiusSoftCorners};
Expand All @@ -28,7 +28,7 @@ export const SecondaryButton = styled.button.withConfig<SecondaryButtonProps>({
}
&:hover {
color: ${props => (props.isDangerous ? COLORS.red60 : COLORS.blue60)};
color: ${props => (props.isDangerous ? COLORS.red50 : COLORS.blue60)};
border-color: ${props =>
props.isDangerous ? COLORS.red50 : COLORS.blue55};
box-shadow: 0 0 0;
Expand All @@ -45,7 +45,7 @@ export const SecondaryButton = styled.button.withConfig<SecondaryButtonProps>({
box-shadow: none;
color: ${props => (props.isDangerous ? COLORS.red60 : COLORS.blue55)};
border-color: ${props =>
props.isDangerous ? COLORS.red50 : COLORS.blue55};
props.isDangerous ? COLORS.red60 : COLORS.blue55};
}
&:disabled,
Expand Down
2 changes: 1 addition & 1 deletion components/src/helix-design-system/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const blue10 = '#F1F8FF'
* grey
*/
export const grey60 = '#4A4C4E'
export const grey55 = '#737578'
export const grey55 = '#626467'
export const grey50 = '#737578'
export const grey40 = '#B7B8B9'
export const grey35 = '#CBCCCC'
Expand Down

0 comments on commit 4e42317

Please sign in to comment.