Page MenuHomePhabricator

Add username policy popover to mobile account creation form
Open, HighPublic5 Estimated Story Points

Description

In the account creation form cleanup (T415659), we moved the "(username policy)" link into the username field description as a "Learn more" link within the text "Your username is public and cannot be made private later. Learn more." This follow-up task replaces the current behavior - navigating users away to the full username policy page - with an in-page popover that surfaces a TLDR of the policy, keeping users in the account creation flow.

User story & summary:

As a new user creating an account on mobile web, I want to preview a summary of the username policy without leaving the account creation form so that I can quickly understand the guidelines and choose an appropriate username.

Background & research:

Currently, tapping the "Learn more" link in the username field description navigates users away from the account creation page to the full username policy. This disrupts the registration flow and adds friction - especially on mobile, where navigating back requires extra steps. Surfacing a concise summary in a popover keeps users in context while still providing a path to the full policy if needed.

Design:

Scope: this task is scoped to Mobile only.

Figma designs

image.png (1×2 px, 914 KB)

Acceptance Criteria:

The popover should use the Codex Popover component (Codex Popover). The mobile version of the component is currently in review: https://gerrit.wikimedia.org/r/c/design/codex/+/1234447

AC1

  • Given I am on the account creation page on mobile web
  • When I tap the "Choose carefully" link in the username field description
  • Then a popover appears displaying a TLDR of the username policy

AC2

  • Given the username policy popover is open
  • When I read the popover content
  • Then I see a summary of the username policy as a bulleted list

AC3

AC4

  • Given the username policy popover is open
  • When I tap outside the popover or tap the close button
  • Then the popover is dismissed and I remain on the account creation page
Open questions:
  1. Which part of the username field description should serve as the link trigger for the popover? Options include the full "Learn more" text, just "public," or another approach.
    • "Choose carefully"
  2. Confirm the three bullet items for the username policy TLDR in the popover (current candidates based on existing policy page: "Don't use offensive, misleading, or promotional names," "Username must represent you as an individual, not an organization," "Consider privacy risks before using your real name").
    • image.png (480×750 px, 60 KB)
  3. Should the full username policy open in the same tab or in a new tab?
    • New tab

Event Timeline

KStoller-WMF moved this task from Product backlog to Needs Refinement on the Growth-Team board.
  1. Confirm the three bullet items for the username policy TLDR in the popover (current candidates based on existing policy page: "Don't use offensive, misleading, or promotional names," "Username must represent you as an individual, not an organization," "Consider privacy risks before using your real name").

from Wikipedia:Changing_username#Username_policy

Your new username must follow the username policy. Usernames must:

  • Not be inappropriate, profane, or offensive.
  • Not contain libelous, contentious, or non-public information.
  • Not be misleading by impersonating other users or implying that you have authority.
  • Not be the name of a company, organization, group; or imply that the account is shared with multiple people.
  • Not contain emoji, emoticons, or non-language symbols.
KStoller-WMF set the point value for this task to 5.

Change #1262131 had a related patch set uploaded (by Cyndywikime; author: Cyndywikime):

[mediawiki/core@master] Add username policy popover on mobile create account

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

@AAlhazwani-WMF, for "Username must represent you as an individual, not an organization." would it be more grammatical to start the sentence with "Your username must..."?

Username must represent you as an individual, not an organization

Just noting that some Wikimedia wikis do allow some organizational-usernames - e.g. Wikimedia Commons.

I'm also not completely sure right now about hard-coding some of these requirements into MediaWiki core (as it currently seems like might be happening, with apologies if I am incorrect) — e.g. how can we say that there aren't third-party wikis out there that encourage usernames that (e.g.) would completely go against the English Wikipedia's policies?
(That is to say, that it seems like username policies can be a very wiki-specific thing; and IMO we should be very cautious about hardcoding this sort of thing into core.)

Thanks for the feedback, @A_smart_kitten !

I'm also not completely sure right now about hard-coding some of these requirements into MediaWiki core (as it currently seems like might be happening, with apologies if I am incorrect) — e.g. how can we say that there aren't third-party wikis out there that encourage usernames that (e.g.) would completely go against the English Wikipedia's policies?

Short term we are only planning to A/B test this on English Wikipedia.
Long-term we hope to find language that is more general and can ideally work for any WMF-maintained wiki.

I'm not sure what the best strategy would be for that once we consider a broader release.

  • Remove that string about usernames needing to represent an individual and not an organization? (And let enwiki override the string and add that in if they think that's necessary for this succinct summary?)
  • Do we only enable this on wikis with GrowthExperiments?
  • Do we allow communities to adjust this via Community Configuration?
  • Something else?

Let us know if you have thoughts on how to approach this once we are ready for a wider rollout.
Or maybe @Urbanecm_WMF has a recommendation?

Thanks for the feedback, @A_smart_kitten !

I'm also not completely sure right now about hard-coding some of these requirements into MediaWiki core (as it currently seems like might be happening, with apologies if I am incorrect) — e.g. how can we say that there aren't third-party wikis out there that encourage usernames that (e.g.) would completely go against the English Wikipedia's policies?

Short term we are only planning to A/B test this on English Wikipedia.
Long-term we hope to find language that is more general and can ideally work for any WMF-maintained wiki.

I'm not sure what the best strategy would be for that once we consider a broader release.

  • Remove that string about usernames needing to represent an individual and not an organization? (And let enwiki override the string and add that in if they think that's necessary for this succinct summary?)
  • Do we only enable this on wikis with GrowthExperiments?
  • Do we allow communities to adjust this via Community Configuration?
  • Something else?

Let us know if you have thoughts on how to approach this once we are ready for a wider rollout.
Or maybe @Urbanecm_WMF has a recommendation?

Imo the string is fine as long as wikis have a way to override it – doesn't need to be CommunityConfig, creating a local version of the MediaWiki system message would work as well.
German Wikipedia is the larges wiki using GrowthExperiments which allows using non-personal organization accounts (we even have a verification system for those via dewiki's support team).

Long-term we hope to find language that is more general and can ideally work for any WMF-maintained wiki.

I'm not sure what the best strategy would be for that once we consider a broader release.
[...]
Let us know if you have thoughts on how to approach this once we are ready for a wider rollout.

Thanks for your response. I suppose that, from an engineering perspective, there are probably a few different ways in which this could potentially be achieved -- Growth Team engineers might have thoughts regarding which way(s) might be best for this situation.

I suppose the ‘traditional' way (that I'm aware of) for adding Wikimedia-specific text to system-messages is to override those messages within the WikimediaMessages extension. (I'm not sure whether that extension currently supports there being different message-overrides for different wikis, though -- if not, I guess that functionality might need to be added.)

Another potential idea (which I suppose could potentially be done in combination with some other idea(s)) might be to put this functionality behind a config variable/feature flag (that defaults to false), so that the popover is not enabled by default for all sites that run MediaWiki. My concern with the popover making some assumptions about a wiki's username policy (if it would) & it being enabled by default is that e.g. many third-party wiki operators may not even think to override these messages locally on their wiki, and might therefore - without even realising it - end up with a 'create-account' page that provides incorrect information to users about their wiki's username rules.

If it is deemed inevitable that this feature will make some assumptions about a username-policy that won't necessarily apply to all third-party wikis, I suppose that another option might be to add it to the WikimediaCustomizations extension instead, which is enabled on all Wikimedia wikis (as opposed to GrowthExperiments, which IIUC is only enabled on a subset of WMF wikis), rather than MW Core.

@AAlhazwani-WMF, for "Username must represent you as an individual, not an organization." would it be more grammatical to start the sentence with "Your username must..."?

thanks @Sdkb - i'll updated the mocks! cc @Cyndymediawiksim

Thanks for the feedback, @A_smart_kitten !

I'm also not completely sure right now about hard-coding some of these requirements into MediaWiki core (as it currently seems like might be happening, with apologies if I am incorrect) — e.g. how can we say that there aren't third-party wikis out there that encourage usernames that (e.g.) would completely go against the English Wikipedia's policies?

Short term we are only planning to A/B test this on English Wikipedia.
Long-term we hope to find language that is more general and can ideally work for any WMF-maintained wiki.

I'm not sure what the best strategy would be for that once we consider a broader release.

  • Remove that string about usernames needing to represent an individual and not an organization? (And let enwiki override the string and add that in if they think that's necessary for this succinct summary?)
  • Do we only enable this on wikis with GrowthExperiments?
  • Do we allow communities to adjust this via Community Configuration?
  • Something else?

Let us know if you have thoughts on how to approach this once we are ready for a wider rollout.
Or maybe @Urbanecm_WMF has a recommendation?

Let's not have this be a GrowthExperiments-only feature after the experiment is done. That is not a sensible subset of wikis.

I see a couple of ways forward:

  1. do this all in core, and choose more general messages that, if in doubt, lean towards being more restrictive (e.g. advice against organization-usernames). And if a wiki has a more liberal username policy, then they can override the message in the languages relevant for that wiki
  2. do this in core, and choose more general messages, and softly integrate with CommunityConfiguration to allow overriding the messages in various languages
  3. do this in WikimediaCustomizations, and integrate with CommunityConfiguration for the overrides

My suggestion would be approach 1.: If the popup turns out to actually be meaningfully used (which actually needs to be substantiated by experiment, I'm unsure whether that is really the case), then it is an improvement that ought to be available to all wikis, including 3rd party ones. And while overriding a message directly is more restrictive than using CC, this is not something that changes very often. We can still add support for CommunityConfiguration later, if we want, but skip the overhead of doing so until there is a clear need.

Change #1270024 had a related patch set uploaded (by Cyndywikime; author: Cyndywikime):

[mediawiki/extensions/GrowthExperiments@master] Wire the new core hook so we only turn on the "Choose carefully" username policy popover for people in a dedicated experiment.

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