Stop resetting filtering query params on tab change #561
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.
Fixes #515
I tried to write an acceptance test for this, but I couldn't manage to get one that failed under the old code. This bug is very elusive, and I kind of suspect fastboot might be part of it (although I've never used fastboot so I could be very wrong here).
It seems like sometimes you will load the page and it will work perfectly as intended, and other times the bug will pop up. The best reproductions I've found are either what was said in #515 (opening the url to the class directly in a new tab and then trying the bug), or going to the home page in a fresh tab and then going to the class page. From what I can tell, for some reason in these cases the link-to's never update with new query params on them when the values change, causing the bug.
With that said, this PR has solved the bug in those cases, and I haven't been able to reproduce it with this change, so I figured I would throw it up for y'all to look at and decide what to do. :)