Skip to content

fix(progress-bar): preserve fill border radius while animating progress#4950

Open
MichaelSebsbe wants to merge 1 commit into
callstack:mainfrom
MichaelSebsbe:main
Open

fix(progress-bar): preserve fill border radius while animating progress#4950
MichaelSebsbe wants to merge 1 commit into
callstack:mainfrom
MichaelSebsbe:main

Conversation

@MichaelSebsbe
Copy link
Copy Markdown

Motivation

The determinate ProgressBar fill was rendered at full width and animated with scaleX. Since transforms also scale the rendered border radius, custom fillStyle.borderRadius looked nearly square at low progress values and only appeared correctly rounded near full progress.

This updates determinate progress to reveal the full-width fill by translating it under the clipped track instead of scaling it. That preserves rounded fill styles while keeping the animation transform-based and compatible with the native driver.

Indeterminate progress keeps the existing scale/translate animation.

Related issue

Fixes a visual issue where determinate ProgressBar fill radius is scaled down at low progress values.

Test plan

  • yarn test src/components/__tests__/ProgressBar.test.tsx
  • yarn typescript

Added a regression test to verify determinate fill no longer uses scaleX, while preserving custom fillStyle coverage and updated snapshots.

@callstack-bot
Copy link
Copy Markdown

Hey @MichaelSebsbe, thank you for your pull request 🤗. The documentation from this branch can be viewed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants