playground: backup changes in localStorage to prevent data loss#12974
playground: backup changes in localStorage to prevent data loss#12974calebdw wants to merge 1 commit intophpstan:2.1.xfrom
Conversation
| </div> | ||
| <div style="display: none" data-bind="visible: true"> | ||
| <!-- ko if: hasUnsavedChanges --> | ||
| <div class="text-right"> |
There was a problem hiding this comment.
When page is cacheable, regular input fields are restored when user navigates back or reopen that tab. Forced refresh reload the page fully. I would probably prefer this behaviour.
Also #11838 should be fixed first, as currently the previous changes are lost even if they have permanent url. (lost in sense user cannot navigate back if he did not save the url)
There was a problem hiding this comment.
When page is cacheable, regular input fields are restored when user navigates back or reopen that tab. Forced refresh reload the page fully. I would probably prefer this behaviour.
Not sure what you really mean here...
Also #11838 should be fixed first, as currently the previous changes are lost even if they have permanent url. (lost in sense user cannot navigate back if he did not save the url)
Nothing says that #11838 has to be fixed first---that's orthogonal to this and can be fixed independently
|
@ondrejmirtes, is there anything on here that you don't like or want me to change? |
|
Not yet. I'll get to it when I get to it. I have 155 unprocessed emails in my inbox, and I also want to drain my current ideas first. |
c618932 to
34d107c
Compare
This backups changes to localStorage so that if the user accidentally refreshes the page or navigates away then they don't lose their work. Upon loading the page, if there is a backup in localStorage then the data will be restored and analysed.
34d107c to
78ad15d
Compare
Hello!
Related to #12956
Supercedes: #12961
This backups changes to localStorage so that if the user accidentally refreshes the page or navigates away then they don't lose their work. Upon loading the page, if there is a backup in localStorage then the data will be restored and analysed.
If unsaved changes are detected, then a
Resetbutton appears in the upper right corner. Clicking this button will clear the local storage and return the editor to the default state:Thanks!