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

x/playground: store code between sessions in user's browser #28476

Closed
ysmolsky opened this issue Oct 29, 2018 · 4 comments
Assignees
Milestone

Comments

@ysmolsky
Copy link
Member

@ysmolsky ysmolsky commented Oct 29, 2018

What do you think about adding this feature?

The most recently entered code will be automatically saved in your browser's local storage. This allows you to recover your last work even if you close the browser.
https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API

What puzzles and prevents me from drafting a patch is a need to add a new button for resetting the program code.

@andybons @bradfitz

@ysmolsky ysmolsky added this to the Unreleased milestone Oct 29, 2018
@andybons

This comment has been minimized.

Copy link
Member

@andybons andybons commented Oct 29, 2018

I don’t think adding another caching layer to the playground (that we don’t control and is pretty opaque) is worth it. Without the proper UI it would be very confusing to have things saved in perpetuity using localStorage. Aside from this issue, has this been reported as a common problem people run into? I worry that it’s a solution in search of a (more widespread) problem.

@ysmolsky

This comment has been minimized.

Copy link
Member Author

@ysmolsky ysmolsky commented Oct 30, 2018

This was rather brainstorming and seeing if this resonates with the others. The other day I was editing the code in playground and suddenly closed the tab, losing some work. But again, this happened only twice and playground is like a throw away sketch pad for many.

Unless this bug attracts attention of some part of community, I will close it in 2 weeks.

@andybons

This comment has been minimized.

Copy link
Member

@andybons andybons commented Oct 30, 2018

SGTM. Thanks, Yury.

@ysmolsky ysmolsky self-assigned this Oct 31, 2018
@ysmolsky

This comment has been minimized.

Copy link
Member Author

@ysmolsky ysmolsky commented Nov 12, 2018

Closing it down due the lack of resonance.

@ysmolsky ysmolsky closed this Nov 12, 2018
@golang golang locked and limited conversation to collaborators Nov 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants
You can’t perform that action at this time.