Waypoint icon indicating copy to clipboard operation
Waypoint copied to clipboard

Sort by metadata key

Open dplucenio opened this issue 2 years ago • 2 comments

Sort by note metadata key

Resolves: #38

Overview

This pull request introduces the functionality that allows users to manually order the notes listed in their Waypoint by specifying a priority in the note's metadata. By default, notes are listed alphabetically, but this change allows notes to be listed in order of priority instead. The version has been bumped to 1.5.0 to indicate the new feature introduction.

Changes

README.md:

  • Added a new section "Ordering Notes on Waypoint" explaining how users can order their notes in the generated waypoints by specifying waypointPriority in the frontmatter of their notes.

main.ts:

  • The settings interface WaypointSettings was updated with a new property waypointPriorityKey.
  • A new method updateAncestorWaypoints is introduced to replace updateParentWaypoint for updating all ancestor waypoints of a file or folder. This was necessary as inside folder notes priority change would change waypoints in higher levels.
  • Introduced getWaypointPriority function to fetch the priority of a note from its metadata, which supports both regular notes and folder notes.
  • Implemented a new sorting method sortWithPriority to sort the nodes considering their priority.

WaypointSettingsTab:

  • A new setting field is added to let users set the frontmatter key for note order priority.

dplucenio avatar Jun 09 '23 01:06 dplucenio

I definitely would love that.

MahmadSharaf avatar Jul 18 '23 05:07 MahmadSharaf

Would also love to see this!

zachdaniel avatar Jul 27 '23 14:07 zachdaniel