Page MenuHomePhabricator

Updates to user page treatment (apply for IP address and always show toolbar)
Closed, ResolvedPublic3 Story Points

Description

User:<ip> pages do not get treated the same as User:<username>. We will update user pages so this is the case and make sure the toolbar always shows.

Description

T201339 made it possible to navigate to the empty-state of a non-existent/redlink userpage, and therefore reach contributions, talk, etc. However this fix did not solve the issue for IP non-existent/redlink userpages. Additionally we would like the toolbar to be shown on non-existent/redlink userpages.

When clicking on an IP redlink, one should land on the empty-state of the IP userpage, rather than being prompted to create it.

Design

redlink userpageredlink IP userpage

Acceptance criteria

  • Always show the page actions on a user page (AMC & non-AMC)
  • If a user page exists (e.g. https://en.m.wikipedia.org/wiki/User:127.0.0.1) then the talk/contributions/upload bar and page actions bar shows (AMC & non-AMC)
  • If a user page doesn't exist but is an IP address (e.g. https://en.m.wikipedia.org/wiki/User:66.87.68.6) then the talk/contributions/upload bar shows as well as the page actions and the call to action (to edit the page) is shown. (AMC & non-AMC)

QA steps:

The "User" namespace page on mobile should be verified to continue to work as expected. In general, the flowchart in the comments below outlines the correct behaviour for the user namespace page.

  • Confirm that the page-actions menu is present on user pages for: existing users, non-existing users, IP users, and "own" user page when logged in.
  • Confirm The "talk contributions uploads" menu appears underneath the page-actions menu.
  • Confirm all user page contain the "talk, contributions, uploads" menu for all user pages.
  • Confirm IP user pages that have not been created, show the large gray box saying "No user page... create a page"
  • Confirm IP user pages that have been created, still show the content of the page.

An IP user page is something like: https://en.m.wikipedia.org/wiki/User:127.0.0.1 or https://en.m.wikipedia.org/wiki/User:66.87.68.6

Developer notes

SkinUserPageHelper::isUserPage is the problem here. It checks if a user exists
User::isIP should also be used here to make the treatment work.

An update to SkinMinerva::isAllowedPageAction will be needed to remove the disabling of page actions

QA Results

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 4 2019, 2:18 PM
Jdlrobson renamed this task from Improve non-existent/redlink IP userpage experience to Updates to user page treatment (apply for IP address and always show toolbar).Apr 4 2019, 4:25 PM
Jdlrobson updated the task description. (Show Details)

@Jdlrobson for both IP and non-IP redlink userpages would it be preferable to show the toolbar? We discussed a similar case in T211775 recently. If so, happy to create a separate task for this.

redlink userpageredlink IP userpage
without toolbar
with toolbar
Jdlrobson updated the task description. (Show Details)Apr 4 2019, 4:30 PM

@Jdlrobson for both IP and non-IP redlink userpages would it be preferable to show the toolbar?

For consistency, possibly. Would you want to show the page actions for all modes (doing for all modes would be relatively simple).

I believe we didn't show the "page actions" toolbar as it competed with the primary call to action here which was suggested to be "create the user page". When displaying the page actions bar, the cta is pushed down the page.

In the page actions for this page, the languages icon will always be disabled and the usefulness of the watch star is questionable. Obviously in AMC mode there are other actions (right now history), so this might change things.

ovasileva triaged this task as Normal priority.Apr 10 2019, 12:46 PM
ovasileva set the point value for this task to 3.Apr 10 2019, 4:50 PM

@Jdlrobson

For consistency, possibly. Would you want to show the page actions for all modes (doing for all modes would be relatively simple).

Can you clarify what you mean by all modes?

I believe we didn't show the "page actions" toolbar as it competed with the primary call to action here which was suggested to be "create the user page". When displaying the page actions bar, the cta is pushed down the page.

Good point. I'd like to create a sub-task/separate task to revise the layout of the gray box empty state. Thoughts? Related, would it make sense to use a similar treatment for non-existent article pages, rather than this one?

In the page actions for this page, the languages icon will always be disabled and the usefulness of the watch star is questionable. Obviously in AMC mode there are other actions (right now history), so this might change things.

Perhaps I misunderstood your comment here: T211775#4817560. To me it seemed like a valid reason for having the watchstar even on non-existent article pages.

Can you clarify what you mean by all modes?

All possible combinations of: logged in, anon, Advanced mobile contributions mode, normal mode (stable), beta mode

Related, would it make sense to use a similar treatment for non-existent article pages, rather than this one?

Bear in mind, editors currently edit https://en.m.wikipedia.org/wiki/MediaWiki:Noarticletext to provide the desktop version. Ideally, this would be the place to make such a change. I consider the user page handling in MobileFrontend something that mediawiki core should really be handling with the same mechanism.

Perhaps I misunderstood your comment here: T211775#4817560. To me it seemed like a valid reason for having the watchstar even on non-existent article pages.

Sure. This is a user page though, which has different use cases.

@Jdlrobson:

  • yes, let's make the change for all modes.
  • good point about userpages vs. article pages. I think it's fine to include it.
  • desktop vs. mobile version of empty state... sounds like we should aim to eventually resolve this

@Jdrewniak there might be an additional case to consider here, though maybe it's the same thing as a non-existent/redlink userpage: user pages that exist on a different wiki than you're currently on. For example when viewing https://es.m.wikipedia.org/wiki/Usuario:AHollender_(WMF) no toolbar appears. It is unclear to me whether or not that userpage exists. It's displaying the content from the en.wiki version of the userpage, but when viewed on desktop it has a "Create" button.

Change 512128 had a related patch set uploaded (by Jdrewniak; owner: Jdrewniak):
[mediawiki/skins/MinervaNeue@master] Treat User IP pages as UserPages

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

user pages that exist on a different wiki

Good point. I'm not sure how those kinds of pages will work. My guess is that they will show up as an "existing" page, and not as a red-link page. I think it has a "create" button on desktop because you might be able to override that page by creating a local version of it. I'm not sure how to test this behaviour locally though, so I'll need to dig into it a little more to see what happens.

Change 512159 had a related patch set uploaded (by Jdrewniak; owner: Jdrewniak):
[mediawiki/extensions/MobileFrontend@master] Display styled banner on non-existing user IP pages

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

The workflow for when to display the stylized pages and when not was a little confusing to me at first, so I made this chart to help me step through each scenario. Maybe it'll helpful for QA or something.

"page banner" - the stylized mobile-specific page.
"own page page" - the stylized mobile-specific page that says "create your page"
"Template:No_article_text" - the wiki-specific page template
"page content" - The content of an existing page
source

Change 512159 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Display styled banner on non-existing user IP pages

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

Jdrewniak updated the task description. (Show Details)Thu, May 30, 2:56 PM
nray added a subscriber: nray.Thu, May 30, 9:22 PM

The workflow for when to display the stylized pages and when not was a little confusing to me at first, so I made this chart to help me step through each scenario. Maybe it'll helpful for QA or something.

"page banner" - the stylized mobile-specific page.
"own page page" - the stylized mobile-specific page that says "create your page"
"Template:No_article_text" - the wiki-specific page template
"page content" - The content of an existing page
source

thanks @Jdrewniak, I was confused about the states and this diagram helped me make sense of what should happen.

Change 513496 had a related patch set uploaded (by Jdrewniak; owner: Jdrewniak):
[mediawiki/extensions/MobileFrontend@master] HYGIENE exit domParse early for User namespace

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

Change 513496 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] HYGIENE exit domParse early for User namespace

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

Change 512128 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Treat anonymouse user IP pages as UserPages

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

@pmiazga Where do I test this?

Edtadros reassigned this task from Edtadros to pmiazga.
Edtadros added a subscriber: Edtadros.

Test Result

Status: ❌ FAIL
OS: macOS Mojave
Browser: Chrome
Device: MBP
Emulated Device: iPhoneX

Test Artifact(s):

QA steps:

✅ AC1: Confirm that the page-actions menu is present on user pages for: existing users, non-existing users, IP users, and "own" user page when logged in.

existingnon-existingIP existingIP non-existingown

✅ AC2: Confirm The "talk contributions uploads" menu appears underneath the page-actions menu.
See above

❌ AC3: Confirm all user page contain the "talk, contributions, uploads" menu for all user pages.
Does not appear for non-existing user. See above

✅ AC4: Confirm IP user pages that have not been created, show the large gray box saying "No user page... create a page"
See above

✅ AC5: Confirm IP user pages that have been created, still show the content of the page.
See above

Edtadros updated the task description. (Show Details)Thu, Jun 6, 4:59 PM

@Edtadros it seems that the QA steps are out of sync with the Acceptance criteria, from the description:

(#2) If a user page exists (e.g. https://en.m.wikipedia.org/wiki/User:127.0.0.1) then the talk/contributions/upload bar and page actions bar shows (AMC & non-AMC)

The behavior you documented above is correct/expected.

reflecting reality,looks like the QA steps are out of sync with AC.

Edtadros updated the task description. (Show Details)Wed, Jun 12, 11:50 PM

looks good! @Jdrewniak - is this feature flagged?

@ovasileva nope, it's available for all. e.g. an IP userpage: https://en.m.wikipedia.org/wiki/User:66.87.68.6

ovasileva closed this task as Resolved.Thu, Jun 13, 3:00 PM

@ovasileva nope, it's available for all. e.g. an IP userpage: https://en.m.wikipedia.org/wiki/User:66.87.68.6

Ooh, and it's already out. Perfect. Resolving then!