language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

[WIP] Add command to open dev server in a side panel

Open Princesseuh opened this issue 2 years ago • 1 comments

Changes

This adds a command to open the currently running dev server / a new one if there's none in a side panel in the editor. This is powered by VS Code's simple-browser (HMR is supported, clicking between the pages work etc). It loads the user's config using Proload to get the user's specified port if there's any

Some users were actually already doing this by using VS Code's Simple Browser command, however they had to start the dev server separately and type in the address manually

image

Testing

Tested manually on Windows and Linux

Our test setup for VS Code is currently not setup in a way that allows this to be tested as it doesn't load a project. Additionally, in a lot of way it would feel like testing things outside our world (is Proload loading the config? Does VS Code's browser work?)

Docs

No docs needed (added commands are documented in the "Feature contributions" tab on the extension page inside VS Code automatically)

Princesseuh avatar May 24 '22 17:05 Princesseuh

⚠️ No Changeset found

Latest commit: 686357d84b081f887af72f04f52029c2dcda9590

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar May 24 '22 17:05 changeset-bot[bot]

Closing due to inactivity, the code ended up being weirdly complicated anyway. Astro does not use proload anymore to load the Astro config either, so maybe we need to find another solution (could be great if Astro itself gave the port to us)

Princesseuh avatar Apr 14 '23 14:04 Princesseuh