teal-language / teal-playground

teal-language/tl playground
https://teal-playground.netlify.app/
19 stars 1 forks source link

feat(storage) store text in localStorage #5

Closed darrenjennings closed 4 years ago

pdesaulniers commented 4 years ago

Maybe the dropdown selection should be stored as well? If I load the page, change the snippet to "enum" and reload the page, then the "enum" snippet shows up even though "basic" is selected. I guess this is sorta confusing.

darrenjennings commented 4 years ago

@pdesaulniers yea I noticed that. The reason I didn't do it immediately was that it's a bit harder :))). We might want to add some routing so that url's can be shared and used as state e.g. ?selection=enum. If we can remove the XSS attack vector you could even hash the text and store that encoded in the url as well. Right now that would be dangerous.

darrenjennings commented 4 years ago

Merging until we can fix dropdown issues. Added #8 and #9