Search-by-TFM feature flight UI bug fix #9357
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part of https://github.com/NuGet/Engineering/issues/4579
Problem:
When the Search-by-TFM feature flight was disabled for a user, as it will be for most users to begin with, the 'sort by' dropdown didn't automatically submit the form when a user changed its value.
Fix:
The new
frameworks
andtfms
input fields in the html form were hidden behind the feature flight but still being referenced by some javascript code, which caused errors and prevented all the javascript code below it in the file from running. This code included the sort by event handler.The
frameworks
andtfms
were hidden form fields, so I've just moved them outside the feature flight to avoid errors. There is no visible change.I've also moved the framework checkbox initialization code to the bottom of the javascript file so that it can't cause similar issues with other code.
I've also added a title attribute to one of the html links to fix an a11y issue I noticed.