microsoft / fluentui-blazor

Microsoft Fluent UI Blazor components library. For use with ASP.NET Core Blazor applications
https://www.fluentui-blazor.net
MIT License
3.3k stars 305 forks source link

FluentSlider visual and value flickering after manual drag #1718

Closed JA6502 closed 2 months ago

JA6502 commented 2 months ago

πŸ› Bug Report

The FluentSlider element will occasionally flicker in both its visual representation and value when dragged manually. This seems to correspond to the use of the InteractiveServer rendermode, and frequency of the issue seems to correlate with number of sliders in the component. Below is a 10 second recording of the bug.

https://github.com/microsoft/fluentui-blazor/assets/163899561/01a72525-f4d6-429d-9b5b-59985f92fbb7

πŸ’» Repro or Code Sample

https://github.com/JA6502/SliderBug

This repo contains a VS2022 solution in which I was able to recreate the bug. Steps for recreation in general seem to be: create a new Blazor WebApp using FluentUI, then include a high-fidelity slider on a page or component that uses the render mode InteractiveServer. With only one slider, the bug is rare. But frequency of occurrence can be increased by placing the component in a Razor Class Library, and further by including multiple sliders. Aggressive changing of the slider can also cause the bug to appear.

πŸ€” Expected Behavior

Slider is expected to stop immediately on mouse up, and it appears to do so in WASM projects. WebApp projects should have the same behavior.

πŸ’ Possible Solution

I suspect this may have to do with latency between the web client and the server, or possibly it may stem from the Fluent javascript first calculating the new slider position and then setting the value based on that calculated position.

🌍 Your Environment

vnbaaij commented 2 months ago

There was one too many parameters being set on the underlying web components. Removed that. Fix will be in next release.

geowong2022 commented 2 weeks ago

Hi @vnbaaij , is this fixed already in .net 6 version?

sedwick2048 commented 1 day ago

How soon before this "next release" is out? I'm using v4.7.2 and it's happening to me as well.

vnbaaij commented 1 day ago

When it is ready.

We don't have a set release schedule. But probably somewhere in the next two weeks.