Skip to content
This repository has been archived by the owner on Dec 9, 2019. It is now read-only.

Use localStorage #1

Open
agentcooper opened this issue Apr 9, 2018 · 3 comments
Open

Use localStorage #1

agentcooper opened this issue Apr 9, 2018 · 3 comments
Labels
enhancement New feature or request

Comments

@agentcooper
Copy link
Owner

Code should be saved to localStorage when closing playground.

@agentcooper agentcooper added the enhancement New feature or request label Apr 9, 2018
@karol-majewski
Copy link

@agentcooper What do you think about persisting compiler options as well?

@agentcooper
Copy link
Owner Author

@karol-majewski yes, this definitely should be done, however it becomes tricky with params coming from url (they probably should take precedence).

@Airblader
Copy link

I think the logic should go like this:

  1. If there's any URL parameter set, use that and skip the other step. However, do update this into the localStorage now.
  2. Otherwise, restore from localStorage and update the URL to reflect the now loaded state.

I wouldn't mix localStorage with URL parameters in cases where a single parameter isn't set. It's very unlikely that that's what a user would expect.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants