NotePlan / NotePlan/plugins

Helpers: Add hierarchy to the chooseFolder helper

Open
#556 0 comments 0 reactions 1 assignee View on GitHub

@jgclark is already working on this.

Since Apr 11, 2024.

enhancement
Dominant language
JavaScript
Stars
204
Forks
82
Avg merge
22h 27m
Merged PRs (30d)
3

Description

We now use the chooseFolder helper in a lot of places. But one thing I find frustrating is that I am often filtering for something, like the word project. It shows me lots of choices for that term, and some of them are indented, and visually seem to be indented under items above them, but they actually may not be in that folder at all. So I sometimes move a note to a folder that is not actually the one I wanted.

Screen Cap 2024-04-11 at 11 14 44@2x

In the above example, you would assume all these subfolders are inside the folder "Travel", but in fact, they are not!

On the other hand, something I really like about your getFolderListMinusExclusions() function is that it solves this issue by putting the whole path in the choice. So when you filter, you actually see the whole path to that folder on the line.

Screen Cap 2024-04-11 at 11 16 28@2x

I would like to suggest/recommend that we change chooseFolder to use the format/output of getFolderListMinusExclusions() rather than making its own folder list with just icons/indents.

I guess we could make it another parameter for format, but I think the getFolderListMinusExclusions() approach is better and I would recommend we just change the chooseFolder helper to use it instead so all plugins that use it just get better.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.