Skip to content

[Feature Request]: Add "log" status to StatusIndicator API #4853

Description

@bmv437

Description

Summary

#4746 (feat: add status log for steps) widened StepsProps.Status to StatusIndicatorProps.Type | 'log' (the new "log" status renders a neutral dot marker). However, "log" was not added to the public StatusIndicatorProps.Type union.

This breaks a natural composition: the renderStep / renderSteps callbacks (public since #4466) hand consumers step.status typed as the wider union, but the obvious way to re-render that status — <StatusIndicator type={step.status}> — no longer type-checks. A public callback now emits a value that no public component can consume.

import Steps, { StepsProps } from "@cloudscape-design/components/steps";
import StatusIndicator from "@cloudscape-design/components/status-indicator";

const renderStep: StepsProps["renderStep"] = (step) => ({
  header: (
    // TS2322: Type 'Status' is not assignable to type 'Type | undefined'.
    //   Type '"log"' is not assignable to type 'Type | undefined'.
    <StatusIndicator type={step.status}>{step.header}</StatusIndicator>
  ),
});

The restriction is purely type-level

#4746 implemented "log" support inside the very internals that the public StatusIndicator delegates to — only the public .d.ts union excludes it:

  • src/status-indicator/internal-interfaces.ts defines InternalStatusIndicatorType = StatusIndicatorProps.Type | 'log', documented as "The internal log value renders a plain dot for Steps."
  • src/status-indicator/internal.tsx's typeToIcon map includes log: <InternalIcon name="dot" /> — and the public StatusIndicator is a thin wrapper around this internal component.
  • src/status-indicator/styles.scss adds 'log': awsui.$color-text-status-inactive to $_status-colors (and the neutral background to $_status-backgrounds), so the shipped CSS contains a working .status-log rule.
  • src/steps/internal.tsx's own statusToColor maps log to the same text-status-inactive bucket as pending / stopped / not-started.

So <StatusIndicator type={"log" as StatusIndicatorProps.Type}> renders correctly today; consumers just have to cast to get there.

Why this matters

Without a public rendering path for "log", anyone building a custom renderStep/renderSteps must either:

  1. Cast — fragile, and relies on undocumented internals continuing to support the value; or
  2. Hand-roll the dot treatment — reverse-engineering <Icon name="dot" variant="subtle" /> + inactive text color from internal.tsx and the scoped CSS, which is internal knowledge that could change without notice.

There is also precedent for promoting Steps-driven statuses into the public union: 'not-started' was added to StatusIndicatorProps.Type in #3960 (feat: Add not-started status type for StatusIndicator). Keeping 'log' internal-only is inconsistent with that.

Proposed fix

Add 'log' to the public StatusIndicatorProps.Type union, documented as "renders a neutral dot marker" — matching the treatment already implemented and shipped in #4746. This is a type-only change.

Environment

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions