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.
Sortbydate
Pull Request Type
Related issue
Initial addition to #5595 (not sure it would be considered closed and we just make a new issue for future changes)
Description
Adds a sort by date ascending/descending toggle to the history page, this is a stopgap to adding a more fully fledged filter by setting, but I wanted to keep the changes small and incremental since design wise, some decisions have to be made and I'm not sure I'm the one that should make those decisions. (like other kinds of sorting/filtering in history page)
I also removed the second sorting it does when it does the search, since the array it uses is already sorted (in whichever order we choose), and the filter method I believe does a linear scan, it seemed unnecessary to sort twice, if we think it's necessary I can add it back and just add a condition to sort whichever way we need it to (But I don't think it's needed)
Screenshots
Testing
I tested by adding random videos to history, sorting it back and forth, then doing search and sorting back and forth as well
possibly with a huge history we'd like to view how the sorting performs... I don't have a huge history at the moment, so it's hard to tell. it's expected to a certain degree
Desktop
Additional context
I stuck to the simple toggle since I was only going to do the asc/desc sorting on this PR