Skip to content

feat: add sort in search bar#897

Open
tinnamchoi wants to merge 2 commits intokanriapp:mainfrom
tinnamchoi:sort
Open

feat: add sort in search bar#897
tinnamchoi wants to merge 2 commits intokanriapp:mainfrom
tinnamchoi:sort

Conversation

@tinnamchoi
Copy link

@tinnamchoi tinnamchoi commented Oct 24, 2025

Pull request

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Are your git commits signed with a valid GPG key?

New Feature Submissions:

  1. Did you lint your code locally before submission? (only on the files that I modified)
  2. Did you test your feature thoroughly to ensure there are no bugs?
  3. Does your feature not introduce breaking changes?

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable? (not sure how I would write tests for this? open to suggestions)
  • Have you successfully run tests with your changes locally? (N/A)

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.

@trobonox
Copy link
Collaborator

Thanks for your PR! Will review it and get back to you soon.

@trobonox
Copy link
Collaborator

trobonox commented Nov 1, 2025

Hi! Thanks again for your contribution.

I've taken a look at the code and tested the feature, and it seems to work great.

Just one nitpick on the UX-side: could you maybe highlight the keywords tags and dueDate inside the search box, for example by giving them a different color or putting them inside a little container with a different background color? For some users it might be a little unclear what they have to enter, and the highlighting would be instant feedback that the sorting actually works.

Once that's added, the PR is ready to merge :)

@trobonox
Copy link
Collaborator

trobonox commented Jan 9, 2026

Hi, any updates on this PR? Once the UX issue I've addressed above is solved this PR would be ready to merge.

@tinnamchoi
Copy link
Author

I started an internship not long after opening this so I haven't been quite as active, I'll see when I can find time

@trobonox
Copy link
Collaborator

trobonox commented Jan 9, 2026

No worries at all, take your time. And congrats on the internship :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants