kutt-extension icon indicating copy to clipboard operation
kutt-extension copied to clipboard

provide seamless migration for existing users to upcoming major version

Open abhijithvijayan opened this issue 4 years ago • 2 comments

  • [x] Set up a function to update extension settings (from browser local storage) to the new settings keys Map the keys like autoCopy : true to the new
"settings": {
   "autocopy": true,
   ...
}

on the installation / initialization of new major version.

  • [ ] Remove this feature after all the users have switched to the new major version

Without this mapping, the extension will UX issues for those who are using it currently.

abhijithvijayan avatar Feb 07 '20 05:02 abhijithvijayan

Current fields in local storage of almost all users

{
	"URL_array": [],
	"host": "https://google.com",
	"key": "this is the api key",
	"pwd": "password",
	"userOptions": {
		"autoCopy": true,
		"devMode": true,
		"keepHistory": true,
		"pwdForUrls": true
	}
}

Migrate to

{
	"settings": {
		"advanced": true,
		"apikey": "he;;obaby",
		"customhost": "https://google.com",
		"history": false
	}
}

abhijithvijayan avatar Mar 09 '20 18:03 abhijithvijayan

Migration actions are performed once on popup open(once extension is updated to v4.x.x) if previous keys exist on browser local storage.

The code can be removed once all the users receive the update. I have tested with basic options enabled as well as advanced options(like custom host) enabled. It works. :)

I will leave this issue open if someone runs into issue on migration.

abhijithvijayan avatar Mar 09 '20 19:03 abhijithvijayan