Skip to content

Conversation

@calebdw
Copy link
Contributor

@calebdw calebdw commented May 6, 2025

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 Reset button appears in the upper right corner. Clicking this button will clear the local storage and return the editor to the default state:

image

Thanks!

</div>
<div style="display: none" data-bind="visible: true">
<!-- ko if: hasUnsavedChanges -->
<div class="text-right">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@calebdw
Copy link
Contributor Author

calebdw commented Jun 3, 2025

@ondrejmirtes, is there anything on here that you don't like or want me to change?

@ondrejmirtes
Copy link
Member

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.

@calebdw calebdw force-pushed the calebdw/push-stxxuzztppyv branch from 4759843 to c618932 Compare September 2, 2025 12:40
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.
@calebdw calebdw force-pushed the calebdw/push-stxxuzztppyv branch from c618932 to 34d107c Compare September 3, 2025 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants