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

fix(app): fix list button styling #15088

Merged
merged 1 commit into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion app/src/organisms/ProtocolSetupParameters/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export function ProtocolSetupParameters({
<React.Fragment key={`${parameter.displayName}_${index}`}>
<ProtocolSetupStep
hasIcon={!(parameter.type === 'bool')}
status="general"
status="inform"
title={parameter.displayName}
onClickSetupStep={() => handleSetParameter(parameter)}
detail={formatRunTimeParameterValue(parameter, t)}
Expand Down
13 changes: 10 additions & 3 deletions app/src/pages/ProtocolSetup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ import type { ProtocolModuleInfo } from '../../organisms/Devices/ProtocolRun/uti
const FETCH_DURATION_MS = 5000
interface ProtocolSetupStepProps {
onClickSetupStep: () => void
status: 'ready' | 'not ready' | 'general'
status: 'ready' | 'not ready' | 'general' | 'inform'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is any better idea for status name, let me know.

title: string
// first line of detail text
detail?: string | null
Expand Down Expand Up @@ -135,6 +135,7 @@ export function ProtocolSetupStep({
ready: COLORS.green35,
'not ready': COLORS.yellow35,
general: COLORS.grey35,
inform: COLORS.grey35,
}
const { makeSnackbar } = useToaster()

Expand All @@ -153,6 +154,9 @@ export function ProtocolSetupStep({
case 'ready':
backgroundColor = COLORS.green40
break
case 'inform':
backgroundColor = COLORS.grey50
break
default:
backgroundColor = COLORS.yellow40
}
Expand Down Expand Up @@ -183,7 +187,10 @@ export function ProtocolSetupStep({
padding={`${SPACING.spacing20} ${SPACING.spacing24}`}
css={PUSHED_STATE_STYLE}
>
{status !== 'general' && !disabled ? (
{status !== 'general' &&
!disabled &&
status !== 'inform' &&
!disabled ? (
<Icon
color={status === 'ready' ? COLORS.green50 : COLORS.yellow50}
size="2rem"
Expand All @@ -201,7 +208,7 @@ export function ProtocolSetupStep({
>
{title}
</StyledText>
<StyledText as="h4" color={COLORS.grey50} maxWidth="35rem">
<StyledText as="h4" color={COLORS.grey60} maxWidth="35rem">
{description}
</StyledText>
</Flex>
Expand Down
Loading