melange-re.github.io icon indicating copy to clipboard operation
melange-re.github.io copied to clipboard

[Playground] Feature: allow to include multiple snippets under the same link

Open jchavarri opened this issue 2 years ago • 3 comments

For learning / teaching purposes, it'd be interesting to allow having a set of Melange snippets under the same playground link.

From a author point of view, I should be able to:

  • Create a new group (let's call it a "lesson")
  • Add new snippet to the lesson

From a reader point of view, I should be able to:

  • Open a link to a lesson
  • Navigate the snippets in the lesson

One of the main upsides of this approach is that if one of the snippets in the lesson fails to compile, the other snippets would be unaffected.

For implementation purposes, the layout / ui of this new feature could be something similar to what already exists with the examples, except that users can create or modify the group of snippets to their will:

image

jchavarri avatar Aug 09 '23 16:08 jchavarri

cc @feihong

jchavarri avatar Aug 09 '23 16:08 jchavarri

Maybe we can instead have some sort of "files" and then use bspack to bundle them:

https://github.com/melange-re/melange/blob/a30d8e4661492f8f5978baed16a323ec3d40e1e3/jscomp/main/bspack_main.ml

jchavarri avatar Oct 02 '23 16:10 jchavarri

And then you can "Export to VSCode" 😎

jchavarri avatar Oct 02 '23 16:10 jchavarri