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

Popup: Clear storage optionally on backup restore #1621

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marcustyphoon
Copy link
Collaborator

Description

This adds a checkbox to the backup restore interface in the specific scenario where the user's pasted backup is missing some of the values that the extension storage currently contains. As noted in the linked issue, this scenario currently results in those old values persisting. With this checkbox selected, the extension will remove those values as part of the restore process.

Most people should not see this, as they're presumably loading a backup with the same amount of information or more information than their storage currently contains

Resolves #1191.

Testing steps

  • Export your data, if you're testing this with your real data. Toggle some preferences to generate some data if you aren't.

  • Paste your current data into the restore box. Confirm that no checkbox appears and that restoring works as expected.

  • Paste {} into the restore box. Uncheck the resulting checkbox. Confirm that restoring works as expected but results in no change.
  • Paste a subset of your current data into the restore box with a value change. Uncheck the resulting checkbox. Confirm that restoring works as expected but results in no change.
  • Paste {} into the restore box. Check the resulting checkbox. Confirm that restoring removes all of your data.

@marcustyphoon
Copy link
Collaborator Author

Aside: I had no idea you could do this!

[data-stale-keys]::after {
  content: "Clear " attr(data-stale-keys) " Existing Value(s)";
}

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.

Importing backup keeps old storage keys
1 participant