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

Filter notes from sub folders according to tags when in the parent-folder #884

Closed
michaelpierrelee opened this Issue Apr 4, 2018 · 17 comments

Comments

Projects
None yet
3 participants
@michaelpierrelee

michaelpierrelee commented Apr 4, 2018

Hi everyone,
I'm using QOwnNotes and that's very good for my work, compared to other note managers. Nevertheless, it lacks -or I didn't find yet- a feature to help to manage the notes by folders AND by tags, because I have a lot of them.

Let's the tree:

-parent folder (A)
--child folder (A1)
---note N1 with tag X
---note N2 with tag Y
--child folder (A2)
---note N3 with tag X
---note N4 with tag Z
---note N5 without tag

Expected behaviour

If I am in the folder A with a filtering according to the tag X, I would like to see N1 and N3 in the panel listing the notes in the folder.
And if I am in the folder A without any filtering, I would like to see all the notes (N1 to N5) as now.

Moreover, when I am in the folder A1, it will be very helpful to display only the tags X and Y, and not Z, in the panel of tag list.

Actual behaviour

If I am in the folder A with a filtering according to the tag X, I see no notes (because the program don't take into account the notes in the sub folders).
But without filtering by tag, I see all the notes.

If I'm in the folder A1, I see all the tags (X, Y, Z) in the tag list panel.

Thanks a lot in advance!

@pbek pbek added the question label Apr 4, 2018

@pbek

This comment has been minimized.

Owner

pbek commented Apr 4, 2018

Currently when you select a sub-folder and a tag you can only see the notes in that sub-folder, that has that assigned that tag.

I'm not sure I understand your explanation what you would like to see. :)

Moreover, when I am in the folder A1, it will be very helpful to display only the tags X and Y, and not Z, in the panel of tag list.

it would be very whacky to detect with certainty what selection came first... the tag-selection or the folder-selection, because there are a lot of factors that play a role

@michaelpierrelee

This comment has been minimized.

michaelpierrelee commented Apr 4, 2018

Thanks for your answer.

Currently when you select a sub-folder [A] and a tag [X] you can only see the notes in that sub-folder, that has that assigned that tag.

Yes, but in my example, the parent folder A has itself no notes, but the sub folders yes. Thus I would like to have recursively all the notes with this tag in the current folder and in all the sub-folders. If I didn't want this behavior, I would not create A1 and A2.

I'm using the program to take notes on scientific papers and I am using folders to sort by domains and tags to sort by topics. (A domain can be a technology -this is absolute- while topics are more flexible. It's consistent with the design of QOwnNotes.) So I want all the notes related to one topic regardless on the domain.

That's an example where recursion is needed, but generally, it's more natural according to the design of the program. Indeed, why does it recursively display all the notes when I am in A but nothing when I select also a tag? It's more like a "bug" for me.

Moreover, when I am in the folder A1, it will be very helpful to display only the tags X and Y, and not Z, in the panel of tag list.

It's in fact a second and independent feature from the first above.
To be more understandable, I meant that the tag list in the panel "tags" is here X, Y and Z. But who cares about Z when I'm in the folder A1? I would like to have only X and Y. In this example, it's not a problem because I have 3 elements, however with 100 tags, the tag list is too big to be readable.

I hope you will take these comments into account! My main problem is the note management.

@pbek

This comment has been minimized.

Owner

pbek commented Apr 4, 2018

Thus I would like to have recursively all the notes with this tag in the current folder and in all the sub-folders.

Maybe the Panels settings can help you.

Indeed, why does it recursively display all the notes when I am in A but nothing when I select also a tag? It's more like a "bug" for me.

I don't know how you have configured QOwnNotes...

But who cares about Z when I'm in the folder A1?

Other users would want it the other way around and just show subfolders for a selected tag. It would be really hard to implement such a thing without a lot of sideeffects...

@michaelpierrelee

This comment has been minimized.

michaelpierrelee commented Apr 4, 2018

Maybe the Panels settings can help you.

What option?

I don't know how you have configured QOwnNotes...

What do you need?

Other users would want it the other way around and just show subfolders for a selected tag. It would be really hard to implement such a thing without a lot of sideeffects...

I just say what I would like. You can put an option in the settings if you think the current way is necessary in some cases.

@pbek

This comment has been minimized.

Owner

pbek commented Apr 4, 2018

What option?

the first few

I just say what I would like. You can put an option in the settings if you think the current way is necessary in some cases.

It would be still a huge amount of work with lots of regressions.

Why don't you just use different note folders instead of note subfolder, then you have complete different tags for different note folders?

@cal2195

This comment has been minimized.

Contributor

cal2195 commented Jun 6, 2018

Would it be possible to have it only show notes in the current selected subfolder AND selected tag, even if all tags are displayed?

It would mean I could select a parent folder, and show all files with the tag "todo" in all subfolders for example! :)

@pbek

This comment has been minimized.

Owner

pbek commented Jun 6, 2018

@cal2195, there are some settings in the Panel settings that my help you.

@cal2195

This comment has been minimized.

Contributor

cal2195 commented Jun 6, 2018

@pbek Thanks for the quick reply! :)

I've had a look there, and while I can show all notes from subfolders, I can't then use the tags to filter it further? In order to use the tags, I need to be in the subfolder the note is contained in.

Am I missing something?

@pbek

This comment has been minimized.

Owner

pbek commented Jun 6, 2018

I see, tags only work on one sub-folder at the moment.

@cal2195

This comment has been minimized.

Contributor

cal2195 commented Jun 6, 2018

I don't mind that all subfolders and tags are listed, it would just be very useful to be able to filter by both at the same time! :)

If you could point me to the right location, I wouldn't mind seeing if I could implement it!

@pbek

This comment has been minimized.

Owner

pbek commented Jun 6, 2018

search for MainWindow::filterNotesByTag(), happy coding (and hopefully "regression preventing") 👍

@cal2195

This comment has been minimized.

Contributor

cal2195 commented Jun 6, 2018

I've managed to get the filtering working well - looks like it was nearly there, just overlooked! :)

But I have a problem now, as the note tag count is still only per subfolder, and it's tricky to change at the moment, as the query is looking for note_sub_folder_id instead of a path..

Any ideas?

@pbek pbek added enhancement and removed question labels Jun 12, 2018

@pbek

This comment has been minimized.

Owner

pbek commented Jun 12, 2018

I took in your pull request #932, @cal2195

pbek added a commit that referenced this issue Jun 12, 2018

@pbek

This comment has been minimized.

Owner

pbek commented Jun 12, 2018

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

@cal2195

This comment has been minimized.

Contributor

cal2195 commented Jun 12, 2018

@cal2195

This comment has been minimized.

Contributor

cal2195 commented Jun 13, 2018

Working well for me here! 😄

@pbek

This comment has been minimized.

Owner

pbek commented Jun 13, 2018

Ok, great. Thank you for testing. Keeping my fingers crossed that there are no side-effects with the myriads of settings. ;)

@pbek pbek closed this Jun 13, 2018

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