Thanks to visit codestin.com
Credit goes to github.com

Skip to content

GopherJS Playground 2.0 #1158

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

Open
nevkontakte opened this issue Sep 24, 2022 · 0 comments
Open

GopherJS Playground 2.0 #1158

nevkontakte opened this issue Sep 24, 2022 · 0 comments
Labels
enhancement NeedsHelp Community contributions are welcome for this feature!

Comments

@nevkontakte
Copy link
Member

nevkontakte commented Sep 24, 2022

The GopherJS playground has been doing its job very well, but I think it may be time to give it an overhaul. Here is a list of improvements I would like to make (in no particular order):

  • Migrate to a modern frontend framework. Currently we are using some ancient version of AngularJS is no longer supported. In my experiments, vecty mostly works with GopherJS even though it no longer supports it officially. vugu or go-app might be another interesting option.
  • Make it possible to show generated JavaScript code for the main package. This is something our users have requested in the feedback survey, and I also wished for it on multiple occasions.
  • Implement "advanced" codepen-style mode, which allows the user to provide HTML and CSS, and have results executed in an iframe sandbox.
  • Use play.golang.org 1 instead of https://snippets.gopherjs.org to save snippets. I believe the latter is still being maintained by @dmitshur, and potentially he wouldn't have to keep doing it indefinitely. But what is even more appealing to me is that it would make the two playgrounds more interoperable: you would be able to open the same snippet with the same ID in either gopherjs or the official playground and compare behavior.
  • Use better code editor, which supports automatic indentation and maybe even syntax highlighting.

I think this would be a great contribution for someone new to the project, since it doesn't require getting far in the weeds of the compiler, but does give an opportunity to touch the internals a little bit.

Footnotes

  1. Snippets can be saved by POST'ing its text to https://play.golang.org/share, which will return snippet ID. Given the ID, the snippet can be read by GET'ing https://play.golang.org/p/${id}.go. Both endpooints allow cross-origin requests, so they would work find on our playgound.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement NeedsHelp Community contributions are welcome for this feature!
Projects
None yet
Development

No branches or pull requests

1 participant