Closed Bug 1836438 Opened 1 year ago Closed 4 months ago

Should not store normalized name while capturing address

Categories

(Toolkit :: Form Autofill, task, P2)

task

Tracking

()

RESOLVED FIXED
123 Branch
Tracking Status
firefox123 --- wontfix
firefox124 --- fixed

People

(Reporter: dimi, Assigned: dimi)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxcm-addr-compatibility])

Attachments

(2 files, 2 obsolete files)

We call _normalizeRecord before comparing address, however, we save the normalized address instead of users input. We need to make sure we capture users input so users don't lose their data.

Autofill Storage consists of two parts: Valid Fields and Computed Fields.
Valid Fields should store values provided by users, while Computed Fields are
values we derive from the user-provided data. For example, when a user
enters a "tel" number, we compute "tel-country-code", "tel-national", and
"tel-area-code" based on the "tel" number provided.

However, in the current format, the "name" field is stored as a computed field,
while "given/additional/family" names are stored as valid fields. This approach
can lead to the loss of user input. For instance, if a user enters "Mr. John Doe"
as the name, the current approach strips the "Mr." part and stores"John" as the
given name and "Doe" as the family name. When the next time we autofill
a "name" field, we will then only fill in "John Doe"

This patch introduces a "full-name" field to ensure the user's input is always
stored. When retrieving data from the storage, we will compute the "name"
field based on this "full-name".

Attachment #9367944 - Attachment is obsolete: true

Autofill Storage consists of two parts: Valid Fields and Computed Fields.
Valid Fields should store values provided by users, while Computed Fields are
values we derive from the user-provided data. For example, when a user
enters a "tel" number, we compute "tel-country-code", "tel-national", and
"tel-area-code" based on the "tel" number provided.

However, in the current format, the "name" field is stored as a computed field,
while "given/additional/family" names are stored as valid fields. This approach
can lead to the loss of user input. For instance, if a user enters "Mr. John Doe"
as the name, the current approach strips the "Mr." part and stores"John" as the
given name and "Doe" as the family name. When the next time we autofill
a "name" field, we will then only fill in "John Doe"

This patch introduces a "full-name" field to ensure the user's input is always
stored. When retrieving data from the storage, we will compute the "name"
field based on this "full-name".

Merge the First Name, Middle Name, and Last Name fields in the address management
dialog into a single Name field, similar to what we currently have in the edit
address doorhanger.

The reason for this change is not just to synchronize the design.
The main motivation is that a single name field allows users to enter names with
more information, for example, Mr. John Doe. Since first name + middle name + last name
is a subset of name ,we should not limit what users can enter from the outset.

Depends on D196065

Autofill Storage consists of two parts: Valid Fields and Computed Fields.
Valid Fields should store values provided by users, while Computed Fields are
values we derive from the user-provided data. For example, when a user
enters a "tel" number, we compute "tel-country-code", "tel-national", and
"tel-area-code" based on the "tel" number provided.

However, in the current format, the "name" field is stored as a computed field,
while "given/additional/family" names are stored as valid fields. This approach
can lead to the loss of user input. For instance, if a user enters "Mr. John Doe"
as the name, the current approach strips the "Mr." part and stores"John" as the
given name and "Doe" as the family name. When the next time we autofill
a "name" field, we will then only fill in "John Doe"

This patch moves the "name" field to valid fields to ensure the user's input is always
stored.

Attachment #9367946 - Attachment is obsolete: true
Attachment #9371034 - Attachment description: WIP: Bug 1836438 - P1. Move "name" to VALID_FIELDS and move "*-name" to COMPUTED_FIELDS → Bug 1836438 - P1. Move "name" to VALID_FIELDS and move "*-name" to COMPUTED_FIELDS r=#credential-management-reviewers
Pushed by dlee@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/22a1f02ccf92
P1. Move "name" to VALID_FIELDS and move "*-name" to COMPUTED_FIELDS r=credential-management-reviewers,markh,sgalich
https://hg.mozilla.org/integration/autoland/rev/8f688ebed34e
P2. Use a single name field for edit address dialog r=credential-management-reviewers,issammani
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 123 Branch
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Flags: needinfo?(dlee)
Pushed by dlee@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/73a1728e9257
P1. Move "name" to VALID_FIELDS and move "*-name" to COMPUTED_FIELDS r=credential-management-reviewers,markh,sgalich
https://hg.mozilla.org/integration/autoland/rev/e2f90fb83fb8
P2. Use a single name field for edit address dialog r=credential-management-reviewers,issammani
Status: REOPENED → RESOLVED
Closed: 4 months ago4 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: