Closed Bug 1490077 Opened 6 years ago Closed 6 years ago

Input validation errors should appear in the red popup the same as merchant-supplied address errors

Categories

(Firefox :: WebPayments UI, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 64
Tracking Status
firefox64 --- fixed

People

(Reporter: jaws, Assigned: MattN)

References

(Depends on 2 open bugs, Blocks 1 open bug)

Details

(Whiteboard: [webpayments])

Attachments

(1 file)

We show field-specific merchant-supplied shipping address errors in a popup next to the field when the field is focused. But if the field has a missing or an invalid value then the error message only appears in a tooltip that is visible on mouse hover.

The latter comes from the DOM `required` implementation.
QA Contact: hani.yacoub
Flags: qe-verify+
Priority: -- → P3
Whiteboard: [webpayments] [triage] → [webpayments-reserve]
This is needed for user testing.
Priority: P3 → P2
Blocks: 1490446
Whiteboard: [webpayments-reserve] → [webpayments]
Assignee: nobody → jaws
Status: NEW → ASSIGNED
Priority: P2 → P1
Comment on attachment 9010740 [details]
Bug 1490077 - Reflect DOM validation messages on the error popup on the address and basic-card form. r?MattN

Matthew N. [:MattN] (PM me if requests are blocking you) has approved the revision.
Attachment #9010740 - Flags: review+
Pushed by mozilla@noorenberghe.ca:
https://hg.mozilla.org/integration/mozilla-inbound/rev/29f6f86fb9cd
Reflect DOM validation messages on the error popup on the address and basic-card form. r=MattN
https://hg.mozilla.org/integration/mozilla-inbound/rev/9b038cd736cf
PaymentRequest: RTL debugging toggle and fixes. r=trivial
Assigning to myself since I made significant fixes/changes.
Assignee: jaws → MattN+bmo
Backout by nerli@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e066ff13872b
Backed out 2 changesets for failures in browser/components/payments/test/mochitest/test_address_option.html on a CLOSED TREE
Pushed by mozilla@noorenberghe.ca:
https://hg.mozilla.org/integration/mozilla-inbound/rev/75036af7d851
Reflect DOM validation messages on the error popup on the address and basic-card form. r=MattN
https://hg.mozilla.org/integration/mozilla-inbound/rev/ba05fe7eaf0a
PaymentRequest: RTL debugging toggle and fixes. r=trivial
Flags: needinfo?(MattN+bmo)
https://hg.mozilla.org/mozilla-central/rev/75036af7d851
https://hg.mozilla.org/mozilla-central/rev/ba05fe7eaf0a
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 64
Hi Matt,

The validation errors appear now in a red popup when the invalid field is focused. However, we are not sure how to properly validate the error strings since only the one for the ZIP Code (and is also not respected) appears in the design doc: https://mozilla.invisionapp.com/share/YAFI31XR3KP#/screens/275361828. Can we find them somewhere else or these are not the final strings?

Just to present a quick summary, here are all the error string: 

Please fill out this field.  - all other fields

Please match the requested format.    - ZIP/Postal Code validation

Please select an item in the list.    - dropdown error string

Please use at least 9 characters (you are currently using X characters).   - CC number

Please enter a valid card number  -  CC number (without a dot. Shouldn't all string be without a dot at the end?)



As for the dropdown error string, we found the following behavior: https://streamable.com/vf5ml. Should we submit a bug?
Flags: needinfo?(MattN+bmo)
(In reply to Timea Babos from comment #10)
> Hi Matt,
> 
> The validation errors appear now in a red popup when the invalid field is
> focused. However, we are not sure how to properly validate the error strings
> since only the one for the ZIP Code (and is also not respected) appears in
> the design doc:
> https://mozilla.invisionapp.com/share/YAFI31XR3KP#/screens/275361828. Can we
> find them somewhere else or these are not the final strings?

These are the possible strings that can appear:
https://searchfox.org/mozilla-central/rev/0640ea80fbc8d48f8b197cd363e2535c95a15eb3/dom/locales/en-US/chrome/dom/dom.properties#34-59

> Please enter a valid card number  -  CC number (without a dot. Shouldn't all
> string be without a dot at the end?)

Yes, that is a bug. That string is defined at
https://searchfox.org/mozilla-central/rev/0640ea80fbc8d48f8b197cd363e2535c95a15eb3/browser/extensions/formautofill/locales/en-US/formautofill.properties#139

Can you please file a bug to track this?

> As for the dropdown error string, we found the following behavior:
> https://streamable.com/vf5ml. Should we submit a bug?

The error popup only appears when the field has focus, and in the case of dropdowns the dropdown is usually open when the field has focus. I'm not actually sure what we can do in this case, as we can't detect if the dropdown is open or not through front-end code. I'll leave the needinfo open for this last question.
(In reply to Jared Wein [:jaws] (please needinfo? me) from comment #11)
> (In reply to Timea Babos from comment #10)
> > Hi Matt,
> > 
> > The validation errors appear now in a red popup when the invalid field is
> > focused. However, we are not sure how to properly validate the error strings
> > since only the one for the ZIP Code (and is also not respected) appears in
> > the design doc:
> > https://mozilla.invisionapp.com/share/YAFI31XR3KP#/screens/275361828. Can we
> > find them somewhere else or these are not the final strings?

We didn't implement final strings yet: Bug 1490446 - Finalize field-specific error message strings

> These are the possible strings that can appear:
> https://searchfox.org/mozilla-central/rev/
> 0640ea80fbc8d48f8b197cd363e2535c95a15eb3/dom/locales/en-US/chrome/dom/dom.
> properties#34-59
> 
> > Please enter a valid card number  -  CC number (without a dot. Shouldn't all
> > string be without a dot at the end?)
> 
> Yes, that is a bug. That string is defined at
> https://searchfox.org/mozilla-central/rev/
> 0640ea80fbc8d48f8b197cd363e2535c95a15eb3/browser/extensions/formautofill/
> locales/en-US/formautofill.properties#139
> 
> Can you please file a bug to track this?

I agree with Jared.

> > As for the dropdown error string, we found the following behavior:
> > https://streamable.com/vf5ml. Should we submit a bug?
> 
> The error popup only appears when the field has focus, and in the case of
> dropdowns the dropdown is usually open when the field has focus. I'm not
> actually sure what we can do in this case, as we can't detect if the
> dropdown is open or not through front-end code. I'll leave the needinfo open
> for this last question.

We're doing what UX asked us to do (show only on focus) so I defer to them… personally I think the problem pointed out by the red outline is obvious enough so it's probably not a big deal, probably not needed for M3 either way. Upon load of the edit page we are supposed to auto-focus a field with errors so that would help for the first error field. (That's line 46 in https://docs.google.com/spreadsheets/d/1qY0GrH9vDu7bnqjiLtRplh4Y10af_48WqHK1PPAoxyo/edit#gid=468547005 and not filed yet).
Flags: needinfo?(MattN+bmo) → needinfo?(jsavory)
Submitted Bug 1494888 for the strings that have dots.
Depends on: 1494888
For the dropdowns, there is a conflict that the in-context text will overlap with the dropdown information, so we could show the text above the dropdown instead of below where we usually have it. Would we be able to do something like this? I agree that its not needed for M3, but we will need to solve this for MVP.
Flags: needinfo?(jsavory)
We also observed that the error strings for the fields that are right above the tooltip will also overlap each other, screenshot here: https://imgur.com/FOQJXou
Whiteboard: [webpayments] → [webpayments] [qa-triaged]
QA Whiteboard: [qa-triaged]
Whiteboard: [webpayments] [qa-triaged] → [webpayments]

Removing the qe-verify+ flag since the feature is disabled.

Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: