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

[site] Add a share button in the REPL page controls #95

Open
johannchopin opened this issue Aug 22, 2021 · 3 comments · May be fixed by #182
Open

[site] Add a share button in the REPL page controls #95

johannchopin opened this issue Aug 22, 2021 · 3 comments · May be fixed by #182
Labels

Comments

@johannchopin
Copy link

Describe the problem

REPL is an awesome tool to help people learn Svelte. A good example for that is StackOverflow where I add a REPL to almost all my svelte related answers/questions. The problem is that there is no 'common' way to share the REPL link other than the link itself so you will see in many answers stuff like:

Have a look at the REPL
Here is an example: https://svelte.dev/repl/hello-world?version=3.42.2
...

It is therefore more or less difficult to find the final example quickly in the text where other platforms such as codesandbox provides a button that is markdown/html that you can easily copy/paste like:

[![Edit cranky-boyd-3qqnq](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/cranky-boyd-3qqnq?fontsize=14&hidenavigation=1&theme=dark)

Edit cranky-boyd-3qqnq

Describe the proposed solution

Would be nice in the REPL's AppControls to add a share button that will open a panel that proposes you to copy the REPL link or the markdown/html button code like:

image

TODOS:

  • create button svg
  • host static svg on the svelte site
  • add control button to open panel that includes:
    • a button to copy the URL
    • 2 textareas that contains the html/markdown of the button and a preview of it

This isn't a lot of work and I would be glad to help the svelte ecosystem that I enjoy so much. I can take care of this one if everyone agree 😄

Alternatives considered

n/a

Importance

would make my life easier

@dummdidumm
Copy link
Member

While this sounds like a nice quality-of-life-addition, I vaguely remember that @Conduitry had some concerns about stuff like this (or was it embedding it into other sites?) for traffic reasons.

@Conduitry
Copy link
Member

I had concerns about providing a way to embeddable version, or a version of the REPL that only showed the output pane and not the editor pane. I don't have a problem with providing another way to copy links to the same pages people already have access to.

@johannchopin
Copy link
Author

Perfect so I can start working on a PR or are some further details needed?

@benmccann benmccann transferred this issue from sveltejs/svelte Dec 15, 2021
@benmccann benmccann added the REPL label Dec 15, 2021
@johannchopin johannchopin linked a pull request Dec 16, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants