Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Persist webview preview through vscode restarts #300

Merged
merged 6 commits into from
Jun 23, 2024
Merged

Persist webview preview through vscode restarts #300

merged 6 commits into from
Jun 23, 2024

Conversation

noamzaks
Copy link
Contributor

Hello!

This is a small PR implementing the serialization feature which lets the webviews persist over VSCode restarts :)

To see its effect, try opening up a Typst Preview inside VSCode, then run the "Developer: Reload Window" command or close and open VSCode. Before this PR, the Typst Preview would cease to exist. After it, it should re-load.

@Enter-tainer
Copy link
Owner

looks cool! i will test this when i leave work

Copy link
Owner

@Enter-tainer Enter-tainer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @Myriad-Dreamin PTAL

addons/frontend/index.html Outdated Show resolved Hide resolved
Copy link
Collaborator

@Myriad-Dreamin Myriad-Dreamin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see how it works: you launch preview in the deserialization again. This is pretty awesome!

addons/frontend/index.html Outdated Show resolved Hide resolved
addons/vscode/src/extension.ts Outdated Show resolved Hide resolved
@noamzaks
Copy link
Contributor Author

Thanks for the feedback! I think I fixed everything.
Regarding passing arguments to the frontend, VSCode supports "message-sending" I think, but the other editors may not

@Myriad-Dreamin
Copy link
Collaborator

LGTM

Copy link
Owner

@Enter-tainer Enter-tainer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generally LGTM. BTW we are integrating typst-preview into tinymist (see Myriad-Dreamin/tinymist#323). So this patch will be cherrypicked to tinymist after it got merged

addons/frontend/index.html Outdated Show resolved Hide resolved
addons/vscode/src/extension.ts Outdated Show resolved Hide resolved
@noamzaks
Copy link
Contributor Author

Should I move this PR to Tinymist?

@Enter-tainer
Copy link
Owner

This fix #153

@Enter-tainer
Copy link
Owner

Should I move this PR to Tinymist?

It's not necessary. We will do it. But it's good to send following PR(if there is any) to tinymist.

@Enter-tainer Enter-tainer enabled auto-merge (squash) June 23, 2024 14:22
@Enter-tainer
Copy link
Owner

Thank you!

@Enter-tainer Enter-tainer merged commit 2076b05 into Enter-tainer:main Jun 23, 2024
9 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants