You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.
When the tab is refreshed, everything is lost, which sucks in a few obvious ways.
A callback bound to onbeforeunload could quickly copy the details from each file to a hash, serialize it with JSON, and stash it to sessionStorage. Then, an onload handler would check sessionStorage and restore the important aspects of the previous state (or bring up the New Project dialog) when the new page loads.
Storing the data in localStorage is a possible alternative, but this request is limited to edits persisting long enough for the user to refresh the page (or close it, change their mind and reopen it a moment later) without losing their work.
One problem with this proposal is that users sometimes want to refresh the page to start a new project. Using the browser UI (outside the Studio) to delete the session data manually before refreshing the tab would be clunky and people will not always make the connection.
One solution would be to add a New Project button (with a confirmation dialog) that deletes sessionStorage then refreshes the page. Another option would be to replace the current exit dialog (that confirms you want to leave) with one that asks if you want to nuke your session on the way out.
Thank you for considering this.
The text was updated successfully, but these errors were encountered:
Maybe you could even mix the two and store both localstorage and sessionstorage. On page load, you could maybe copy localstorage (if it exists) to sessionstorage to then read.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When the tab is refreshed, everything is lost, which sucks in a few obvious ways.
A callback bound to
onbeforeunload
could quickly copy the details from each file to a hash, serialize it with JSON, and stash it tosessionStorage
. Then, an onload handler would checksessionStorage
and restore the important aspects of the previous state (or bring up the New Project dialog) when the new page loads.Storing the data in
localStorage
is a possible alternative, but this request is limited to edits persisting long enough for the user to refresh the page (or close it, change their mind and reopen it a moment later) without losing their work.One problem with this proposal is that users sometimes want to refresh the page to start a new project. Using the browser UI (outside the Studio) to delete the session data manually before refreshing the tab would be clunky and people will not always make the connection.
One solution would be to add a New Project button (with a confirmation dialog) that deletes
sessionStorage
then refreshes the page. Another option would be to replace the current exit dialog (that confirms you want to leave) with one that asks if you want to nuke your session on the way out.Thank you for considering this.
The text was updated successfully, but these errors were encountered: