Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path grouping should [optionally] select the last directory #128

Closed
theisjendal opened this issue Aug 7, 2024 · 2 comments
Closed

Path grouping should [optionally] select the last directory #128

theisjendal opened this issue Aug 7, 2024 · 2 comments

Comments

@theisjendal
Copy link

Describe the solution you'd like
I have deep directory paths, ending in something like .../projects/[project]/[taskNote]. However, currently the project will group by one of the first directories instead of [project]. It would therefore be very nice to have a toggle or define the depth of the directory to group by. For example, having 1, would select [project] as it's its parent directory, 2, would select projects its grandparent and so forth.

Describe alternatives you've considered
Currently I've made two rather crude edits to accomplish this, in the function parseFolderFromPath I've added:

  if ((path2.match(/\//g) || []).length > 1 )
      s = path2.split("/");
      path2 = s.slice(s.length - 2).join("/");

and in the function splitHeading I've added:

  if ((heading.match(/\//g) || []).length > 1 ) {
    h = heading.split("/")
    heading = h.slice(h.length - 2).join("/")
  }

However, these overrule the current implementation. The simple solution is thus instead a toggle between this or the current implementation.

@j-palindrome
Copy link
Owner

It would be cool to add this. In roadmap!

@j-palindrome
Copy link
Owner

Folders now will show the last folder in the path.

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

No branches or pull requests

2 participants