You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
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
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.
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
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(?).
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?
@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.
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.
@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.
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.
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.
@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.
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
On August 10, 2017 6:29:11 AM PDT, J0WI ***@***.***> wrote:
> which I consider low enough priority to defer to later.
@Hainish please note that this is a blocker for Tor users.
Activity
[-]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?[/+]Hainish commentedon Jun 22, 2017
Working on this currently
Hainish commentedon Aug 1, 2017
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.
[-]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[/+]Bisaloo commentedon Aug 1, 2017
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:
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(?).
J0WI commentedon Aug 1, 2017
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?
Hainish commentedon Aug 1, 2017
@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 Settingsbutton to the XPCOM version which saves ajsonsettings file, and then anImport Settingsbutton to the WebExtensions version. Having anImport Settingsbutton will be more generically useful later on anyway.jeremyn commentedon Aug 1, 2017
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.
Hainish commentedon Aug 1, 2017
@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.
jeremyn commentedon Aug 1, 2017
Can we continue to prompt them every browser start until they click "export settings" at least once?
Hainish commentedon Aug 1, 2017
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
jsonfile automatically once and just notify users where thatjsonfile is located when they upgrade.5 remaining items
Hainish commentedon Aug 1, 2017
I'd rather not spend hours arguing about implementation details without even knowing what's possible instead of actually implementing it.
jeremyn commentedon Aug 1, 2017
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.jsonfrom~/.mozillaor%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
Exportbutton 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.
J0WI commentedon Aug 2, 2017
@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.
J0WI commentedon Aug 2, 2017
JFYI: https://blog.mozilla.org/addons/2017/08/01/noscripts-migration-to-webextensions-apis/
Hainish commentedon Aug 2, 2017
Oh neat, thanks for the heads up @J0WI
Hainish commentedon Aug 3, 2017
Here's my
Export SettingsPR: #11639. @J0WI, @jeremyn, please take a look at your soonest convenience, it would be great to merge this tomorrow.[-]Create a dialogue for users who have modified settings to allow them to migrate[/-][+]Migrate settings to WebExtensions[/+]Hainish commentedon Aug 10, 2017
This should be fixed by #11800, except for
which I consider low enough priority to defer to later.
J0WI commentedon Aug 10, 2017
@Hainish please note that this is a blocker for Tor users.
Hainish commentedon Aug 10, 2017