Skip to content

Conversation

@Aga-C
Copy link
Member

@Aga-C Aga-C commented Nov 30, 2024

What is it?

  • Bugfix
  • Feature
  • Codebase improvement

Description of the changes in your PR

  • Added possibility to set own sorting for each checklist.
    • Reused customSorting logic from Commons.
    • Because it's called customSorting in other apps, and "custom sorting" means something different here, I've created helpers with the name ownSorting.
    • Sorting is applied both inside the app and for widgets.
  • Refactored moveDoneChecklistItems to be part of config.sorting, so it's also possible to set it separately for each checklist.
    • Added it as another flag to config.sorting, similarly as showing items count has been done in Gallery's grouping options.
    • To not lose users settings, I've created a migration, that is run only once. It copies the moveDoneChecklistItems value to be a flag in a current config.sorting.
  • Additionally, it fixes two bugs:

Before/After Screenshots/Screen Record

qemu-system-x86_64_1GqMvlYkTT.mp4

Fixes the following issue(s)

Acknowledgement

@Aga-C Aga-C mentioned this pull request Apr 6, 2025
7 tasks
@naveensingh naveensingh self-assigned this Apr 20, 2025
@naveensingh
Copy link
Member

Sorting seems to be working fine. That's a clever reuse of per-folder sorting functions :)

Refactored moveDoneChecklistItems to be part of config.sorting, so it's also possible to set it separately for each checklist.

I know you put in the effort here but this adds too much flexibility to this option. It's better to move it back into settings and keep it global (as discussed sometime ago!). That’ll keep things simpler, both code-wise and UX-wise.

Thanks.

@naveensingh
Copy link
Member

Move to the top, Move to the bottom, and Dragging do not work when sorting by title and using per-note sorting.

Does it happen to you too?

@naveensingh naveensingh added testers needed We need testers for this issue or pull request and removed testers needed We need testers for this issue or pull request labels May 6, 2025
@naveensingh
Copy link
Member

I'm working on it.

Copy link
Member

@naveensingh naveensingh left a comment

Choose a reason for hiding this comment

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

Fixed the bug. Everything else looks good, merging now.

@naveensingh naveensingh merged commit b9416a8 into FossifyOrg:master May 6, 2025
4 of 5 checks passed
@Aga-C Aga-C deleted the add-own-sorting branch May 6, 2025 19:45
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.

checklist displays wrong sort order Improvement of the overview screen Sort by feature for each Note

2 participants