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

Utilize subfolders for navigation #183

Closed
prat0088 opened this Issue May 25, 2016 · 65 comments

Comments

Projects
None yet
5 participants
@prat0088

prat0088 commented May 25, 2016

I rely heavily on subfolders for organization. It would be nice to to be able to filter my notes list down by the subfolders somehow.

By the way, QOwnNotes is the I've been searching for that I didn't believe would exist. Markdown with syntax highlighting. Search. TOC. Search. Windows. Hooray.

@pbek pbek added the enhancement label May 25, 2016

@pbek

This comment has been minimized.

Owner

pbek commented May 25, 2016

Thank you for your kind words. Yes, it didn't exist, that was the reason I started to create it. 😸

It would be nice to to be able to filter my notes list down by the subfolders somehow.

Could you please describe what you mean.
Note that you can already turn on a folder selector in the settings and there also is tagging.

@prat0088

This comment has been minimized.

prat0088 commented May 26, 2016

Note that you can already turn on a folder selector in the settings and there also is tagging.

I use plain text editors on mobile so I can't tag there. I also prefer to use subfolders for organization because more applications can navigate subfolders than read an .sqlite database of tags.

I do see a list of folders in a drop-down list, but only the top level folder. If I add folder "Notes" to QOwnNotes, "Notes" will display in the dropdown but none of its subfolders.

@pbek

This comment has been minimized.

Owner

pbek commented May 26, 2016

And now you don't want to add each folder individually, but to be able to view all sub-folders in a tree?
Hm, that would add a lot of new complexity to QOwnNotes...

@LightTemplar

This comment has been minimized.

LightTemplar commented Jun 23, 2016

I would like to use such a functionality too.
I have a "Projects" Folder, where all projects have own subfolders with predefined structure, and I would very like to store also related Notes there. If the QOwnNotes would search all text and .md files through all subfolders - it would be great!
May be later also with a searching ability by the name of an owning folder...

@pbek

This comment has been minimized.

Owner

pbek commented Jun 23, 2016

Note tree: I don't know yet if this will ever happen, since it adds a ton of complexity and side effects.

@LightTemplar

This comment has been minimized.

LightTemplar commented Jun 23, 2016

I understand.But I also understand, the more people will need it, the more chance you will find a way to implement it ;)
Thanks for your work, the App Heartbeats from my installation will beat definitive more offen =)

@pbek

This comment has been minimized.

Owner

pbek commented Jun 23, 2016

😸

@pbek

This comment has been minimized.

Owner

pbek commented Jun 27, 2016

I started to work on that issue in a branch https://github.com/pbek/QOwnNotes/tree/feature/note-tree. A lot of works and troubles to solve awaits there..

@Maboroshy

This comment has been minimized.

Contributor

Maboroshy commented Jun 27, 2016

Is the "media don't follow note" issue I've posted in the scope for this branch?

I ask because I'm close to finishing first part of the "back-end" shell script mainly focused on inbox. After some polish I plan to release it. Next to inbox I was going to work on links part: conversion, linked files handling and so on.

Will note trees be just an interface change or there are going to be some changes in "media" handling?

@pbek

This comment has been minimized.

Owner

pbek commented Jun 27, 2016

media issue: Can you please ask about that in the issue you mean?

A lot of changes has to be made to make that note tree work... I guess the media folder will stay in the note folder and not in the sub folders, but I'm not sure yet....

@Maboroshy

This comment has been minimized.

Contributor

Maboroshy commented Jun 27, 2016

This one.

Having "media" stored in "root" note folder will solve the issue above. It was one of the "modes" I've planned. But only as long as you have only one "root".

The other was having a "media" directory for each individual note. I currently have that with web pages turned to notes as most browsers are making "web page_files" dirs when they save web pages.

Another big thing is expanding from "media" to generally "attachments" - any file types linked in/to note.

@pbek

This comment has been minimized.

Owner

pbek commented Jun 27, 2016

You have many plans...
QOwnNotes already support relative links to other files...

@Maboroshy

This comment has been minimized.

Contributor

Maboroshy commented Jun 27, 2016

It does. But as far as I know it doesn't do the "copy to media and link to it" trick for them.

One of "modes" for file links can be using reference linking instead of in-text. That way all "attachments" can be listed in one place.

You know that I can go on and on. :-)

@pbek

This comment has been minimized.

Owner

pbek commented Jun 27, 2016

I'm not always sure what you are talking about, but please don't let us discuss those ideas in this issue, @Maboroshy. ;)

@pbek

This comment has been minimized.

Owner

pbek commented Jun 30, 2016

@prat0088 and @LightTemplar, I now released a pre-alpha of the note sub-folder tree integration in version 16.06.14.

  • first pre-alpha release of the note sub-folder tree integration
    • per default notes will be shown as a list in a new note tree widget
    • all functionality of the old note list was integrated into the new note
      tree and should work as it used to
    • for each configured note folder you can now check a checkbox
      Show subfolders in note list to show the subfolders of the note folder
    • if the checkbox is checked notes of a note folder and the subfolders are
      shown as tree instead of a list
    • editing notes in subfolders should already work in most cases, but you
      cannot create new notes in subfolders yet
    • a lot more work has to be done to be able to use tags, media files,
      note versioning and trash, moving notes in subfolders, updating the
      position of edited notes in the tree and so on

Could you please test it and tell me what you think?

@pbek

This comment has been minimized.

Owner

pbek commented Jun 30, 2016

@Maboroshy, of course you are also welcome to test the new release!

@Maboroshy

This comment has been minimized.

Contributor

Maboroshy commented Jun 30, 2016

I've typed quite a lot text about ergonomics, optimal number of items, my views on using file system for all kinds of things. But I've deleted all that to type just the summary stuff.

You have a good tag panel - use it for the subfolders too! Cut it in half subfolder tree on top, tag tree on bottom, note list on the right. Most of the popular note apps do this, it's familiar and well tested solution.

I think users rarely need to see the content of two folders, we mostly search for something specific. With tag panel I:
click tag
click note
click another tag
click note and so on.
Need to use the tree and scroll a lot - I should reorganize my tags.

I have about 4-5 times less tags than notes, so when I've tried new tree interface it was like:
open folder
click note
cli... hell my folder is under all those notes, should I scroll down or should I close current folder?
ok I'm scrolling, open folder, damn my note is somewhere below, need to scroll some more
I've found it! Click note.
now there was some folder in the middle, need to scroll up to search for it. I have about 3 screens of stuff to scroll and search here
ok I've closed all the folders... what was I've been searching for?

And there can be nested subfolders...

I'm sorry if my thoughts above are somehow harsh. I just want your app to be the best.

I'll try to post some more specific UI tests later. I've started them but that thoughts above overwhelmed me.

@pbek

This comment has been minimized.

Owner

pbek commented Jun 30, 2016

Having the sub folders in a different tree widget sounds like a good idea, too bad I had to re-implement the note list before you had it. :)

@Maboroshy

This comment has been minimized.

Contributor

Maboroshy commented Jul 1, 2016

Anyway that's going to be big step forward for the app. Especially for me because I like using file system based hacks. Which folders does it hide in the current version? Only hidden and "media"?

@pbek

This comment has been minimized.

Owner

pbek commented Jul 1, 2016

only ., .. and media are ignored

@LightTemplar

This comment has been minimized.

LightTemplar commented Jul 1, 2016

@pbek, I agree with @Maboroshy about splitting folders tree and Notes. It will be also easier to create a Note under needed Folder. A selected Folder with Tag can serve as AND condition for filter Notes.
There are also some use cases for showing notes not only direct under selected folder,but also under all nested folder. But this won't be liked by all. May be a switch on the upper panel ?

@Maboroshy

This comment has been minimized.

Contributor

Maboroshy commented Jul 1, 2016

"AND" can be good idea if it is correctly displayed by UI. Something like this:
Select folder. All tags absent from the folder are greyed out, number of notes for present tags count only notes in this folder.

That way new user will understand that tag space is the same for the whole "root" folder. It would also will be useful if drag'n'drop tagging will ever be implemented in the future.
Would also be good to have an option to hide greyed out tags for advanced users who have lot of tags and use folders to kind of sort them.

Also +1 for option about recursive note list. I wrote the same thought about tags earlier. But I have all that switches on the left panel. 😎

@pbek

This comment has been minimized.

Owner

pbek commented Jul 1, 2016

We'll see, too bad I have to throw away two thirds of what I did this week...

@pbek

This comment has been minimized.

Owner

pbek commented Jul 2, 2016

To be sure we are talking about the same thing... This is how it should look like, right?

screenshot_20160702_124154

@Maboroshy

This comment has been minimized.

Contributor

Maboroshy commented Jul 2, 2016

Folder tree should go to the top. It's there in most note apps which use folders/tags scheme. Root folder drop-down selector should logically go above folder tree.

The folder tree should be just like the tag one - no notes shown and a counter.

@Maboroshy

This comment has been minimized.

Contributor

Maboroshy commented Jul 2, 2016

It would be great if user can move the split line of this new navigation pane, like the one between note list and note header structure.

@pbek

This comment has been minimized.

Owner

pbek commented Jul 2, 2016

Folder tree should go to the top.

makes sense

Root folder drop-down selector should logically go above folder tree.

I will have to see how to do that since either tags and sub folders are optional...

@LightTemplar

This comment has been minimized.

LightTemplar commented Jul 2, 2016

I will have to see how to do that since either tags and sub folders are optional...

If Folder tree goes up, then I think, it will be ok to have the Root Selector always on top of the first column, regardless of whether it will be Folder Tree, Tags, or Notes. Since the first column depends of settings of the Root Folder.
And, since list of tags is different for each Root Folder, and could be also empty, may be let the presence of Tags be settable via Root Folder settings, as the presence of Folder Tree? Just a suggestion.

@pbek

This comment has been minimized.

Owner

pbek commented Jul 2, 2016

Tags are currently stored only in the note folder, not in each note sub folder

I don't know if it makes more sense to store a database file with tags in every note sub folder...
Any insights?

@pbek

This comment has been minimized.

Owner

pbek commented Jul 4, 2016

Scanning all files for > 1000 notes can take seconds on a spinning disk... ;)

@Maboroshy

This comment has been minimized.

Contributor

Maboroshy commented Jul 4, 2016

If we're talking about folder tree, than it would a lot lighter, since we scan only for folders.

As for the full scan, it will only take seconds on the app/script start. Also I think that 1000 notes on a spinning disk is a rare case.

I have an old machine with a spinning disk, and will run some tests if I ever implement such logic.

@pbek

This comment has been minimized.

Owner

pbek commented Jul 4, 2016

I have about 400 notes in one folder on a iMac with spinning disk and it takes like 8 seconds...
As it is currently implemented all sub folders are loaded into the in-memory note database because reloading a subfolder every time you click on a note subfolder would take too long...

@Maboroshy

This comment has been minimized.

Contributor

Maboroshy commented Jul 4, 2016

So you already have that array as a note db. Can you check inotify events agains it? Or maybe I miss something important.

@pbek

This comment has been minimized.

Owner

pbek commented Jul 4, 2016

I think that you miss that every note file has to be loaded to see if anything has changed, that takes the bulk of the time.

@Maboroshy

This comment has been minimized.

Contributor

Maboroshy commented Jul 4, 2016

Lets divide two cases:

  1. Using additional layer to reduce the number of folder tree reloads;

  2. Using additional layer for scanning every note in a folder.

  3. In this case file quantity is not the problem. There are no files in the note tree.

Once the app opens a folder, it has the list of sub-folders and files in db. So when inotify event happens, the app can check it against a db to see, if it's about some sub-folder missing in db. If event is about known sub-folder - there's no need to reload folder tree. If there's some new path unknown to db, db must be reloaded so as folder tree.

Folder scan happens anyway so there's no additional load on disk happening.

  1. Scanning every file, as you've tested, it is quite slow on hdd. But there's no need for the app to do it. File list should be enough, isn't it? And, after the list, scan file by file based on inotify events. Isn't it like the app works now?

If some someone really want to scan every note to extend the file structure to the note links structure, this guy is doomed from the very beginning... At least unless he works out some optimizations to divide scanning to slow portions, that won't spin the disk for whole 8 seconds. ;-)

Don't know, maybe I'm all wrong here. I hope it may give you some new ideas.

@pbek

This comment has been minimized.

Owner

pbek commented Jul 4, 2016

Thank you for your thoughts. But I still have to get the inotify watcher to work in any case...

@pbek

This comment has been minimized.

Owner

pbek commented Jul 5, 2016

16.07.2

  • added more features to the note sub folder tree
    • the tree decoration was removed in the note list since it should not be
      a tree any more
    • improved the column width setup of the note sub folder tree
@Maboroshy

This comment has been minimized.

Contributor

Maboroshy commented Jul 5, 2016

Tested new version, all good. Looking forward to column width sync for tag and folder trees though.

Looked for some Qt widgets for item 2 of my propositions. Found no better.

So I propose moving root selector above folder tree. That way the tree will "grow" out of it like this:

🔎 find or creat...
[ Folder name] 🔽
📕 Root
📁 Sub-folder 1
📁 Sub-folder 2

I think that root selector should be optional as it is now. The user would naturally expand his note structure in 3 stages:

  1. Single folder without sub-folders, structure pane off. I use the app that way at my job.
  2. Single folder with sub-folders, root selector off. That's what I'm going to use on my machine.
  3. Several root folders with or without sub-folders.
@LightTemplar

This comment has been minimized.

LightTemplar commented Jul 11, 2016

  1. Remember sub-folder works, but opened/closed sub-folder state doesn't get remembered.

I would like to vote extra for this

@pbek

This comment has been minimized.

Owner

pbek commented Jul 12, 2016

16.07.4

  • the expand/collapsed state in the note subfolder tree is now stored
    and will be restored when the note subfolders are loaded
@Maboroshy

This comment has been minimized.

Contributor

Maboroshy commented Jul 12, 2016

I've just tested new version. Folder tree state save works. Folder tree and tag tree columns were aligned at first and that looked neat. They were fixed width though, so there were only about five letters visible on third folder level.

I expanded some sub-folder and made some note changes. Tree reload happened and column width was now aligned to longest folder name. Changed folder, came back. Since the app now saves tree state sub-folders were expanded and column width was still fo longest folder name. Collapsed all, out, in. Wight back to default neat look again.

I've tried to rename a note with sub-folders on. Renamed "note" to "note1" - ok, "note1" to "note11" - ok, "note11" to "note" - no action, "note11" to "note111" - ok, "note111" to "note" - no action.
I opened same folder but with sub-folders off. Renaming worked correctly.
For some reason first note name is no go for renaming with sub-folders on.

@pbek

This comment has been minimized.

Owner

pbek commented Jul 12, 2016

Thank you for testing and reporting, I will take a look at that.

@pbek

This comment has been minimized.

Owner

pbek commented Jul 13, 2016

16.07.5

  • the columns in the note subfolder tree will now be resized when a folder was
    expanded or collapsed
@pbek

This comment has been minimized.

Owner

pbek commented Jul 14, 2016

16.07.6

  • renaming notes in note subfolders should now work without the "externally
    removed" error message
@pbek

This comment has been minimized.

Owner

pbek commented Jul 16, 2016

16.07.7

  • tried to fix the duplicate file and subfolder listings problem under Windows
    (for Issue #243)
  • creating a note in a note sub folder will now not trigger a full rebuild of
    the note index (for Issue #248)
    • on some occasions it only works after a first note was created after
      QOwnNotes was started
  • there now is a context menu in the note subfolder tree where you can
    (for Issue #246)
    • create new notes
    • create new subfolders
    • remove selected subfolders
    • show the subfolder in the file manager
@pbek

This comment has been minimized.

Owner

pbek commented Jul 17, 2016

16.07.8

  • you can now also create a note subfolder by typing it into the search field
    and pressing Return
  • note subfolders deeper than 2nd level can now be used
  • note subfolders can now be renamed in the note subfolder tree
  • now the root note folder cannot be removed in the note subfolder tree
  • the folders that are about to be delete when removing a note subfolder
    will now be viewed in the confirmation dialog to make it more clear what
    will happen

I will now close this issue, please create new feature requests if you are missing something

@pbek pbek modified the milestones: 1.0.4, 16.07.8 Jul 17, 2016

@pbek pbek closed this Jul 17, 2016

@pbek

This comment has been minimized.

Owner

pbek commented Jul 17, 2016

also done in 16.07.8:

  • viewing and restoring of note versions from your ownCloud server now works
    for notes in note subfolders
  • viewing trashed notes on your ownCloud server now works in note subfolders,
    as well as restoring them on your server or downloading them directly
@pbek

This comment has been minimized.

Owner

pbek commented Jul 17, 2016

There now is a new release, could you please test it and report if the new features work for you?

@msbentley

This comment has been minimized.

msbentley commented Oct 18, 2016

Is the sub-folder/tree feature merged into the main branch yet, or should I check out the above listed branch to play with it? Thanks!

@pbek

This comment has been minimized.

Owner

pbek commented Oct 18, 2016

@msbentley, it's in develop and master since July.

@msbentley

This comment has been minimized.

msbentley commented Oct 18, 2016

Great, thanks - sorry, I completely overlooked the checkbox to enable it!

@pbek

This comment has been minimized.

Owner

pbek commented Oct 18, 2016

Yes, it's off by default. ;)

@pbek

This comment has been minimized.

Owner

pbek commented Oct 18, 2016

@msbentley and greetings from Straßgang ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment