Skip to content

Conversation

baseballyama
Copy link
Member

@baseballyama baseballyama commented Jun 29, 2024

I added modernAst option for REPL.
Sometimes I need to use this now, so this is convenient at least for me.

image

Simple demo:

Screen.Recording.2024-06-29.at.14.26.09-1.mov

Svelte 5 rewrite

Please note that the Svelte codebase is currently being rewritten for Svelte 5. Changes should target Svelte 5, which lives on the default branch (main).

If your PR concerns Svelte 4 (including updates to svelte.dev.docs), please ensure the base branch is svelte-4 and not main.

Before submitting the PR, please make sure you do the following

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • Prefix your PR title with feat:, fix:, chore:, or docs:.
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests and linting

  • Run the tests with pnpm test and lint the project with pnpm lint

Copy link

changeset-bot bot commented Jun 29, 2024

⚠️ No Changeset found

Latest commit: a979152

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

@Rich-Harris
Copy link
Member

Thank you — agree this would be useful, but UI-wise it really belongs on the 'AST Output' tab rather than 'JS Output' (and in both cases, the draggable pane divider makes no real sense; it should be either visible or not). And ideally it would preserve the expanded/collapsed state when toggling.

The big wrinkle is that all this code is currently being rewritten for the new site, and work done here will have to be redone (but against a subtly different codebase) on the other side. So my inclination is to hold off on this for the time being.

@baseballyama
Copy link
Member Author

Yes, we can optimize the UI for the new site.

IMO, Regarding “compiler options,” it would be better if the settings were not spread across several tabs. When users want to change behavior, they need to modify the compiler options in their actual code. It would be good if the REPL had the same structure. It might be better to have a configuration area/tab, similar to the Rollup REPL.

@Rich-Harris
Copy link
Member

I'm not sure that's really what people want from this — in the playground, they want to see the effect of those changes, in order to understand the difference between SSR and CSR, or prod mode and dev mode. That only works if the options are visible at the same time as the output.

Also, the compiler options only affect the JS Output and AST Output tabs, not the code that's actually bundled and executed in the iframe, and scoping the UI appropriately helps avoid confusion there.

@Rich-Harris
Copy link
Member

I opened an issue on the omnisite repo so that we don't lose sight of this, but for now I'll close this — thanks

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