dendronhq / dendron

The personal knowledge management (PKM) tool that grows as you do!
https://wiki.dendron.so
Apache License 2.0
6.68k stars 252 forks source link

Markdown preview doesn't update for non-dendron managed markdown files #3750

Open d1onys1us opened 1 year ago

d1onys1us commented 1 year ago

Please select the area your bug applies to. (Multiple selections are Possible. You can leave blank if you're not sure.)

Describe the bug

If you open a regular markdown file in vs code which is not managed by dendron, live update does not work.

This is high priority because it means that I cannot at the moment recommend a Dendron installation for my team as it would break their preview for whatever other workflow they might have.

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information)

Additional context

Add any other context about the problem here.

Dendron Log file

Please attach the output of > Dendron:Dev: Open Logs here

jonathanyeung commented 1 year ago

@d1onys1us - Would an acceptable mitigation be to use regular VS Code preview for non-Dendron notes?

If it's a non-dendron note, then the benefits of Dendron's preview largely wouldn't apply - i.e. note refs, backlinks, children, etc.


@Dendron Dev - to fix this, instead of modifying existing preview logic in plugin/plugin-views, we should switch to using the render methodology in Dendron-Web where the HTML is generated on the extension side and sent to the web view.

d1onys1us commented 1 year ago

@d1onys1us - Would an acceptable mitigation be to use regular VS Code preview for non-Dendron notes?

If it's a non-dendron note, then the benefits of Dendron's preview largely wouldn't apply - i.e. note refs, backlinks, children, etc.

@dendron Dev - to fix this, instead of modifying existing preview logic in plugin/plugin-views, we should switch to using the render methodology in Dendron-Web where the HTML is generated on the extension side and sent to the web view.

hey @jonathanyeung , that would be an acceptable resolution and makes sense. I actually believe it is preferred -- we shouldn't invade on other people's markdown experience if they are not using dendron. They might only be using dendron for some other project.

d1onys1us commented 1 year ago

a quick update cc @jonathanyeung

image

i noticed that in the vs code web view, i am also getting double preview buttons. in this repo, i have dendron inside of a folder ./handbook and at the root, i have a non dendron managed file ./README.md. i might change this later on, but this is the workflow which introduced a "bug". hope it helps :) thanks

d1onys1us commented 1 year ago

this might be outside of scope of this issue, if it is, let's open another issue. i can help with that, just let me know.

image

i noticed that the theme is not carrying over with the dendron preview.

d1onys1us commented 1 year ago

fyi i have needed to uninstall dendron for time being because this is a blocker / breaks my other markdown files editing experience

jonathanyeung commented 1 year ago

@d1onys1us - you can still use VSCode's build-in preview markdown experience alongside Dendron's:

Was this the blocking aspect or was it something else?

image
d1onys1us commented 1 year ago

yes i can do that as well but it changes the user experience a bit, have to context switch between two markdown previews now

d1onys1us commented 1 year ago

hi @jonathanyeung i still think this is quite a blocker for me and it's degrading my DX. because i usually just click the native preview button, instead of using the command palette. so i have to either use command palette or uninstall dendron to get updates on preview to work properly.