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

playground: click on AST to view the corresponding code #30

Open
heygsc opened this issue Aug 28, 2024 · 7 comments
Open

playground: click on AST to view the corresponding code #30

heygsc opened this issue Aug 28, 2024 · 7 comments
Labels
good first issue Good for newcomers

Comments

@heygsc
Copy link

heygsc commented Aug 28, 2024

In the previous playground, clicking on 'ast' could find the corresponding code, which was very comfortable to use, but it seems that the current new playground does not have it.
image

@oxc-project oxc-project deleted a comment Aug 28, 2024
@Boshen Boshen changed the title palyground: click on AST to view the corresponding code playground: click on AST to view the corresponding code Aug 28, 2024
@Boshen Boshen added the good first issue Good for newcomers label Aug 28, 2024
@Boshen
Copy link
Member

Boshen commented Sep 2, 2024

I find monaco editor hard to work with, do you think we should restore the previous codemirror @DonIsaac @sxzz ? Monaco is also too large and slow to load.

@sxzz
Copy link
Member

sxzz commented Sep 2, 2024

For better UX, I would say it's worth it. Additionally, most of the loading time is for the wasm file.

It can be implemented. You can refer to https://ast.sxzz.moe/

@heygsc
Copy link
Author

heygsc commented Sep 2, 2024

Yes, wasm loading often takes time.

@DonIsaac
Copy link
Contributor

DonIsaac commented Sep 2, 2024

Could be worth it. I have more experience with Monaco than I do with codemirror, but if it's super problematic then we should.

What are the downsides of a switch to codemirror?

@IWANABETHATGUY
Copy link
Contributor

Maybe we could upload .wasm to cdn, just like swc playground
image

@sxzz
Copy link
Member

sxzz commented Sep 3, 2024

That's also why I suggest boshen to publish wasm to npm. We can even change the oxc version for testing regression issue.

@sxzz
Copy link
Member

sxzz commented Sep 8, 2024

Given the complexity of the feature and its completion on ast.sxzz.moe, I might extract the AST Tree Viewer as a Vue component for easy reuse in oxc.

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

No branches or pull requests

5 participants