XKit-Rewritten icon indicating copy to clipboard operation
XKit-Rewritten copied to clipboard

Popup: Clear storage optionally on backup restore

Open marcustyphoon opened this issue 1 year ago • 1 comments

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 avatar Sep 16 '24 20:09 marcustyphoon

Aside: I had no idea you could do this!

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

marcustyphoon avatar Sep 16 '24 20:09 marcustyphoon

Yeah, makes sense 👍

marcustyphoon avatar Mar 30 '25 19:03 marcustyphoon