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

feat: rewrite VSCode extension #1557

Merged
merged 60 commits into from
May 10, 2024
Merged

Conversation

kermanx
Copy link
Member

@kermanx kermanx commented Apr 28, 2024

This PR rewrites the original VSCode extension using @vue/runtime-core for state management.

Features

  • Multiple project support
  • Multiple markdown support (slides imported by src: option)
  • Drag and drop slides in the slides tree
  • Better preview experience
  • Compat mode for @slidev/cli older than this PR
  • Everything is reactive, even configuration
  • ... (some UX details)

Todos

  • Version & publish scripts
  • Improve stability for sync between slides tree, preview webview and cursor position
  • Whatever I have tried, tsup always bundles vue.runtime-core.prod.cjs instead of .bundler.js
  • Docs
  • Preview panel
  • Multiple entry support
  • Icon looks a little bit small

Notes

How to debug?

  1. pnpm dev on monorepo root.
  2. Press F5 in VSCode to launch the extension development host.

image

Copy link

netlify bot commented Apr 28, 2024

Deploy Preview for slidev ready!

Name Link
🔨 Latest commit 98c31f5
🔍 Latest deploy log https://app.netlify.com/sites/slidev/deploys/663e31245bffba0008f64ede
😎 Deploy Preview https://deploy-preview-1557--slidev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@kermanx kermanx mentioned this pull request Apr 28, 2024
@antfu
Copy link
Member

antfu commented May 2, 2024

The versioning would be a little bit tricky as VS Code Marketplace does not support -beta.x suffix in the version. I am still not sure what would be the best way to have VS Code extension inside a single-versioned monorepo

@kermanx
Copy link
Member Author

kermanx commented May 2, 2024

The versioning would be a little bit tricky as VS Code Marketplace does not support -beta.x suffix in the version. I am still not sure what would be the best way to have VS Code extension inside a single-versioned monorepo

The problem of placing VSCode extension in another repo is that @slidev/parser is often updated when implementing a new feature in VSCode extension.

Could we modify the script and CI to manage VSCode extension's version and publish it separately?

@antfu
Copy link
Member

antfu commented May 2, 2024

Could we modify the script and CI to manage VSCode extension's version and publish it separately?

Sure we could. Than maybe we share with the same minor version, where patch versions are decoupled. In this way we could do 0.59.0 for the first version (so no beta).

@kermanx
Copy link
Member Author

kermanx commented May 2, 2024

Could we modify the script and CI to manage VSCode extension's version and publish it separately?

Sure we could. Than maybe we share with the same minor version, where patch versions are decoupled. In this way we could do 0.59.0 for the first version (so no beta).

Maybe we even needn't to make any connection between Slidev's main version with VSCode extension's. This is because VSCode extension doesn't use NPM to get dependencies - all dependencies are bundled when publishing. And when main version's minor part updates but extension doesn't have any updates, users may not want to receive an update of extension.

@kermanx kermanx marked this pull request as ready for review May 9, 2024 15:57
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 this pull request may close these issues.

2 participants