Page MenuHomePhabricator

Use Codex Field component (with Codex - inline -Message) for Special:CreateAccount validation
Open, MediumPublic

Assigned To
Authored By
AAlhazwani-WMF
Feb 6 2026, 10:13 AM
Referenced Files
F75830348: Screenshot 2026-04-13 at 12.00.34.png
Apr 13 2026, 10:06 AM
F75830269: Screenshot 2026-04-13 at 11.57.57.png
Apr 13 2026, 10:06 AM
F74830145: Screenshot 2026-04-02 at 13.56.38.png
Apr 2 2026, 11:58 AM
F74829091: Screenshot 2026-04-02 at 13.33.12.png
Apr 2 2026, 11:58 AM
F74829092: Screenshot 2026-04-02 at 13.32.41.png
Apr 2 2026, 11:58 AM
F71701299: image.png
Feb 6 2026, 10:13 AM
F71701410: image.png
Feb 6 2026, 10:13 AM
F71701374: image.png
Feb 6 2026, 10:13 AM

Description

Summary:
As we start working on T415659: [V1 test] Redesign mobile web account creation form following Codex guidelines we'd like to rely on existing Codex components and validation props to enable us to run experiments in the account creation space.

This task involves updating the Special:CreateAccount page to use Codex Field components that come with built-in props and validation messaging capabilities.

Background:
This work establishes the foundation needed to experiment with:

  • Feedback patterns during account registration
  • Interaction patterns for form validation
  • How the system communicates with and guides people registering on Wikipedia

By implementing Codex Field components with inline validation messages, we'll have a flexible base for testing different approaches to user guidance and error messaging in the account creation flow.

Design:

BeforeAfter
image.png (804×1,748 px, 384 KB)
image.png (750×1,624 px, 163 KB)
image.png (804×1,748 px, 390 KB)
image.png (750×1,624 px, 165 KB)
Acceptance Criteria:
  • Special:CreateAccount uses Codex Field components for form inputs
  • Validation messages use Codex inline Message component
  • Component implementation supports experimentation with different validation patterns and messaging
  • In addition to changing the dynamically added created messages, it is also approved to change the way errors messages are displayed in HTMLForm in general.

Event Timeline

KStoller-WMF moved this task from Product Backlog to Needs Refinement on the Growth-Team board.

Note that we some of the fields rely on browser validation for some fields. We don't need to update those warnings as part of this task.

HTMLForm on its "codex" variant already uses Codex field components. The first two acceptance criteria are already met by current status quo:

  • Special:CreateAccount uses Codex Field components for form inputs
  • Validation messages use Codex inline Message component

The third AC Component implementation supports experimentation with different validation patterns and messaging it's a bit confusing. SpecialCreateAccount does not use VueJS for generating the form, it uses Codex CSS-only version of some components, namely CdxMessage,CdxField,CdxLabel,CdxButton,CdxCheckbox,CdxRadio,CdxSelect,CdxTextArea,CdxTextInput. That means that we can display HTML that looks like the Codex JS component version but has zero behavour and logic.

As per the last AC In addition to changing the dynamically added created messages, it is also approved to change the way errors messages are displayed in HTMLForm in general. We should clarify that there are three types of validation messages in this form. Live validation errors (shown as block below the field input), post-submit validation errors (shown as block below the field input same as prior) and post-submit umbrella top form error message (show as message block above the first field of the form).

From all criteria here, the only actionable that I've found is using cdx-message--inline instead of cdx-message--block for live and post-submit validation errors. This is how it looks when we mix live validation errors with post-submit errors. If this outcome is acceptable, the change is trivial. If we also want to change the top form error, that's also doable but need a confirmation, at first glance inline message does not look appropriate for that case, so leaving as it is makes sense. cc @AAlhazwani-WMF for confirmation.

Screenshot 2026-04-02 at 13.32.41.png (758×1,356 px, 182 KB)
Screenshot 2026-04-02 at 13.33.12.png (764×1,350 px, 169 KB)
Screenshot 2026-04-02 at 13.56.38.png (992×1,518 px, 208 KB)
Live validationTop error + live validationTop error + post submit validation

Change #1267000 had a related patch set uploaded (by Sergio Gimeno; author: Sergio Gimeno):

[mediawiki/core@master] HTMLFormField: use codex inline message for validation messages

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

Sgs moved this task from Needs Estimation to FY2025-26 Q3 Sprint 6 on the Growth-Team board.
Sgs edited projects, added: Growth-Team (FY2025-26 Q3 Sprint 6); removed: Growth-Team.
Sgs moved this task from Incoming to Code Review on the Growth-Team (FY2025-26 Q3 Sprint 6) board.

This is how it looks when we mix live validation errors with post-submit errors. If this outcome is acceptable, the change is trivial. If we also want to change the top form error, that's also doable but need a confirmation, at first glance inline message does not look appropriate for that case, so leaving as it is makes sense. cc @AAlhazwani-WMF for confirmation.

I think we talked about this error-message at the top: it is fine to remain as a block-styled error message. Only the ones directly associated with an input should change to the inline style.

I think we talked about this error-message at the top: it is fine to remain as a block-styled error message. Only the ones directly associated with an input should change to the inline style.

Ack. Also, for clarity, this change can be released as regular improvement, not platform specific, and it is not part of any create account experiment right?

I think we talked about this error-message at the top: it is fine to remain as a block-styled error message. Only the ones directly associated with an input should change to the inline style.

Ack. Also, for clarity, this change can be released as regular improvement, not platform specific, and it is not part of any create account experiment right?

Yes! Though it would be great to have it before v2 starts. But it is perfectly fine to arrive in the middle of v1.

Test wiki created on Patch demo by SGimeno (WMF) using patch(es) linked to this task:
https://07cef92349.catalyst.wmcloud.org/w/

Test wiki on Patch demo by SGimeno (WMF) using patch(es) linked to this task was deleted:

https://07cef92349.catalyst.wmcloud.org/w/

Test wiki created on Patch demo by SGimeno (WMF) using patch(es) linked to this task:
https://ad7f3db79a.catalyst.wmcloud.org/w/

Yes! Though it would be great to have it before v2 starts. But it is perfectly fine to arrive in the middle of v1.

I am now reluctant to release this change before v2 as it would create a non-ideal experience for "several validation errors" scenario, where error messages are stacked as ul.li items, the non-wrapped design of validation inline messages, generates a lot of text flying around, eg:

Screenshot 2026-04-13 at 11.57.57.png (794×1,538 px, 200 KB)
Screenshot 2026-04-13 at 12.00.34.png (788×1,516 px, 202 KB)
All/control V2treatment V2

Note on placement: Also observe the inconsistency on the inline message placement, while in current experience it is below the input and above the help message, in experiment V2 treatment it is the other way around. The latter follows Codex field validation guidelines.

This changes can affect the control group, and since we don't have a current baseline, make the analysis of results more complex. Thoughts? @Michael @AAlhazwani-WMF @KStoller-WMF

I'm fine with waiting and releasing this as part of V2.
I updated the release task to make that clearer: T422295: [V2 experiment release] Mobile web account creation form improvements + username TL;DR

Test wiki on Patch demo by SGimeno (WMF) using patch(es) linked to this task was deleted:

https://ad7f3db79a.catalyst.wmcloud.org/w/