Skip to content

Conversation

@dplucenio
Copy link

@dplucenio dplucenio commented Jun 9, 2023

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 dplucenio changed the title Sort by metadata field Sort by metadata key Jun 9, 2023
@dplucenio dplucenio marked this pull request as ready for review June 11, 2023 23:27
@MahmadSharaf
Copy link

I definitely would love that.

@zachdaniel
Copy link

Would also love to see this!

This was referenced Aug 1, 2023
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.

Sorting options

3 participants