Skip to content

Show search results for current folder first#2667

Merged
jeremypw merged 4 commits intomainfrom
jeremypw/fix-search-results-order
Dec 29, 2025
Merged

Show search results for current folder first#2667
jeremypw merged 4 commits intomainfrom
jeremypw/fix-search-results-order

Conversation

@jeremypw
Copy link
Contributor

@jeremypw jeremypw commented Nov 3, 2025

Fixes #2015

BEFORE
Screenshot from 2025-11-03 15 57 04

AFTER
Screenshot from 2025-11-03 15 56 14

@jeremypw jeremypw added the Bitesize Simple, small diff label Nov 3, 2025
@jeremypw jeremypw added this to the 7.2.0 milestone Nov 3, 2025
@jeremypw jeremypw marked this pull request as ready for review November 3, 2025 15:58
@jeremypw jeremypw requested a review from a team November 7, 2025 18:25
@jeremypw jeremypw mentioned this pull request Nov 7, 2025
3 tasks
@jeremypw jeremypw modified the milestones: 7.2.0, 7.2.1 Dec 7, 2025
Copy link
Member

@ryonakano ryonakano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeremypw Sorry for late review, but could you explain how this results fixing the linked issue? I don't get why you added 0, 1, 2, and 4, instead of 0, 1, 2, and 3.

@jeremypw
Copy link
Contributor Author

@ryonakano Thanks for the review! This works by ensuring that the "In this Folder" header sorts before the other headers. Without the suffix, the sort key would be the same for all of them. To be honest, I cannot remember why I used the suffix "4" for the Zeitgeist header. 🤷 Maybe just a typo. I'll check it still works with "3" and change it if it does,

@jeremypw jeremypw requested a review from ryonakano December 27, 2025 10:41
@jeremypw
Copy link
Contributor Author

Hold on a moment reviewing, I want to check something.

@jeremypw jeremypw marked this pull request as draft December 27, 2025 10:44
@jeremypw
Copy link
Contributor Author

I can't see any reason now why I did not use the existing header categories, for deep, bookmark and zeitgeist searches which are already in the desired order (apart from zeitgeist). Hopefully there isn't some subtle reason I am missing...

@jeremypw jeremypw marked this pull request as ready for review December 27, 2025 11:04
@jeremypw jeremypw modified the milestones: 7.2.1, 7.3.1 Dec 27, 2025
Copy link
Member

@ryonakano ryonakano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for explanation! The current code more makes sense to me and confirmed the linked issue is fixed.

@jeremypw jeremypw merged commit 68aa166 into main Dec 29, 2025
4 checks passed
@jeremypw jeremypw deleted the jeremypw/fix-search-results-order branch December 29, 2025 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bitesize Simple, small diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Search results should list folders and files "In this folder" on top

2 participants