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

Better document the use of cookies/localstorage and the extension. (Saving of user options) #26

Closed
NekoJonez opened this issue Jul 26, 2021 · 9 comments
Labels
enhancement New feature or request
Milestone

Comments

@NekoJonez
Copy link
Contributor

So, it turns out that #25 works just fine... But because I cleaned my cookies & browser cache, it """stopped""" working because, to quote @vlad-timotei himself: "It's very resource consuming this feature, so I only want people that need it to enable it."

So, to help new users or users who aren't too use to this tool... Maybe a warning message about the options being saved in a cookie (and maybe have an import/export feature in the long term) would be extremely handy and make the tool more user friendly imho.

@vlad-timotei
Copy link
Owner

Hi! Thanks for the issue!
A small technical detail: WPGPT doesn't use cookies, but LocalStorage - not relevant.

However, the issue is valid - user settings are stored as long as the user doesn't clear their browser data.

There are 2 possible ways of saving the user settings that I'm thinking about:

  1. an export/import feature - not quite a fan of this - that file will get lost, and the implementation is not quite straight forward, but it's an option.

  2. a drag and drop actionable bookmark that restores your settings.

Anyway, this should exist in a feature version.

@NekoJonez
Copy link
Contributor Author

Excellent idea's. I just want to add this link for the people who aren't following what the difference between cookies & local storage is. (Like myself, since I'm more of a networking guy than a programmer :P )

https://stackoverflow.com/questions/3220660/local-storage-vs-cookies

@NekoJonez
Copy link
Contributor Author

@vlad-timotei , the 2nd option sounds amazing. Since an import/export feature now that I think of it... It would break over versions and such.

@vlad-timotei vlad-timotei added the enhancement New feature or request label Jul 26, 2021
@vlad-timotei vlad-timotei added this to the future release milestone Jul 26, 2021
@NekoJonez NekoJonez changed the title Better document the use of cookies and the extension. Better document the use of cookies/localstorage and the extension. (Saving of user options) Jul 26, 2021
vlad-timotei added a commit that referenced this issue Jul 29, 2021
This adds a drag and drop bookmark to save current settings.

See: #26
@vlad-timotei vlad-timotei modified the milestones: future release, 1.5 Jul 29, 2021
@vlad-timotei
Copy link
Owner

See https://github.com/vlad-timotei/wpgp-tools/tree/one.five#backup--restore-settings
Tested in:

  • Chrome
  • Edge
  • Opera (it tends to select instead of dragging, but it works)
  • Brave
  • Firefox (UserScript)

@NekoJonez
Copy link
Contributor Author

Excellent, but I do have a question... What will happen if you save an option but you upgrade to another version that has more options?

@vlad-timotei
Copy link
Owner

Very good question.
The new options will be set to default state if missing from the backup.

What do you think about checking if the backup version is older and then ask if it should restore or not?

@vlad-timotei
Copy link
Owner

Just pushed this commit. User will have to confirm backup restore.

Case A. Version of the backup is the same with the version user has installed.
image

Case B. Version of the backup is not the same with the version user has installed.
image

(Date and time have localized format)

@NekoJonez
Copy link
Contributor Author

Now, I see you already implemented something for it... But I would say, options that aren't in the back-up go to default?

@vlad-timotei
Copy link
Owner

That is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants