facebook / facebook/astryx

[Bug] Slider component - track size changes often

Open
#4,033 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
13k
Forks
1.1k
Avg merge
1d 15h
Merged PRs (30d)
690

Description

### Description

When I drag the slider knob, the track size changes due to text label changing its width (on value update), triggering unnecessary recalculations of the track width. Also there probably should be formatting applied to the numbers in the labels, to avoid things like in the screenshot:

Image

Recording of the track size changes in the docs site Slider component:

https://github.com/user-attachments/assets/44a75aaa-2b1b-4e2e-8858-58e9df2a2d11

### Reproduction

1. Render Slider component with label representing value
2. Drag the knob without releasing it
3. notice how the track width is changing, triggering recalculating of the value due to knob constantly shifting under the mouse

### Astryx Version

"@astryxdesign/core": "^0.1.6",

### Environment

Chrome 150 Mac OS

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.