Closed Bug 1058806 Opened 10 years ago Closed 9 years ago

Add month/date field to age entry if user selects "magic year" in Firefox Account create account flow

Categories

(Android Background Services Graveyard :: Firefox Accounts, defect)

All
Android
defect
Not set
normal

Tracking

(firefox38 verified)

VERIFIED FIXED
Firefox 38
Tracking Status
firefox38 --- verified

People

(Reporter: nalexander, Assigned: vivek, Mentored)

References

Details

Attachments

(1 file)

Flags: needinfo?(nalexander)
There are a few parts to this patch.  The first thing is to generalize FxAccountAgeLockoutHelper to account for both a year and month, and to test it carefully with automated JUnit 4 tests.

The second thing is to implement the UI that recognizes the magic year and replaces the year box with two month/day boxes.  My preferences is to have the month/day boxes always exist, be hidden to start, and default to the value 1/1.  That way you can *always* include the month/day at the same places as the year.  That's important because we pass the year around between activities; we should pass all of year/month/day going forward.

A third is to show the error messages.  In fact, I don't think we should show the displayed error messages.  I think we should do the same thing as the year button: if you haven't entered a valid month/day, the "Create" box is not clickable.  We can update the day ranges when the month changes to have the correct number of days (I think?) based on the year/month.  If not, that's interesting to think about :)

Finally, wire in the new values into the helper you wrote above.  Then we can work on a test plan.  Thanks for you interest, vivek!
Assignee: nalexander → vivekb.balakrishnan
Flags: needinfo?(nalexander) → needinfo?(vivekb.balakrishnan)
Thanks Nick,

I'll get started on this bug.
Flags: needinfo?(vivekb.balakrishnan)
for the record, the month values must be localized month names.
Attached file github pull request
Attachment #8539721 - Flags: review?(nalexander)
Comment on attachment 8539721 [details] [review]
github pull request

Reviewed on github -- gist is, nits but looking good.  Back to :vivek for touch-ups before I test locally.
Attachment #8539721 - Flags: review?(nalexander) → feedback+
Mentor: nalexander
Comment on attachment 8539721 [details] [review]
github pull request

Back to me for re-review.
Attachment #8539721 - Flags: review?(nalexander)
Comment on attachment 8539721 [details] [review]
github pull request

Further review comments and requests up on GH.  Flag me again for the next review -- the WIP is looking good.
Attachment #8539721 - Flags: review?(nalexander)
Comment on attachment 8539721 [details] [review]
github pull request

Git PR updated.
Attachment #8539721 - Flags: review?(nalexander)
Comment on attachment 8539721 [details] [review]
github pull request

A pull request waiting for vivek's feedback is up at https://github.com/mozilla-services/android-sync/pull/525
Attachment #8539721 - Flags: review?(nalexander)
Attachment #8539721 - Flags: feedback?(vivekb.balakrishnan)
Attachment #8539721 - Flags: feedback+
Attachment #8539721 - Flags: feedback?(vivekb.balakrishnan) → feedback+
This needs QA to run through the Firefox Accounts create account flow.  What should happen is that when a user is potentially 12 or 13 years old (birth day in current year - 13 years, i.e., 2002) they are asked for the month and day of their birth, so that we can be certain they are 13 years on the day of account creation.

1) verify that adding an account with a year before 2001 works as before -- no month/day.
2) verify that adding an account with "1960s or earlier" still works.
3) verify that adding an account with a year after 2002 (2003 or later) still locks out the user.
4) verify that choosing year 2002 shows month/day boxes.
5) verify month/day boxes are preserved across create -> sign in -> create loop.
6) verify that choosing one day older works.
7) verify that choosing today's birthday works.
8) verify that choosing one day younger locks out the user.

I find it useful to try to create an existing account to test: that way the server rejects you but you can see the "age effects".  To reset the lock out, kill the org.mozilla.fennec package (or wait 15 minutes, IIRC).
Flags: needinfo?(aaron.train)
https://hg.mozilla.org/mozilla-central/rev/a7c0c9631af4
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 38
> 2) verify that adding an account with "1960s or earlier" still works.

You mean 1990? I don't see an item for 1960s or earlier.

Other than that, I tested the scenarios above and they all work well. I noticed that should one choose 2002 and get the month/day fields, there is no way to back out of that if you meant 2001, a minor slight annoyance.
Status: RESOLVED → VERIFIED
Flags: needinfo?(aaron.train)
(In reply to Aaron Train [:aaronmt] from comment #13)
> > 2) verify that adding an account with "1960s or earlier" still works.
> 
> You mean 1990? I don't see an item for 1960s or earlier.

I did -- bad memory.
 
> Other than that, I tested the scenarios above and they all work well. I
> noticed that should one choose 2002 and get the month/day fields, there is
> no way to back out of that if you meant 2001, a minor slight annoyance.

I agree, but I think this is by design.  It's possible to back all the way out of creation and start again, so I'm don't intend to address it.  Thanks for testing!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: