-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Fix sorting #7878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix sorting #7878
Conversation
Summary of ChangesHello @rom1dep, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves a critical issue in the note sorting mechanism where the 'folders first' preference could inadvertently displace notes explicitly marked for the top or bottom of a list. The core change involves a strategic reordering of sorting rule application to guarantee that pinned notes always take precedence. Concurrently, the PR enhances the reliability of the sorting features by introducing comprehensive new tests that cover various sorting scenarios, including natural sorting and the corrected interaction of folder prioritization with pinned notes. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request correctly adjusts the sort priority to ensure #top notes are always placed above folders when sortFoldersFirst is active. The added tests improve coverage for sorting functionality.
I've found one issue with the sortFoldersFirst logic when combined with reverse sorting, which causes folders to be sorted last. I've left a detailed comment with a suggested fix and also recommended adding a test case to cover this scenario.
Overall, a good change that addresses the primary issue.
It is kept this way in case the user would wish, for any reason, sort folders last. |
@rom1dep , |
eliandoran
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget to update the documentation.
@eliandoran this PR is consistent with the current behaviour in that Stepping back a bit, I certainly don't like the syntax of it all, but I also don't think that this PR makes things worse. My preference, if I had a shot at a clean slate design, would be to have If we were to migrate to something like that, I am not sure what the resulting PR would look like (I suppose that we would have to bump the data model version and run a post-update full-document migration, and I don't trust my abilities to get that right). Point taken about the documentation, though. Once we reach consensus on the above, I will get on to it and clarify how the different sorting modes interact with one another (which, tbf, should have been done a long time ago). |
|
@rom1dep , Let's reach consensus. Here's how I see it:
|
#top