feat: add sort in search bar #897
Open
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.
Pull request
New Feature Submissions:
Changes to Core Features:
Please describe your changes
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature:
Introduces sorting by tags and dueDate.
Describe what your code exactly does and if it affects any other part of the code in any way (especially check for breaking changes)
Adds a "sort:" filter to the search bar, which accepts a comma-separated list of a permutation of any size from {"tags", "dueDate"}, where earlier fields have precedence. If there are multiple tags per card, they are sorted lexicographically. dueDates are sorted as such: lesser dueDate, greater dueDate, null dueDate, completed lesser dueDate, completed greater dueDate.
Additional context
Since I mostly created this for self use, I haven't yet implemented additional features (directionality, other fields) as I am indifferent to the details of their implementation.