Page MenuHomePhabricator

VForm: [[Special:ChangeEmail]] form should be rewritten to use HTMLForm with vform styling and prettier error messages
Closed, ResolvedPublic

Description

Visit http://en.wikipedia.beta.wmflabs.org/wiki/Special:ChangeEmail , login, then enter a valid e-mail address and an invalid password and submit.

You get a plain red error warning. You should get a nice pink box. The fix is easy, change <p class="error"> to <p class="errorbox"> in its error() function.

There's more that could be fixed on this form.

For grins, enter valid/invalid e-mail... you get weird green and pink client-side validation "strips" (and the browser's own type="email" HTML5 validation warning when you submit).

It should use the mw-ui-vform compact layout style, though we don't yet have the CSS for the Agora invalid form field styling. It doesn't seem to use HTMLForm at all, building its own form out of table elements.

Improving this form could be a nice OPW job.


Version: 1.22.0
Severity: minor
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=40909
https://bugzilla.wikimedia.org/show_bug.cgi?id=69723
https://bugzilla.wikimedia.org/show_bug.cgi?id=70676

Details

Reference
bz56363

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:21 AM
bzimport set Reference to bz56363.

(In reply to comment #0)

There's more that could be fixed on this form.
For grins, enter valid/invalid e-mail... you get weird green and pink
client-side validation "strips" (and the browser's own type="email" HTML5
validation warning when you submit).

At least the duplicate warnings have been fixed, see https://bugzilla.wikimedia.org/show_bug.cgi?id=40909

Change 121975 had a related patch set uploaded by Ganeshaditya1:
(Bug 56363) ChangeEmail special page rewritten to use vforms.

https://gerrit.wikimedia.org/r/121975

So to summarise this bug:

  • Add mw-ui-vform class to form with id mw-changeemail-form
  • Render errors and success messages inside the form with the errorbox class as outlined in MediaWiki UI / VForm section.

Is the patch still being worked on?

  • Bug 70426 has been marked as a duplicate of this bug. ***

Should we also remove the cancel button as part of this? It seems strange to have a cancel button in this context.

Change-Id: I629cee4264fad6cde98495c0e8daffe5ea245b48 converted Special:ChangeEmail to use HTMLForm, now it just needs updating to use vform styling which should be much easier now.

Cancel just returns an error for me now anyway.

(In reply to Jared Zimmerman (WMF) from comment #7)

Cancel just returns an error for me now anyway.

On what wiki? It works for me on production English Wikipedia as well as Beta Labs English Wikipedia.

I agree a cancel button is not really useful here, but in the meantime we should not be showing errors for it.

... or we could just remove the cancel button.

I like the "It causes problems? Remove it!" approach, we should do this more often. I wonder which extensions cause the most trouble, maybe we should remove them? :>

Even if we do remove it, I would still like to know what the error is.

When I hit cancel I get the error "Enter a valid email address" which seems to imply its doing form validation, on cancel, which is very odd.

(In reply to Jared Zimmerman (WMF) from comment #13)

When I hit cancel I get the error "Enter a valid email address" which seems
to imply its doing form validation, on cancel, which is very odd.

Confirmed. This is present in production too.

I think the reason I couldn't reproduce it before is that it only happens after you've blurred the email field. You get one chance to type a valid email, then on blur it starts warning you if it's not valid.

As you say, it validates it on cancel too, which is a bug (filed as bug 70676).

Change 161339 had a related patch set uploaded by Prtksxna:
SpecialChangeEmail: Remove cancel button

https://gerrit.wikimedia.org/r/161339

Change 161340 had a related patch set uploaded by Prtksxna:
SpecialChangeEmail: Use vform and remove wrapper

https://gerrit.wikimedia.org/r/161340

Change 161339 merged by jenkins-bot:
SpecialChangeEmail: Remove cancel button

https://gerrit.wikimedia.org/r/161339

Change 161340 merged by jenkins-bot:
SpecialChangeEmail: Use vform and remove wrapper

https://gerrit.wikimedia.org/r/161340

Change 121975 abandoned by Jdlrobson:
ChangeEmail special page rewritten to use vforms.

Reason:
Prateek just resolved the bug. Thanks for the help getting us there Ganeshaditya1! :)

https://gerrit.wikimedia.org/r/121975