Skip to content

fix(progressbar): progress bar animation jitter #5509

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

Conversation

marissahuysentruyt
Copy link
Collaborator

@marissahuysentruyt marissahuysentruyt commented May 30, 2025

Description

  • first commit: adds magic number positioning to progress bar animation keyframes, to smooth out the looping animation
  • second commit: redefines indeterminate animation transforms to position fill off of the track

I am in favor of the second commit, simply redefining the keyframes so that the fill's starting position is off of the track, as opposed to partially on the track.

Motivation and context

CSS-1241

A bug was recently reported in Slack that said:

The smooth motion followed by the jump to reset is quite jarring. I wonder if it's supposed to smoothly loop? The indeterminate progress bar does not smoothly loop, it has a large jump from the end state to the start state.

This PR aims to smooth out the transition between the end and the start of the animation loop.

Related issue(s)

  • fixes CSS-1241

Screenshots (if appropriate)


Author's checklist

  • I have read the CONTRIBUTING and PULL_REQUESTS documents.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices
  • I have added automated tests to cover my changes.
  • I have included a well-written changeset if my change needs to be published.

Reviewer's checklist

  • Includes a Github Issue with appropriate flag or Jira ticket number without a link
  • Includes thoughtfully written changeset if changes suggested include patch, minor, or major features
  • Automated tests cover all use cases and follow best practices for writing
  • Validated on all supported browsers
  • All VRTs are approved before the author can update Golden Hash

Manual review test cases

  • Descriptive Test Statement

    1. Go here
    2. Do this action
    3. Expect this result
  • Descriptive Test Statement

    1. Go here
    2. Do this action
    3. Expect this result

Device review

  • Did it pass in Desktop?
  • Did it pass in (emulated) Mobile?
  • Did it pass in (emulated) iPad?

Copy link

changeset-bot bot commented May 30, 2025

🦋 Changeset detected

Latest commit: 6fbb765

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 84 packages
Name Type
@spectrum-web-components/progress-bar Patch
@spectrum-web-components/bundle Patch
documentation Patch
@spectrum-web-components/eslint-plugin Patch
@spectrum-web-components/accordion Patch
@spectrum-web-components/action-bar Patch
@spectrum-web-components/action-button Patch
@spectrum-web-components/action-group Patch
@spectrum-web-components/action-menu Patch
@spectrum-web-components/alert-banner Patch
@spectrum-web-components/alert-dialog Patch
@spectrum-web-components/asset Patch
@spectrum-web-components/avatar Patch
@spectrum-web-components/badge Patch
@spectrum-web-components/breadcrumbs Patch
@spectrum-web-components/button-group Patch
@spectrum-web-components/button Patch
@spectrum-web-components/card Patch
@spectrum-web-components/checkbox Patch
@spectrum-web-components/clear-button Patch
@spectrum-web-components/close-button Patch
@spectrum-web-components/coachmark Patch
@spectrum-web-components/color-area Patch
@spectrum-web-components/color-field Patch
@spectrum-web-components/color-handle Patch
@spectrum-web-components/color-loupe Patch
@spectrum-web-components/color-slider Patch
@spectrum-web-components/color-wheel Patch
@spectrum-web-components/combobox Patch
@spectrum-web-components/contextual-help Patch
@spectrum-web-components/dialog Patch
@spectrum-web-components/divider Patch
@spectrum-web-components/dropzone Patch
@spectrum-web-components/field-group Patch
@spectrum-web-components/field-label Patch
@spectrum-web-components/help-text Patch
@spectrum-web-components/icon Patch
@spectrum-web-components/icons-ui Patch
@spectrum-web-components/icons-workflow Patch
@spectrum-web-components/icons Patch
@spectrum-web-components/iconset Patch
@spectrum-web-components/illustrated-message Patch
@spectrum-web-components/infield-button Patch
@spectrum-web-components/link Patch
@spectrum-web-components/menu Patch
@spectrum-web-components/meter Patch
@spectrum-web-components/modal Patch
@spectrum-web-components/number-field Patch
@spectrum-web-components/overlay Patch
@spectrum-web-components/picker-button Patch
@spectrum-web-components/picker Patch
@spectrum-web-components/popover Patch
@spectrum-web-components/progress-circle Patch
@spectrum-web-components/radio Patch
@spectrum-web-components/search Patch
@spectrum-web-components/sidenav Patch
@spectrum-web-components/slider Patch
@spectrum-web-components/split-view Patch
@spectrum-web-components/status-light Patch
@spectrum-web-components/swatch Patch
@spectrum-web-components/switch Patch
@spectrum-web-components/table Patch
@spectrum-web-components/tabs Patch
@spectrum-web-components/tags Patch
@spectrum-web-components/textfield Patch
@spectrum-web-components/thumbnail Patch
@spectrum-web-components/toast Patch
@spectrum-web-components/tooltip Patch
@spectrum-web-components/top-nav Patch
@spectrum-web-components/tray Patch
@spectrum-web-components/underlay Patch
@spectrum-web-components/custom-vars-viewer Patch
@spectrum-web-components/story-decorator Patch
@spectrum-web-components/vrt-compare Patch
@spectrum-web-components/base Patch
@spectrum-web-components/grid Patch
@spectrum-web-components/opacity-checkerboard Patch
@spectrum-web-components/reactive-controllers Patch
@spectrum-web-components/shared Patch
@spectrum-web-components/styles Patch
@spectrum-web-components/theme Patch
@spectrum-web-components/truncated Patch
example-project-rollup Patch
example-project-webpack Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

Branch preview

Review the following VRT differences

When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:

If the changes are expected, update the current_golden_images_cache hash in the circleci config to accept the new images. Instructions are included in that file.
If the changes are unexpected, you can investigate the cause of the differences and update the code accordingly.

Copy link

github-actions bot commented May 30, 2025

Tachometer results

Chrome

progress-bar permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 454 kB 28.64ms - 29.46ms - faster ✔
2% - 6%
0.48ms - 1.68ms
branch 432 kB 29.69ms - 30.57ms slower ❌
2% - 6%
0.48ms - 1.68ms
-
Firefox

progress-bar permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 454 kB 58.15ms - 60.89ms - unsure 🔍
-7% - +0%
-4.33ms - +0.13ms
branch 432 kB 59.86ms - 63.38ms unsure 🔍
-0% - +7%
-0.13ms - +4.33ms
-

@marissahuysentruyt marissahuysentruyt force-pushed the marissahuysentruyt/fix-progress-bar-animation-jitter branch from 8b82cb1 to d09f711 Compare June 9, 2025 18:41
@aramos-adobe
Copy link

@marissahuysentruyt It most certainly fixes the bug @Rajdeepc mentioned. When I slowed down the animation speed the progress fluidly fills the tracks from 0% to 100% and doesn't start with a width.

Screen.Recording.2025-06-11.at.10.47.35.AM.mov

@marissahuysentruyt marissahuysentruyt force-pushed the marissahuysentruyt/fix-progress-bar-animation-jitter branch from d09f711 to 159efe4 Compare June 11, 2025 18:28
@castastrophe castastrophe force-pushed the marissahuysentruyt/fix-progress-bar-animation-jitter branch from c83edb0 to 6fbb765 Compare June 12, 2025 15:09
- adds magic number positioning to progress bar animation keyframes, to
smooth out the looping animation
- alters animation for ltr and rtl to position the fill fully off the
track at beginning and end of animation, to smooth out the looping
@marissahuysentruyt marissahuysentruyt force-pushed the marissahuysentruyt/fix-progress-bar-animation-jitter branch from 6fbb765 to ddbd3c3 Compare June 12, 2025 17:22
@marissahuysentruyt marissahuysentruyt marked this pull request as ready for review June 12, 2025 17:22
@marissahuysentruyt marissahuysentruyt requested a review from a team as a code owner June 12, 2025 17:22
@marissahuysentruyt
Copy link
Collaborator Author

New branch here: #5535

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

Successfully merging this pull request may close these issues.

2 participants