Skip to content

feat: add indeterminate ProgressCircle#501

Draft
adrienzheng-cb wants to merge 2 commits intomasterfrom
adrien/indeterminate-progress-circle
Draft

feat: add indeterminate ProgressCircle#501
adrienzheng-cb wants to merge 2 commits intomasterfrom
adrien/indeterminate-progress-circle

Conversation

@adrienzheng-cb
Copy link
Contributor

@adrienzheng-cb adrienzheng-cb commented Mar 13, 2026

What changed? Why?

feat: add indeterminate ProgressCircle, unify progress size and float-label math

  • Add indeterminate prop to ProgressCircle (web & mobile): spinning state with
    configurable weight, default stroke ratio 0.11; animate full SVG on mobile,
    CSS keyframes on web; hide default content when indeterminate.
  • Add getProgressSize(weight) in common and deprecate useProgressSize; use
    getProgressSize in ProgressBar and ProgressCircle on both platforms.
  • Simplify ProgressBarWithFloatLabel (web & mobile): remove usePreviousValues,
    useIsoEffect, and imperative animation; use shared getEndTranslateX so float
    label trailing edge follows fill end (containerWidth * progress - textWidth);
    web uses useMotionProps + MotionBox, mobile animates translateX to target.
  • ProgressBar/ProgressCircle: progress optional with default 0; add originX/
    originY in getProgressCircleParams; web ProgressCircle uses pathLength=1.
  • Deprecate Spinner (web & mobile) in favor of indeterminate ProgressCircle.
  • ProgressBar tests: update float-label position expectation (80) and accept
    transform none/translateX(0) for zero progress; iconSvgMap regenerated.

The look of indeterminate ProgressCircle is based on the loading Button figma design

Root cause (required for bugfixes)

UI changes

storybook
docs

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2026-03-17.at.12.02.31.mov
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2026-03-17.at.12.01.33.mov
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2026-03-17.at.12.03.13.mov

Testing

How has it been tested?

  • Unit tests
  • Interaction tests
  • Pseudo State tests
  • Manual - Web
  • Manual - Android (Emulator / Device)
  • Manual - iOS (Emulator / Device)

Testing instructions

Illustrations/Icons Checklist

Required if this PR changes files under packages/illustrations/** or packages/icons/**

  • verified visreg changes with Terran (include link to visreg run/approval)
  • all illustration/icons names have been reviewed by Dom and/or Terran

Change management

type=routine
risk=low
impact=sev5

automerge=false

@adrienzheng-cb adrienzheng-cb requested a review from hcopp March 13, 2026 19:17
@cb-heimdall
Copy link
Collaborator

cb-heimdall commented Mar 13, 2026

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 1
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1
CODEOWNERS 🟡 See below

🟡 CODEOWNERS

Code Owner Status Calculation
ui-systems-eng-team 🟡 0/1
Denominator calculation
Additional CODEOWNERS Requirement
Show calculation
Sum 0
0
From CODEOWNERS 1
Sum 1

color={colorValue}
size={progressCircleHeight}
weight="thin"
/>
Copy link
Contributor

Choose a reason for hiding this comment

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

How easy do you think it would be to have this value not be hardcoded? Particularly for v9 branch. I guess wed need text to be hidden still and then somehow have this be 100% height (If possible?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

depends if we want to merge this pr before or after v9

Copy link
Contributor Author

Choose a reason for hiding this comment

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

since we are pushing back the release of v9. we should merge this change in v8. I'll then remove the fixed height in cds-v9 branch following the new pattern after sync.

@hcopp
Copy link
Contributor

hcopp commented Mar 13, 2026

Great work! Excited to see this when it's fully ready.

…-label math

- Add indeterminate prop to ProgressCircle (web & mobile): spinning state with
  configurable weight, default stroke ratio 0.11; animate full SVG on mobile,
  CSS keyframes on web; hide default content when indeterminate.
- Add getProgressSize(weight) in common and deprecate useProgressSize; use
  getProgressSize in ProgressBar and ProgressCircle on both platforms.
- Simplify ProgressBarWithFloatLabel (web & mobile): remove usePreviousValues,
  useIsoEffect, and imperative animation; use shared getEndTranslateX so float
  label trailing edge follows fill end (containerWidth * progress - textWidth);
  web uses useMotionProps + MotionBox, mobile animates translateX to target.
- ProgressBar/ProgressCircle: progress optional with default 0; add originX/
  originY in getProgressCircleParams; web ProgressCircle uses pathLength=1.
- Deprecate Spinner (web & mobile) in favor of indeterminate ProgressCircle.
- ProgressBar tests: update float-label position expectation (80) and accept
  transform none/translateX(0) for zero progress; iconSvgMap regenerated.
@adrienzheng-cb adrienzheng-cb force-pushed the adrien/indeterminate-progress-circle branch from ec42a2a to 1b026ee Compare March 24, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants