adobe / spectrum-web-components

Spectrum Web Components
https://opensource.adobe.com/spectrum-web-components/
Apache License 2.0
1.21k stars 192 forks source link

[Bug]: Slider and Numberfield don't respect different locale with fractional steps #4483

Closed spdev3000 closed 1 month ago

spdev3000 commented 1 month ago

Code of conduct

Impacted component(s)

Slider, Numberfield

Expected behavior

When rendering an editable slider component or Numberfield with step=0.1 it should correctly increase/decrease the value by this step when using stepper buttons or key events (arrow up/down) - in all locales.

Actual behavior

When rendering an editable slider component or Numberfield with step=0.1 changing values by stepper button or key event works correctly in en-US locale, but doesn't in other locales (such as de-DE) where different characters are used as delimiter (, instead of .)

Screenshots

No response

What browsers are you seeing the problem in?

No response

How can we reproduce this issue?

  1. Go to https://studio.webcomponents.dev/edit/3kPO18Pv4S4RTLAy6Pia/src/index.ts?p=stories
  2. Try adjusting the Numberfields in different locales with stepper or key events
  3. See different results for different locales, en-US is working well, de-DE isn't

Sample code that illustrates the problem

No response

Logs taken while reproducing problem

No response

najikahalsema commented 1 month ago

Fix your value formatter !!!!! @blunteshwar