vipzhicheng / logseq-plugin-mark-map

This is a plugin for https://github.com/logseq/logseq to provide mindmap support based on https://github.com/markmap/markmap.
289 stars 7 forks source link

page history not working as expected #81

Open jaker-dotcom opened 4 months ago

jaker-dotcom commented 4 months ago

Hello there! Thanks for the plugin, I think it is promising for presenting stuff. However I found one critical thing not working and one big nuisance on my end:

  1. page links do work, but somehow the shortcut meta+[ doesn't take me back to the page before on some pages
  2. when I edit the page I have to close logseq and open it again for the markmap to refresh
  3. also it would be nice to be able to change shortcuts, as I'd rather have the function of b on , so to have focus parent / child on adjacent keys , & .

In this issue I'll describe the first one.

Steps to reproduce:

  1. open logseq
  2. from journal go to a page (in my case "Econometrics")
  3. From there to the page of a book (in my case "StockWatson")
  4. enter markmap
  5. click a link in markmap, e.g. "Central Limit Theorem"
  6. now try to get back either via shortcut or clicking in the menu

Result: First time nothing happens, second time I try, I am on the markmap of Econometrics, instead of StockWatson (i.e. two pages back in history).

Note that on other pages it works flawlessly. On the Stockwatson page I make extensive use of latex and anki cards (via a logseq2anki plugin) and some block references. Maybe one of those interferes?

vipzhicheng commented 3 months ago

I've tried the steps you provided, but I can not reproduce the issue. I use Logseq API to do the page jump. So I guess even I can reproduce the issue I can not nothing about it.

And No. 3 It's feasible to make shortcuts configurable, but it means amounts of work. I'm not sure I have enough time to do this. Maybe I will make the improvements in the future.

jaker-dotcom commented 3 months ago

Mhm. It still does not work with this particular page. I just noticed, that StockWatson is an alias, which I rarely use. Maybe it's because of that. I removed it. Now somehow the page Econometrics is wrongly displayed like this, even after restart

                         ------- Econometrics (name of page itself) ----- here follow all blocks exept notes

(empty node) ------- Notes (last block on page)

Clicking on [[Stock Watson: full book title]] when on the markmap of Econometrics won't do anything

I also notice that after having another page X opened in markmap, then clicking markmap on the StockWatson page will render the previous page. However if opening X and then Y, Y is properly displayed.

So still would conclude it must be something specific to that book's page, but it should not be the alias anymore.

Randomly picked another page, that has similar content from statistics and it works fine. Thus I can rule out:

The only difference I currently can discern between the two pages is a link to a pdf on the Stockwatson page, a block embed and the anki-related tag "card-group" and the block property "replacecloze". (here replacecloze:: "/(?<!\\hat)\\beta_1/g").

If you are interested, I could share the page's content privately. Or remove the block embed and asset link and try one more time. Otherwise I would let it rest now and hope it's just with that specific page.

vipzhicheng commented 3 months ago

I suggest you build a demo content that can reproduce the issue, then I can dig into it.