Closed
Bug 1417843
Opened 7 years ago
Closed 7 years ago
List countries Form Autofill supports in a pref
Categories
(Toolkit :: Form Autofill, enhancement)
Toolkit
Form Autofill
Tracking
()
RESOLVED
FIXED
mozilla59
| Tracking | Status | |
|---|---|---|
| firefox59 | --- | fixed |
People
(Reporter: scottwu, Assigned: scottwu)
References
(Blocks 1 open bug)
Details
(Whiteboard: [form autofill:V2])
Attachments
(1 file)
In order to support more than just the US, we need a place to specify which countries are supported. The pref would be a comma separated string like (CA,DE,US). This data would be used in bootstrap phase to determine if Form Autofill is available to the user, and ensure the countries could be saved into the profile storage, as well as having the countries show up in preferences.
Updated•7 years ago
|
Blocks: DE-CA-address-support-meta
| Comment hidden (mozreview-request) |
Comment 2•7 years ago
|
||
| mozreview-review | ||
Comment on attachment 8930009 [details]
Bug 1417843 - Add supportedCountries pref to configure which countries are supported.
https://reviewboard.mozilla.org/r/201200/#review206614
r+ if Mark agreed with the string changes. Just a reminder that Bug 1022925 will need this pref as well and please update if 1022925 land first.
::: browser/extensions/formautofill/bootstrap.js:64
(Diff revision 1)
> } else if (availablePref == "detect") {
> let locale = Services.locale.getRequestedLocale();
> let region = Services.prefs.getCharPref("browser.search.region", "");
> - return locale == "en-US" && region == "US";
> + let supportedCountries = Services.prefs.getCharPref("extensions.formautofill.supportedCountries")
> + .split(",");
> + return locale == "en-US" && supportedCountries.includes(region);
This reminds me that we should consider the locale as well(maybe not in this patch). Do you think we should even remove the locale checking once we settle down l10n(but users might be confused if they need to travel across countries)?
::: browser/extensions/formautofill/locales/en-US/formautofill.properties:128
(Diff revision 1)
> country = Country or Region
> tel = Phone
> email = Email
> cancelBtnLabel = Cancel
> saveBtnLabel = Save
> -countryWarningMessage = Form Autofill is currently available only for US addresses
> +countryWarningMessage2 = Form Autofill is currently available only for certain countries.
Did Mark notice the string changes and update on the spec?
Attachment #8930009 -
Flags: review?(schung) → review+
Comment 3•7 years ago
|
||
| mozreview-review-reply | ||
Comment on attachment 8930009 [details]
Bug 1417843 - Add supportedCountries pref to configure which countries are supported.
https://reviewboard.mozilla.org/r/201200/#review206614
> Did Mark notice the string changes and update on the spec?
Seems like he already update the spec: https://mozilla.invisionapp.com/share/RWEH3FMM5#/screens
Comment 4•7 years ago
|
||
| mozreview-review-reply | ||
Comment on attachment 8930009 [details]
Bug 1417843 - Add supportedCountries pref to configure which countries are supported.
https://reviewboard.mozilla.org/r/201200/#review206614
> This reminds me that we should consider the locale as well(maybe not in this patch). Do you think we should even remove the locale checking once we settle down l10n(but users might be confused if they need to travel across countries)?
Yeah, we'll probably need another pref for supported locales but it's not the scope of this bug indeed. Maybe we can file a bug for tracking.
Comment 5•7 years ago
|
||
| mozreview-review | ||
Comment on attachment 8930009 [details]
Bug 1417843 - Add supportedCountries pref to configure which countries are supported.
https://reviewboard.mozilla.org/r/201200/#review206766
Looks good. Thanks.
Attachment #8930009 -
Flags: review?(lchang) → review+
| Assignee | ||
Comment 6•7 years ago
|
||
| mozreview-review-reply | ||
Comment on attachment 8930009 [details]
Bug 1417843 - Add supportedCountries pref to configure which countries are supported.
https://reviewboard.mozilla.org/r/201200/#review206614
> Yeah, we'll probably need another pref for supported locales but it's not the scope of this bug indeed. Maybe we can file a bug for tracking.
Since localizers are working on string translation already, can we just remove the locale restriction altogether? I don't think we should prevent any user who live in supported countries from having this feature. I've opened bug 1419312 for this and we can discuss there.
| Comment hidden (mozreview-request) |
| Assignee | ||
Comment 8•7 years ago
|
||
Rebased to central and checking in. Thanks Steve and Luke!
Keywords: checkin-needed
Pushed by lchang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/00b541dc416d
Add supportedCountries pref to configure which countries are supported. r=lchang,steveck
Keywords: checkin-needed
Comment 10•7 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in
before you can comment on or make changes to this bug.
Description
•