Skip to content

Add explicit "save" option #152

@smeijer

Description

@smeijer

The save action, should write the state to a github gist.

I just learned that this is how ASTExplorer does it, and it turns out that it works quite amazing.

For example, take the astexplorer instance:

https://astexplorer.net/#/gist/27a4fea62d9c957de06791e6302aa4d1/664d8a3d29d4db7d6ff7e407dc12ec8815ff75d3
       https://gist.github.com/27a4fea62d9c957de06791e6302aa4d1/664d8a3d29d4db7d6ff7e407dc12ec8815ff75d3

The files that we save can be a source.html with the html, an source.js with the query, and an playground.json for future usage.

If the user is authenticated, we will write the state to his own gists collection. If he is not, we will write it to an (bot) account of this project (I've created the user account: testing-playground-com for this purpose).

All gists will be private.

If a playground has an URL that starts with #/gist/, we will load the state from he gist, just as astexplorer does.


Partially Blocked by #151

Metadata

Metadata

Assignees

Labels

featureNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions