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

Document Display Order in the Dendron Tree View #440

Closed
micharris42 opened this issue Jan 3, 2021 · 13 comments
Closed

Document Display Order in the Dendron Tree View #440

micharris42 opened this issue Jan 3, 2021 · 13 comments
Assignees
Labels
area.workbench size.mid status.info-needed More information is needed from filer for issue to be actionable type.enhancement Extension to a previously shipped feature. Minor functionality update.

Comments

@micharris42
Copy link

Describe the bug
In the Dendron Tree View, documents are displayed in order of creation, not by the document title or by the content of the frontmatter. This is especially noticeable for journal notes. If a set of journal notes are created out of chronological order, they will show up in the Dendron Tree View in the order of their creation, rather then ordered by date. Amending the "created" field in the frontmatter has no effect.

To Reproduce
Steps to reproduce the behavior:

  1. Create a journal note.
  2. Create a second journal note for an earlier date.
  3. The second note will be displayed below the first note, despite that it is for an earlier date in time.

Expected behavior
That documents be displayed in the Dendron Tree View ordered by either the document title or the content of the frontmatter, not by date of creation. If this is the intended behavior, that there be an option to sort the content of the Dendron Tree View.

Screenshots
Capture

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: NA
  • Version: Dendron 0.22.0

Additional context
I apologize if this has already been addressed in an earlier issue. However, after going through the Dendron documentation and the issues already on GitHub, I was unable to find a solution. Any suggestions would be appreciated. Thank you.

@ghost
Copy link

ghost commented Jan 3, 2021

I think a setting for the sort order would be preferable.

I personaly would like to have my notes sorted alphabetical.

But journal notes in a way that the journal entry for the newest day is displayed first.

Which is opinionated others may want to have the inverse from what I want so I think a setting would be the best choice.

@kevinslin kevinslin added type.enhancement Extension to a previously shipped feature. Minor functionality update. area.workbench size.mid labels Jan 4, 2021
@kevinslin
Copy link
Member

Thanks for the issue and you're the first one to bring it up so we're good. Formally including this in our backlog

@micharris42 micharris42 mentioned this issue Apr 3, 2021
8 tasks
@aleksey-rowan
Copy link
Contributor

Many note-taking apps allow for manual sorting of notes/containers and often don't have functionality for auto-sorting. I would prefer my notes auto-sorted by metadata title with an option to manually adjust their positions if needed. There could be an additional metadata property (sort-title for example) to override the actual title for sorting purposes, like when sorting books or movies, so all books that start with "the" don't get grouped together.

@kevinslin
Copy link
Member

an update on the tree view. we're planning on creating a dedicated dendron panel using a custom webview to accommodate custom ordering as well as additional functionality (eg. drag and drop assets). this will most likely be an end of april to may item but in the meanwhile, we're going to create an index command to help people create index notes. See #603 for more details and please let me know if you have any suggestions :)

@af4jm
Copy link

af4jm commented May 5, 2021

hmm, I haven't noticed journals sorting by creation, but I have seen all-numeric entries sorting alphabetically
image

the other thing I could see making perfect sense is to use the nav_order field in front matter, if it exists

so it could either be a setting, or it could be nav_order for notes that have them, otherwise numeric if applicable, otherwise alpha

if you go the setting route, it could get wonky depending on where the setting goes... e.g. would there be a default in VSCode settings (or dendron.yml)? could you override it with a setting in the parent note's front matter?

or is my developer propeller-hat trying to turn a small problem with a simple solution into something much more complicated than it needs to be?

@micharris42
Copy link
Author

Small update to this issue, as it has gotten bumped today:

I recently did a bit of experimenting with Dendron that did not pan out, and it was easier just to replace my vault with an earlier backup.

Upon reopening my Dendron workspace, I found the Tree View was now sorted alphanumerically, with the exception that existing hierarchical notes were placed above the non-existent notes (the placeholders marked with +). This was the first time I had replaced my vault in such a fashion, so I can not determine whether this is new behavior.

My takeaway, is that I now have no idea how Dendron chooses to organize the hierarchy in the Tree View. It seems to use alphanumeric ... except for when it chooses not to.

Not sure how helpful this is to include, but this is how my user experience with the Tree View has gone.

@kevinslin
Copy link
Member

kevinslin commented May 6, 2021 via email

@Bassmann
Copy link

Is there any update on the sort order topic? For me the treeview still shows a random unsorted order and I really look forward to finding my notes in the treeview. As it is now it seems somewhat useless (at least for my workflow).

@SeriousBug SeriousBug self-assigned this Sep 22, 2021
@kevinslin
Copy link
Member

Hey @Bassmann can you let us know if this is still an issue for you? If so, do you have a screenshot of what the out of order tree view looks like?

@Bassmann
Copy link

Bassmann commented Sep 22, 2021 via email

SeriousBug added a commit that referenced this issue Oct 3, 2021
Made next-server use the common frontend's tree sorting code,
and replaced that code to be a little simpler.

#440
kevinslin pushed a commit that referenced this issue Oct 7, 2021
* fix: tree view order

Made next-server use the common frontend's tree sorting code,
and replaced that code to be a little simpler.

#440

* chore: add tree-view test
@hrmnjt
Copy link

hrmnjt commented Dec 2, 2021

Hi team. As I'm checking now, nav_order affects the publishing order but not the index in tree view. Is this intended behavior? It would make sense for me to use nav_order in tree view index as well!

@SeriousBug
Copy link
Contributor

Hi. I believe this issue has been fixed with the latest Dendron, the tree now follows alphanumeric order. Please let us know if you still experience this issue, otherwise it will close in a few days.

@SeriousBug SeriousBug added the status.info-needed More information is needed from filer for issue to be actionable label Dec 29, 2021
@Bassmann
Copy link

Bassmann commented Dec 29, 2021

For my needs it works indeed already quite some time so it can be closed. Sorry for not responding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area.workbench size.mid status.info-needed More information is needed from filer for issue to be actionable type.enhancement Extension to a previously shipped feature. Minor functionality update.
Projects
None yet
Development

No branches or pull requests

7 participants