Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
This repository was archived by the owner on Nov 6, 2023. It is now read-only.

Migrate settings to WebExtensions #10007

Closed

Description

@J0WI

As a user I would expect that all my preferences are kept during the upgrade to the WebExtension.
How can we do this?
There are:

Activity

  1. changed the title [-]How can we migarte all prefs from the legacy version to the webextension?[/-] [+]How can we migrate all prefs from the legacy version to the webextension?[/+] on May 23, 2017
  2. Hainish commented on Jun 22, 2017

    @Hainish
    Member

    Working on this currently

  3. self-assigned this
    on Jun 22, 2017
  4. Hainish commented on Aug 1, 2017

    @Hainish
    Member

    I had assumed this was a simple task, given the number of extensions required to migrate settings. Unfortunately, in order for this to be possible, we would first have to convert the extension into a restartless XPCOM extension. This process is in itself not simple, and the main benefit from a restartless extension we will get from WebExtensions for free.

    Converting from an overlay extension to a restartless extension to a WebExtension in a very short time frame seems error-prone and laborious. It would cut into the time I require to review ruleset edge-cases where needed and tackle other WebExtensions issues. Given that we already have a clear upgrade path directly to WebExtensions, introducing this extra step so late in the game is in my opinion dangerous. It's unfortunate we're just discovering this now. I'm making the decision not to go down that path, and to move forward as planned directly to WebExtensions. So the question remains: what do we do to migrate settings?

    We don't collect stats on this, but we can make a few inferences about those who need settings migrated. My expectation is that only a tiny minority of HTTPS Everywhere users have ever created custom rules. A larger, but still relatively small number users have tinkered with the settings, disabling or enabling rules. The previous set of users are technically savvy enough to create rules and move them into a custom directory. The latter set less so, but still probably more savvy than the average user. Likewise with someone who has set Block all unencrypted requests.

    So here's what we do.

    First, if any of the settings for the extension are not the default, we present to the user a dialogue explaining that they're about to lose some of their settings. We can make it really simple, explaining to them what exactly they will lose.

    Second, we give the users the ability to migrate their settings manually. I expect that this will be done by very few users, but very adamant long-time users who have cultivated an extension customized to their own localized browsing perspective: an internal non-public network for instance. To these loyal users, we can provide actual commands to run in the extension debugging console once the upgrade to WebExtensions is complete that will allow them to maintain their settings.

    Those that have not modified any settings (the vast majority) will never see this dialogue. Only the power users will, and most of them will probably not bother with migrating settings. They'll see the simple dialogue and close it. For the loyal users, we can provide an additional dialogue (perhaps a click-through from the first) that will give them commands to run in order to preserve their settings.

    This seems like the best way forward, given the relative lack of time, heavy lifting, and low impact it is likely to have.

  5. changed the title [-]How can we migrate all prefs from the legacy version to the webextension?[/-] [+]Create a dialogue for users who have modified settings to allow them to migrate[/+] on Aug 1, 2017
  6. Bisaloo commented on Aug 1, 2017

    @Bisaloo
    Collaborator

    I like what you are proposing. It sounds relatively simple and should result in an easy transition for most users. I also think users will understand that the transition to WebExtensions is necessarily a bit bumpy.

    Just a small point to remember:

    Those that have not modified any settings (the vast majority) will never see this dialogue.

    Because of #1394, this should write "those that have never modified any settings". Even disabling and then re-enabling a ruleset will be enough to be excluded from this category. You might be underestimating the proportion of users in this situation(?).

  7. J0WI commented on Aug 1, 2017

    @J0WI
    ContributorAuthor

    I agree that it's not worth to make XPCOM restartless before we have to WebExtension anyway.
    But is this the only option to do so? Can you share your research on how you would implement this?

  8. Hainish commented on Aug 1, 2017

    @Hainish
    Member

    @J0WI in WebExtensions, the data stored is scoped to the extension sandbox. It cannot access global browser storage.

    XPCOM cannot save data to extension sandboxes (except by using Embedded WebExtensions, which requires a restartless XPCOM extension first).

    So there's no way to migrate data from an overlay XPCOM extension. That's the main reason for Embedded WebExtensions in the fist place.

    Instead of providing commands for users to run, I've instead chosen to add an Export Settings button to the XPCOM version which saves a json settings file, and then an Import Settings button to the WebExtensions version. Having an Import Settings button will be more generically useful later on anyway.

  9. jeremyn commented on Aug 1, 2017

    @jeremyn
    Contributor

    I agree that exporting/importing all settings to/from a file is the way to go, like Privacy Badger supports.

    How will the transition appear to the user? We shouldn't force the user to do anything immediately. Imagine a use case of a traveling journalist without trusted technical people around them suddenly presented with a prompt.

  10. Hainish commented on Aug 1, 2017

    @Hainish
    Member

    @jeremyn on the next release, we'll warn users who have changed their settings from the default that they may lose settings unless they export them. This will be exposed in a new tab. We'll give them the option to export settings directly within this tab.

  11. jeremyn commented on Aug 1, 2017

    @jeremyn
    Contributor

    Can we continue to prompt them every browser start until they click "export settings" at least once?

  12. Hainish commented on Aug 1, 2017

    @Hainish
    Member

    I'm concerned with annoying people too much. I was planning on showing it only once, but adding a menu option to export settings. In fact, since XPCOM is so permissive, we may be able to just export the json file automatically once and just notify users where that json file is located when they upgrade.

  13. 5 remaining items

  14. Hainish commented on Aug 1, 2017

    @Hainish
    Member

    We're talking about what the user experience should be, that's not really an implementation detail or something you want to discover by writing it.

    I'd rather not spend hours arguing about implementation details without even knowing what's possible instead of actually implementing it.

  15. jeremyn commented on Aug 1, 2017

    @jeremyn
    Contributor

    I'm not knowledgeable enough about Firefox local storage to know whether it is more or less accessible from the OS than a log file in the profile directory. If you say the log file is strictly no worse, then okay.

    One concern is that a user who wants to sanitize their system might think to uninstall HTTPS Everywhere but might not think to delete sensitive_settings.json from ~/.mozilla or %APPDATA%\Mozilla.

    From a technical perspective I'm suggesting that HTTPS Everywhere should open a new tab with a nag prompt if some persistent flag is off; the flag should default to on; and the flag should only be disabled by clicking some Export button in the new tab. This should be doable in WebExtensions.

    If what you really mean is that you want to design this by yourself, that's fine. I understand there's time pressure here and ultimately you're the one doing the work. I think my feedback will be less useful if I'm presented with a finished product shortly before the deadline than it would be at this relatively early stage, but it's your call.

  16. J0WI commented on Aug 2, 2017

    @J0WI
    ContributorAuthor

    @Hainish did you already consider using the browser vendors sync services, like Firefox Accounts? I think that would be the best experience for plain Jane and average Joe.
    See also #1022

    I agree with you that it's not a big deal having the export in the profiles dir. Wecould also add a 'deleteme' sting to the filename, that advanced users can clean it up manually. But I think it's worth to solve #1394 before we move to WebExtensions. I'm sure that I'm an edge case, but at times my prefs.js is >1MB. We really made/make a mess with our options. This can result in serious performance issues for Firefox.

  17. Hainish commented on Aug 2, 2017

    @Hainish
    Member

    Oh neat, thanks for the heads up @J0WI

  18. Hainish commented on Aug 3, 2017

    @Hainish
    Member

    Here's my Export Settings PR: #11639. @J0WI, @jeremyn, please take a look at your soonest convenience, it would be great to merge this tomorrow.

  19. changed the title [-]Create a dialogue for users who have modified settings to allow them to migrate[/-] [+]Migrate settings to WebExtensions[/+] on Aug 8, 2017
  20. Hainish commented on Aug 10, 2017

    @Hainish
    Member

    This should be fixed by #11800, except for

    state of platform rules (see also #9971)

    which I consider low enough priority to defer to later.

  21. J0WI commented on Aug 10, 2017

    @J0WI
    ContributorAuthor

    which I consider low enough priority to defer to later.

    @Hainish please note that this is a blocker for Tor users.

  22. Hainish commented on Aug 10, 2017

    @Hainish
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions