The checkboxes for the framework generations and TFMs blink when the search page is loaded with filter parameters.
The likely cause for it is how we initialize checkbox states on the page. JavaScript code reads the search page URL and uses it to set the state of the checkboxes on the page. This happens after page load, which is why we see the blinking.
Repro Steps
Select a framework generation or TFM filter checkbox, say .NET
Click on Apply
The .NET checkbox will blink after the page loads
Expected Behavior
The checkbox states should be set in the .cshtml itself so that we don't need to run any JavaScript to initialize them.
We can modify the FrameworkFilterGroup objects in the view model to have a checkbox state enum with Checked/Unchecked/Indeterminate values.
Impact
It bothers me. A fix would be nice
Describe the bug
The checkboxes for the framework generations and TFMs blink when the search page is loaded with filter parameters.
The likely cause for it is how we initialize checkbox states on the page. JavaScript code reads the search page URL and uses it to set the state of the checkboxes on the page. This happens after page load, which is why we see the blinking.
Repro Steps
.NET
Apply
.NET
checkbox will blink after the page loadsExpected Behavior
The checkbox states should be set in the
.cshtml
itself so that we don't need to run any JavaScript to initialize them.We can modify the
FrameworkFilterGroup
objects in the view model to have a checkbox state enum withChecked/Unchecked/Indeterminate
values.Screenshots
No response
Additional Context and logs
See https://github.com/NuGet/NuGetGallery/pull/9782#issuecomment-1907354318