This was a real pain.
The difficulty started with assuming that the password input
element would be the first input element in the form. This
doesn't hold for change password where the old password comes
first. A way was needed to trigger element validation
in the correct order. This is done by storing a validator
function on the element that overrides the default
processing for that element, and is called in the
correct order..
Using the `validate` method this way the password-strength-mixin
a ton easier because `isValidStart` and `showValidationErrorsStart`
no longer need to be overridden.
Next, the password_strength_balloon model was way too complex
because the model's validate function was not being used in
the way Backbone instends. We now are, and we no longer need
the two methods 'updateForPassword' and 'validate', just the
2nd is needed. When model.isValid is called, and when the
model's password is updated, `model.validate()` is called,
and if the element is invalid, an `invalid` event is triggered
on the model.
fixes#6573
Reports from users are that the password strength meter is difficult
to read in Arabic, which may be one reason why the conversion rate is so
low in that language. This uses a 15px font size in the pw-strength meter
to try to make it a bit easier to read.
fixes#6556
get out of hand. To make development and review a bit simpler, this
extracts adding vpassword to the change password form.
Extraction from #6859
issue #6573
The translator instance was not passed to the Tooltip. This
affects dev because only the instance created in app-start
fetches translations. The problem does not affect prod
because translations are built into the Translator object.
fixes#6871
view.translate was not being called on the success status messages
before writing to the DOM. This remedies that.
Also change writing status/error messages to the DOM from using
.html to .text to prevent XSS from creeping in.
fixes#6728
There was a missing return statement after navigating to `/reset_password` that
caused the `missing email` error to be displayed when looking up whether an account
recovery key exists for a given email address. Since there was no email address
in the test, and the error only appeared after a short delay, our tests didn't
catch the problem. Everything updated.
fixes#6724
The .address CSS only took one button into account when the width
was calculated. If an email is verified, there are two buttons.
This makes affordances for the 2nd button, but only when the
email is verified.
fixes#6751
Mozilla China's FxA stack does not need COPPA. So that
they don't have to remove it every time we update our
code, this puts the feature behind a feature flag.
In configuration, coppa.enabled set to `false` will disable COPPA.
fixes#6736
This ensures that the device id we send to Amplitude will remain
consistent when following links in emails, which should fix the broken
funnel analysis.
`t` in `const {t} = BaseView` was being translated by Webpack/babel into
_base.t, which is not recognized by our l10n extraction script.
This changes all `t` declarations to use `const t = msg => msg` which
in local testing, has always kept the same name.
I tried using a module with a simple `module.export = msg => msg` and
import/requiring this using `import t from 'lib/t'`, but Webpack/babel
sometimes changed the `t` to `t_` which also is not recognized by
our extraction script.
issue #6725