From 122228e641fa74bcdc7743f89d094f8b9bbf5cac Mon Sep 17 00:00:00 2001 From: SupaJoon Date: Tue, 27 Aug 2024 12:18:55 -0400 Subject: [PATCH] DEVPROD-10022: Introduce SectionStatusIcon component and add red fill to failing status icon (#334) --- .../SectionHeader_SectionHeaderMany.storyshot | 2 +- .../components/LogRow/SectionHeader/index.tsx | 9 ++------- .../LogRow/SectionStatusIcon/index.tsx | 16 ++++++++++++++++ ...ectionHeader_SubsectionHeaderNested.storyshot | 2 +- ...tionHeader_SubsectionHeaderTopLevel.storyshot | 2 +- .../components/LogRow/SubsectionHeader/index.tsx | 9 ++------- apps/spruce/src/gql/generated/types.ts | 4 ++-- 7 files changed, 25 insertions(+), 19 deletions(-) create mode 100644 apps/parsley/src/components/LogRow/SectionStatusIcon/index.tsx diff --git a/apps/parsley/src/components/LogRow/SectionHeader/__snapshots__/SectionHeader_SectionHeaderMany.storyshot b/apps/parsley/src/components/LogRow/SectionHeader/__snapshots__/SectionHeader_SectionHeaderMany.storyshot index 11ccc1329..40a15ac26 100644 --- a/apps/parsley/src/components/LogRow/SectionHeader/__snapshots__/SectionHeader_SectionHeaderMany.storyshot +++ b/apps/parsley/src/components/LogRow/SectionHeader/__snapshots__/SectionHeader_SectionHeaderMany.storyshot @@ -163,7 +163,7 @@ = ({ }) => { const { sectioning } = useLogContext(); const { sendEvent } = useLogWindowAnalytics(); - const statusGlyph = - status === SectionStatus.Pass ? "CheckmarkWithCircle" : "XWithCircle"; return (
= ({ }} open={open} /> - + Function: {functionName} = ({ status }) => { + const fill = status === SectionStatus.Pass ? gray.dark1 : red.base; + const glyph = + status === SectionStatus.Pass ? "CheckmarkWithCircle" : "XWithCircle"; + return ; +}; diff --git a/apps/parsley/src/components/LogRow/SubsectionHeader/__snapshots__/SubsectionHeader_SubsectionHeaderNested.storyshot b/apps/parsley/src/components/LogRow/SubsectionHeader/__snapshots__/SubsectionHeader_SubsectionHeaderNested.storyshot index f2d6302cc..84c65ef5a 100644 --- a/apps/parsley/src/components/LogRow/SubsectionHeader/__snapshots__/SubsectionHeader_SubsectionHeaderNested.storyshot +++ b/apps/parsley/src/components/LogRow/SubsectionHeader/__snapshots__/SubsectionHeader_SubsectionHeaderNested.storyshot @@ -83,7 +83,7 @@ = ({ }) => { const { sendEvent } = useLogWindowAnalytics(); const { sectioning } = useLogContext(); - const statusGlyph = - status === SectionStatus.Pass ? "CheckmarkWithCircle" : "XWithCircle"; return (
= ({ }} open={open} /> - {status && } + {status && } Command: {commandName} (step {step}) diff --git a/apps/spruce/src/gql/generated/types.ts b/apps/spruce/src/gql/generated/types.ts index c63c5cf15..5e6f2a122 100644 --- a/apps/spruce/src/gql/generated/types.ts +++ b/apps/spruce/src/gql/generated/types.ts @@ -2556,7 +2556,7 @@ export type SleepSchedule = { __typename?: "SleepSchedule"; dailyStartTime: Scalars["String"]["output"]; dailyStopTime: Scalars["String"]["output"]; - isBetaTester: Scalars["Boolean"]["output"]; + isBetaTester?: Maybe; nextStartTime?: Maybe; nextStopTime?: Maybe; permanentlyExempt: Scalars["Boolean"]["output"]; @@ -6741,7 +6741,7 @@ export type MyHostsQuery = { __typename?: "SleepSchedule"; dailyStartTime: string; dailyStopTime: string; - isBetaTester: boolean; + isBetaTester?: boolean | null; nextStartTime?: Date | null; permanentlyExempt: boolean; shouldKeepOff: boolean;