Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Erratic flickering when changing values in FluentNumberField on InteractiveServer #2803

Closed
johnW-ret opened this issue Oct 12, 2024 · 1 comment · Fixed by #2807
Closed
Labels
status:needs-investigation Needs additional investigation

Comments

@johnW-ret
Copy link

johnW-ret commented Oct 12, 2024

🐛 Bug Report

Rapidly changing input values of FluentNumberField causes flickering in InteractiveServer mode in below video:

20241012-2132-51.4059115.mp4

💻 Repro or Code Sample

Get repro

Option 1, create yourself:

  1.  dotnet new fluentblazor -o LoopingSignalRGlitch -f net8.0
     cd .\LoopingSignalRGlitch\
     dotnet new sln
     dotnet sln add .
  2. Replace Pages/Counter.razor, replace lines past FluentButton with
    <FluentNumberField @bind-Value="leading">
        Leading Period
    </FluentNumberField>
    
    <InputNumber @bind-Value="leading2" />
    
    @code {
        private int currentCount = 0;
        public int leading;
        public int leading2;
    
        private void IncrementCount()
        {
            currentCount++;
        }
    }

Option 2, clone

https://github.com/johnW-ret/LoopingSignalRGlitch

Open in GitHub Codespaces

Execute

  1. dotnet watch or debug with hot reload from Visual Studio
  2. Enable 3G (or any) throttling from the Network tab in the browser and refresh the page
  3. Spam the FluentNumberField component as in the video

💁 Possible Solution

No idea but would be willing to contribute a fix pending feedback. I wanted to make this issue asap.

🔦 Context

My original repo which updates a chart on value change with a bind-Value:after. I was not testing with 3G at this time, and the issue in the video would happen often with no throttling. After removing all of these effects in test, it appeared to alleviate the issue, but I couldn't get rid of it completely. Switching to 3G seemed to make it happen more often, as you can see in the repro, but I would like to emphasize it does not only happen in 3G and the issue should not be dismissed as not pertaining to real-world constraints.

I understand SignalR does not work well with slow network connections, but this issue doesn't happen with the standard Blazor input components so I take this as an issue with FluentInputField specifically.

🌍 Your Environment

  • Windows 11 Surface Laptop Studio
  • Microsoft Edge Version 129.0.2792.79 (Official build) (64-bit)
  • .NET 8.0.403 and Fluent UI Blazor library Version 4.10.2
  • localhost and rapsberry pi in docker containing
@microsoft-github-policy-service microsoft-github-policy-service bot added the triage New issue. Needs to be looked at label Oct 12, 2024
@vnbaaij vnbaaij added status:needs-investigation Needs additional investigation and removed triage New issue. Needs to be looked at labels Oct 13, 2024
@vnbaaij
Copy link
Collaborator

vnbaaij commented Oct 14, 2024

Will be fixed with PR mentioned in next release.

@vnbaaij vnbaaij closed this as completed Oct 14, 2024
vnbaaij added a commit that referenced this issue Oct 14, 2024
* Docu update

* Fix #2803 by not using current-value but value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:needs-investigation Needs additional investigation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants