Closed Bug 1390757 Opened 7 years ago Closed 7 years ago

[Form Autofill] Enable credit card feature according to "extensions.formautofill.creditCards.enabled" pref

Categories

(Toolkit :: Form Manager, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
relnote-firefox --- 58+
firefox57 --- fixed

People

(Reporter: ralin, Assigned: ralin)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [form autofill:MVP])

Attachments

(1 file)

FAP should respect this pref and adjust its support for credit card fields.
See Also: → 1382530
Status: NEW → ASSIGNED
I was trying to figure out how the initialization could differ from the original if we have to consider two pref now. Do we need to update autofillSavedFieldNames as well? If the autofillSavedFieldNames size has to account for the activeStatus, autofillSavedFieldNames should be collected from the enabled collections instead of all.
e.g. when only "extensions.formautofill.creditCards.enabled" is on with only address records in storage, we shouldn't see autofill active.
Yes, it makes sense. "autofillSavedFieldNames" is only updated when profile is changed. Maybe we can record the saved field names of addresses and credit cards separately so we don't need to update it when only pref is changed.

BTW, are you going to update "startSearch" in the same commit or in a new one?
> Maybe we can record the saved field names of addresses and credit cards separately so we don't need to update it when only pref is changed.
Seems like a small change, I'll do in the same commit including "startSearch" part later. Thanks.
Some TODOs:
1. Don't save autofillSavedFieldNames as a complex object, instead, separate into two properties of initialProcessData like autofillSavedAddressesFieldNames and autofillSavedCreditCardsFieldNames, it could have been more clearer. (will discuss with Luke in person)
2. Add test cases in test_activeStatus.js for different pref sets.
3. Update test_savedFieldNames.js due to the change of its structure.
4. Smarter fallback to form history according to pref. (maybe an extra mochitest is required for this)
Depends on: 1393374
Comment on attachment 8900217 [details]
Bug 1390757 - Introduce pref extensions.formautofill.creditCards.enabled to form autofill activation process.

https://reviewboard.mozilla.org/r/171582/#review177326

Good job! Thanks.
Attachment #8900217 - Flags: review?(lchang) → review+
(In reply to Ray Lin[:ralin] from comment #6)
> 1. Don't save autofillSavedFieldNames as a complex object, instead, separate
> into two properties of initialProcessData like
> autofillSavedAddressesFieldNames and autofillSavedCreditCardsFieldNames, it
> could have been more clearer. (will discuss with Luke in person)

Let's file a bug for following up this improvement.
Thanks for your rapid review :D

I'm waiting for the try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e8fe1c4f3bc9356c0582af1a67c93b26ada584e5
will mark checkin-needed once I can confirm the result is good to go.

(In reply to Luke Chang [:lchang] from comment #10)
> (In reply to Ray Lin[:ralin] from comment #6)
> > 1. Don't save autofillSavedFieldNames as a complex object, instead, separate
> > into two properties of initialProcessData like
> > autofillSavedAddressesFieldNames and autofillSavedCreditCardsFieldNames, it
> > could have been more clearer. (will discuss with Luke in person)
> 
> Let's file a bug for following up this improvement.
I'll file a bug for that.
Thanks
Keywords: checkin-needed
Pushed by lchang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8fa30f1a3f4d
Introduce pref extensions.formautofill.creditCards.enabled to form autofill activation process. r=lchang
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/8fa30f1a3f4d
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Blocks: 1393663
This bug added the ability to control the feature being enabled or not but doesn't control making it available to users. We're not shipping credit card autofill in 58 because we want to record some telemetry first.
Flags: needinfo?(rkothari)
Hi Matt, this relnote was added only to the Beta58 release notes and not the 58 "release version" notes. Please let me know if these to be taken off of the beta58 release notes as well. Thanks!
Flags: needinfo?(rkothari)
Blocks: 1781138
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: