Esri / calcite-design-system

A monorepo containing the packages for Esri's Calcite Design System
https://developers.arcgis.com/calcite-design-system/
Other
280 stars 76 forks source link

bug(calcite-button): double-jump on loading=false when prefers-reduced-motion:reduce #8576

Closed maxpatiiuk closed 1 month ago

maxpatiiuk commented 8 months ago

Check existing issues

Actual Behavior

When calcite-button had loading="true", and you change that to loading="false", the button's width jumps twice - firstly, the gap between loader and button's content is removed, and after a brief delay, the loader itself is removed:

https://github.com/Esri/calcite-design-system/assets/40512816/52b0ed90-582a-4042-8f79-a5cc83818ef3

Expected Behavior

Loader and the gap should be removed simultaneously and immediatly

Reproduction Sample

https://codepen.io/maxpatiiuk/pen/poYbEmZ

Reproduction Steps

  1. Click on a button in the codesample above
  2. After loader is removed, see button jump twice

Reproduction Version

2.1.0

Relevant Info

Note: to reproduce this bug, you need to have prefers-reduced-motion: reduce set in your OS settings or DevTools emulation:

Screenshot 2024-01-08 at 17 33 20

Regression?

No response

Priority impact

p4 - not time sensitive

Impact

minor

Calcite package

Esri team

ArcGIS Maps SDK for JavaScript

github-actions[bot] commented 1 month ago

Installed and assigned for verification.

DitwanP commented 1 month ago

🍡 Verified on 2.12.0-next.4

https://github.com/user-attachments/assets/06ad9e9b-670b-4d74-bb2b-d4f53fe53095