gpui-component icon indicating copy to clipboard operation
gpui-component copied to clipboard

slider: Notify on bound update

Open CherryWorm opened this issue 1 month ago • 2 comments

The slider has the same issue that was fixed in #1588. When resizing, the state isn't notified when the bounds change, leading to the slider not updating until it is rendered again:

https://github.com/user-attachments/assets/de79c338-d489-4173-a0be-45af30c8ae95

Again, I believe the defer is necessary here. Only notifying without deferring does not change this behavior. With the deferred notify, this behavior is fixed:

https://github.com/user-attachments/assets/6e77dc52-ec1f-47a8-945f-4a70ce7bd48d

CherryWorm avatar Nov 15 '25 10:11 CherryWorm

I understand that this is indeed a problem, but using defer to fix it is not the right approach.

Have you tried cargo run -- slider in GPUI Component story, I'm seeing is that there is a slight delay after resizing, but not as slow as when you resize the video.

huacnlee avatar Nov 17 '25 01:11 huacnlee

@CherryWorm Which distro/compositor are you using? I'm on Ubuntu 25.04/Wayland and I don't see the delay either. There is another issue which mentions laggy UI, and they're using XFCE/X11. But I can't replicate that either

zanmato avatar Dec 01 '25 07:12 zanmato