zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
27.2k stars 1.9k forks source link

(Feature request) New Sort Criteria Parents First #2649

Closed cwilliams5 closed 2 years ago

cwilliams5 commented 2 years ago

Describe feature

Sometimes, I want to be able to sort like files in a file explorer. By this I mean, if I sort a folders contents in Windows, it looks like this: Folders(A-Z) then Files(A-Z). There are some times in Trilium that I would want to sort an entire subtree in a similar way: NotesWithChildren(A-Z) then NotesWithoutChildren(A-Z).

This could be another option along title, date created, and date modified in sorting critera. This should also be an option for the #sorted label.

Even the "folder" icon for notes with children brings to mind this type of sorting:

trilium_2022-02-13_15-57-57

Additional Information

No response

zadam commented 2 years ago

Interestingly, the sorting algorithm already supports this as it's used for importing ZIPs without ordering metadata, but it's not exposed to the end user in any way.