SkepticMystic / breadcrumbs

Add typed-links to your Obsidian notes
https://publish.obsidian.md/breadcrumbs-docs
MIT License
506 stars 35 forks source link

FR: Option to truncate long Trail View paths #389

Open laurastephsmith opened 2 years ago

laurastephsmith commented 2 years ago

I'd like to be able to toggle between a full trail view and a summary trail view, using hotkeys. I would like the current view to be persistent when navigating between notes.

Use case

I use breadcrumbs to display the taxonomy of organisms. In many cases this can be 22 levels deep! As you can see for the example subspecies of daffodil below:

Screenshot from 2022-04-29 11-25-34

For most of my studying, that level of detail is unnecessary, and in fact makes it harder to see the overall picture that I want to see.

Describe the solution you'd like

I'd like to be able to use a YAML field in notes that are to be removed from the summary trail view. Perhaps something like BC-hierarchy: optional. I think approaching it that way around is best, so that if I forget to add the field in, it will default to being shown in both the full and summary views.

A summary view of the daffodil above might look something like this: Life -> Eukaryota (Eukaryotes) -> ... -> Chloroplastida (Green Algae & Land Plants) -> ... -> Embryophyta (Land Plants) -> Tracheophyta (Vascular Plants) -> ... -> Spermatophyta (Seed Plants) -> Angiosperms (Flowering Plants) -> ... -> Monocots -> Asparagales -> Amaryllidaceae (Amaryllis Family) -> ... -> Narcissus -> ... -> Narcissus psuedonarcissus (Wild Daffodil) It's essential to be able to see where levels have been skipped over. I've used ellipses between arrows here, copying UniEuk:

Screenshot from 2022-04-29 11-58-46

However you may have a better suggestion for how to indicate where levels have been summarised. If you went down the ellipsis route, a nice added feature would be to be able to click on the ellipsis to show the full trail view. I think that would make for intuitive UX.

Describe alternatives you've considered

Currently I'm using a hacky solution. I've created a note that really shouldn't exist, called (... Chloroplastida ...) and set that as a second parent to the note below it. This produces a second, shorter, route up the tree. This can be toggled with the shortest//longest/all button:

Screenshot from 2022-04-29 11-28-49

I can't however use this hack at more than one point in a given route up the tree: creating a second (... Whatever ...) note in the same path produces four permutations. A third one of the same produces chaos!

Additional context

See conversation on Discord.

SkepticMystic commented 6 months ago

This is a really interesting idea! I'll think about how to implement and possibly add it in