Page MenuHomePhabricator

Create account's Simple captcha is badly laid out in latest .mw-ui-vform
Closed, ResolvedPublic

Description

poor layout of SimpleCaptcha in Create account form

.mw-ui-vform wants to style its contents as chunky full-width blocks. It used to only apply this to elements that are immediate children of its divs. As I understand it, this was so arbitrary HTML dropped in the form wouldn't get unexpectedly styled, but sometimes you want it and sometimes not.

Gerrit 121842 fix for Bug 63233 removed the div parent from the selector so all labels and input field within .mw-ui-form get the styling. Now QuestyCaptcha looks great, but the layout of SimpleCaptcha is degraded. Its HTML includes

<p><label for="wpCaptchaWord">9−4</label> = <input name="wpCaptchaWord" id="wpCaptchaWord" size="5" autocomplete="off" tabindex="1" /></p>

which normally displays as plain

9−4 = [     ]

but now the mw-ui-vform CSS gives the label display:block and different alignment, and gives the input field display:block and width 100%. The result (see attachment) is

9−4

[width 100% text area ]

I'm not sure what the best fix is. SimpleCaptcha could move the = into the label to reduce it to two lines, and override the full-width input field with style="width:auto;".

The CAPTCHA's same chunk of HTML appears elsewhere. The create account form reformats and restyles the FancyCaptcha image CAPTCHA, but it would be a lot of work to restyle other captchas.


Version: unspecified
Severity: normal

Attached:

2014-04-07_Create_account_after_bug_63233.png (289×345 px, 16 KB)

Details

Reference
bz63606

Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 22 2014, 3:19 AM
bzimport set Reference to bz63606.
bzimport added a subscriber: Unknown Object (MLST).

The "=" definitely looks like it should be moved inside of the <label/>,
and I would actually stop at this point – seems like it should look good enough
and consistent with everything else (the form and other captchas).

Change 124357 had a related patch set uploaded by Bartosz Dziewoński:
SimpleCaptcha: Move the equals sign inside the <label/>

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

Could somebody review? We should fix this in time for 1.23 release.

Change 124357 merged by jenkins-bot:
SimpleCaptcha: Move the equals sign inside the <label/>

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

I asked the release managers to ensure this is included in the 1.23 tarball.
The extension bundling process is murky for me and I don't want to mess something up in the backporting.

(In reply to Bartosz Dziewoński from comment #5)

I asked the release managers to ensure this is included in the 1.23 tarball.
The extension bundling process is murky for me and I don't want to mess
something up in the backporting.

Due to https://gerrit.wikimedia.org/r/#/c/125706/ , unless we want to make 600 backports, I think we'll need to delete all REL1_23 branches and rebranch 1.23 for extensions in the coming days.

Change 130505 had a related patch set uploaded by Legoktm:
SimpleCaptcha: Move the equals sign inside the <label/>

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

Change 130505 merged by jenkins-bot:
SimpleCaptcha: Move the equals sign inside the <label/>

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

Backported to ConfirmEdit's REL1_23 branch.