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

Everything breaks when using markdown preview #986

Closed
Rokainu-Codes opened this issue Jul 28, 2024 · 3 comments · Fixed by #989
Closed

Everything breaks when using markdown preview #986

Rokainu-Codes opened this issue Jul 28, 2024 · 3 comments · Fixed by #989

Comments

@Rokainu-Codes
Copy link

When trying to use the markdown preview command either in my own silverbullet instance or on silverbullet.md the title shifts, no markdown is shown and the following error pops up in the console:
image

Afterward the page picker and command palette do not seem to respond anymore either until reloading or deleting cookies.

@joekrill
Copy link
Contributor

I think this is what is also the cause of a similar error with the Tree View plug in the latest release. I think it's being caused by the useRef call on the first line of the Panel component. So effectively anything that calls showPanel is likely affected.

I've been trying to narrow down the underlying cause but haven't found anything concrete yet, but I think it is related to upgrading the Preact version: It was upgraded dependency upgrades in the latest release, an if I downgrade Preact back to v10.11.1 things seem to work again.

There's this issue that might be a clue? So perhaps esbuild is causing a problem here?

@joekrill
Copy link
Contributor

Ah just figured it out: the import statement in panel.tsx is importing from Preact v0.11.1 causing multiple copies of preact to be used. Easy fix - I'll put up a PR for it in a minute.

@zefhemel
Copy link
Collaborator

Ok. I'll probably another bug fix release soon, but it should be live on the edge builds soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants