SkepticMystic / breadcrumbs

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

Bug: v4: Codeblocks don't update correctly in editing view #506

Closed soulsynapse closed 7 months ago

soulsynapse commented 8 months ago

Describe the bug If you use codeblock, navigate away, then navigate back, the codeblock will be for the previous page you navigated to.

Desktop, v. 4.0.15-beta

To Reproduce

  1. Make a codeblock like this in editing mode:
    type: tree
    dir: down
  2. Click a link on one of the links in the codeblock
  3. Click back
  4. Codeblock will have the tree for the previous page

Expected behavior Should have the tree for the current page

Screenshots n/a

Desktop (please complete the following information):

Smartphone (please complete the following information): n/a

Additional context Is there another way to have an updated breadcrumb list?

soulsynapse commented 8 months ago

Looks like this is how dataview does it, making an editor extension

https://github.com/blacksmithgu/obsidian-dataview/blob/e4a6cab97b628deb22d36b73ce912abca541ad42/src/main.ts#L183

https://github.com/blacksmithgu/obsidian-dataview/blob/e4a6cab97b628deb22d36b73ce912abca541ad42/src/ui/render.ts

some background

https://forum.obsidian.md/t/registermarkdownpostprocessor-callback-not-called-with-live-preview-mode/56049/2

I'm bad at programming

SkepticMystic commented 8 months ago

Thank you for the issue and links :)

soulsynapse commented 8 months ago

Here's a work-around for this:

I have it set to a stylized header on my Breadcrumbs note so I can just embed the list in the floating callout.

Still working on formatting, but it works pretty well. Bonus: if I want to change it across all my notes, I only have to update it in one place.

image