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

(Bug Report) Tree Map: Cloned Notes Do Not Show Up In Destination Branch #3547

Open
nekrondev opened this issue Jan 20, 2023 · 3 comments
Open

Comments

@nekrondev
Copy link

Trilium Version

0.58.7

What operating system are you using?

Other Linux

What is your setup?

Server access only

Operating System Version

Ubuntu 21.04 LTS

Description

I've been starting to use Trilium to take my first notes and run into an issue when displaying cloned notes as tree map graph.
E.g. in the demo data a book review was cloned from the journal folder Trilium Demo -> Journal -> 2021 -> 12 - December -> 22 - Friday -> The Mechanical into Trilium Demo -> Books -> Reviews -> The Mechanical. Now if I like to display my notes structure as a tree on the destination branch, the cloned review note from the day journal does not show up in the dependency graph.

I would expect that a vertex between Reviews and The Mechanial would be created, but the cloned note's node is missing.

see here:
image

On the other hand if I look at the notes origin tree map shows the note as expected.

image

Working with cloned notes after putting them from journal origin into destination branch breaks visualization of nested cloned notes as the dependency graph is no longer valid.

Error logs

No response

@nekrondev nekrondev changed the title Tree Map: Cloned Notes Do Not Show Up In Destination Branch (Bug Report) Tree Map: Cloned Notes Do Not Show Up In Destination Branch Jan 20, 2023
@nekrondev
Copy link
Author

nekrondev commented Jan 20, 2023

Ok, it looks like #excludeFromNoteMap(inheritable) causes this behaviour as the cloned note in the destination branch uses this attribute from the journal branch. However if I display the journal tree map (which include the inherited attribute) the dependency graph shows all nodes which shouldn't be okay given the fact that the exclude attribute had been inherited to the child nodes.

From the patterns of patterns hints ...

Day note serves as a workspace and note inbox at the same time - it's the default location to create a note when I don't have time to think about proper placement. At the end of the day I typically review my day note and clone the notes into suitable locations in the hierarchy.

... to have this pattern working with tree maps one must remove the #excludeFromNoteMap(inheritable) attribute, but on the flip side clutters global tree map with daily journaling nodes.

So I guess this is more of a how to overwrite or remove inherited attributes on a cloned note in a different brach type of question.

@zadam
Copy link
Owner

zadam commented Jan 21, 2023

However if I display the journal tree map (which include the inherited attribute) the dependency graph shows all nodes which shouldn't be okay given the fact that the exclude attribute had been inherited to the child nodes.

This is intentional. I mean, what should the Tree Map show in that case? Probably nothing since all its notes get the #excludeFromNoteMap label, but showing nothing is not really useful for anything.

So the logic is that when you open the Tree Map on the notes which are themselves excluded, we ignore the #excludeFromNoteMap label.

So I guess this is more of a how to overwrite or remove inherited attributes on a cloned note in a different brach type of question.

That's not possible, but I agree that the behavior you demonstrated with Journal tree is not good.

I think a middle ground is to remove the inheritable #excludeFromNoteMap from journal root and put them (as not inheritable) to the day template:

image

This will apply the label on all day notes, but #excludeFromNoteMap is not inheritable so won't apply to the descendants of day notes.

You will still have year/month notes cluttering, but there's much fewer of them so it's not such a big problem. (You can also bulk-add this non-inheritable label to them if needed).

I will probably change this in the demo document accordingly.

@nekrondev
Copy link
Author

Thanks for the sugfgestions! I also thought about custom year/month/day templates including the #excludeFromNoteMap attribute so this could be another solution to remove the clutter. Doing this will fit for my workflow creating day notes and cloning them into proper places where they belong to.

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

No branches or pull requests

2 participants