Page MenuHomePhabricator

Add History to article toolbar for all logged-in users
Closed, ResolvedPublic2 Estimated Story Points

Assigned To
Authored By
alexhollender_WMF
Sep 11 2019, 6:50 PM
Referenced Files
F31502567: image.png
Jan 6 2020, 5:12 PM
F31502558: image.png
Jan 6 2020, 5:04 PM
F31502561: image.png
Jan 6 2020, 5:04 PM
F31502536: image.png
Jan 6 2020, 4:28 PM
F31502538: image.png
Jan 6 2020, 4:28 PM
F31482990: T232652-2en.png
Dec 19 2019, 8:33 PM
F31483020: T232652-4en.png
Dec 19 2019, 8:33 PM
F31483012: T232652-2ben.png
Dec 19 2019, 8:33 PM

Description

Description

The History icon will appear in the article toolbar for all logged-in users.

Acceptance criteria

  • wgMinervaHistoryInPageActions should only apply to logged in users. Make sure this is true!
  • Tapping on the History icon will lead (logged-in, non-AMC) users to the simplified mobile version of History.
  • The default in Minerva should match the deployed version. Update skin.json after the deploy has been successful.

Designs

AndroidiOS
image.png (669×377 px, 156 KB)
image.png (669×377 px, 156 KB)

Developer notes

There is currently no flag for "logged in mode". Should there be?

Using the existing implementation we could make

wgMinervaHistoryInPageActions['base'] = true

and add a check for whether the user is logged in or not in the logic.

A later task can remove wgMinervaHistoryInPageActions altogether

QA Steps

  1. go to beta cluster as anon user
  2. go to any article page and check that the history icon is not visible in the toolbar
  3. log in as test user
  4. redo step two, but this time verify that history icon exists
  5. select history icon and verify that the mobile version of the history page opens
  6. redo step two with AMC on, verify that history icon exists
  7. select history icon and verify that the expanded version of the history page opens

QA results

Event Timeline

ovasileva triaged this task as Medium priority.Sep 12 2019, 1:16 PM

Where does history link to? The AMC version or the current mobile simplified version?

Where does history link to? The AMC version or the current mobile simplified version?

Simplified version. I updated the task description.

@Alex I just want to confirm - those mocks are not in sync, right? We do not show a different toolbar for Android and iOS.

The Android mock shows the mobile mode in the AMC mode without overflow menu (icons are spread through the width of toolbar - same margins for all icons)
The iOS mock shows the mobile mode in regular mode - language icon is on left, all icons goes to the right.

@Alex I just want to confirm - those mocks are not in sync, right? We do not show a different toolbar for Android and iOS.

The Android mock shows the mobile mode in the AMC mode without overflow menu (icons are spread through the width of toolbar - same margins for all icons)
The iOS mock shows the mobile mode in regular mode - language icon is on left, all icons goes to the right.

On Android the download action appears, which means there are 5 icons in the toolbar and they should be spaced out evenly. On iOS there are only 4 icons in the toolbar. Is it possible for us to do this layout?

@alexhollender everything is possible, but that's probably a new task. Also, please note, that the DownloadIcon is injected via JS, thus it may cause FOUC when we decide to change styling based on the number of icons in the toolbar.

How DownloadIcon works - after we render the page, the JS that tests browser printing ability. When the print feature is available system will inject Download Icon.

ovasileva set the point value for this task to 2.Sep 24 2019, 4:25 PM

@pmiazga Would it be wise to add another user mode under includes/features in MF to account for logged in users?

Change 540378 had a related patch set uploaded (by Pmiazga; owner: Pmiazga):
[mediawiki/extensions/MobileFrontend@master] Introduce new 'loggedin' mode

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

Change 549190 had a related patch set uploaded (by Pmiazga; owner: Pmiazga):
[mediawiki/extensions/MobileFrontend@master] Provide an AudienceMode to limit certain features to given audience

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

ovasileva raised the priority of this task from Medium to High.Dec 10 2019, 1:33 PM

Change 549190 abandoned by Pmiazga:
Provide an AudienceMode to limit certain features to given audience

Reason:
it was POC, we don't need it now, there is no need to go that direction yet

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

Change 540378 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Introduce new 'loggedin' mode

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

Change 556440 had a related patch set uploaded (by Pmiazga; owner: Pmiazga):
[operations/mediawiki-config@master] Add History to article toolbar for all logged-in users

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

Change 556440 abandoned by Pmiazga:
Add History to article toolbar for all logged-in users

Reason:
decided to update the skin.json version in repo to keep experience for 3rd parties consistent with prod config.

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

Change 557100 had a related patch set uploaded (by Pmiazga; owner: Pmiazga):
[mediawiki/skins/MinervaNeue@master] Add History icon and Article/Talk tabs to default loggedin experience

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

Change 557100 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Add History icon and Article/Talk tabs to default loggedin experience

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

pmiazga updated the task description. (Show Details)

QA (beta cluster) - passed

tested on: chrome desktop 79.0.3945.79, chrome mobile 78.0.3904.108 Android 9

  1. go to beta cluster as anon user
  2. go to any article page and check that the history icon is not visible in the toolbar

Screen Shot 2019-12-17 at 11.38.59 AM.png (954×2 px, 210 KB)

Screenshot_2019-12-17-11-42-27-503_com.android.chrome.jpg (2×1 px, 235 KB)

  1. log in as test user
  2. redo step two, but this time verify that history icon exists

Screen Shot 2019-12-17 at 11.40.09 AM.png (1×2 px, 233 KB)

Screenshot_2019-12-17-11-43-42-834_com.android.chrome.jpg (2×1 px, 233 KB)

  1. select history icon and verify that the mobile version of the history page opens

Screenshot_2019-12-17-11-51-52-038_com.android.chrome.jpg (2×1 px, 89 KB)

  1. redo step two with AMC on, verify that history icon exists

Screen Shot 2019-12-17 at 11.40.58 AM.png (740×2 px, 216 KB)

Screenshot_2019-12-17-11-43-19-307_com.android.chrome.jpg (2×1 px, 226 KB)

  1. select history icon and verify that the expanded version of the history page opens

Screenshot_2019-12-17-11-52-12-548_com.android.chrome.jpg (2×1 px, 168 KB)

QA (Wikimedia) - ✅Passed

tested on: chrome desktop 79.0.3945.79, iPhone X

  1. go to beta cluster as anon user

✅2. go to any article page and check that the history icon is not visible in the toolbar

T232652-1.png (2×1 px, 231 KB)

  1. log in as test user

✅4. redo step two, but this time verify that history icon exists

T232652-2.png (2×1 px, 261 KB)

✅5. select history icon and verify that the mobile version of the history page opens

T232652-3.png (2×1 px, 189 KB)

✅6. redo step two with AMC on, verify that history icon exists

T232652-4.png (2×1 px, 258 KB)

✅7. select history icon and verify that the expanded version of the history page opens

T232652-5.png (2×1 px, 236 KB)

@Edtadros - were you able to test on mediawiki? The screenshots above seem to be from the beta cluster.

Verified on hewiki:
logged out:

Screen Shot 2019-12-19 at 11.36.12 AM.png (1×998 px, 357 KB)

amc:
Screen Shot 2019-12-19 at 11.35.51 AM.png (1×990 px, 355 KB)

  • history link leads to special history page

logged-in:

Screen Shot 2019-12-19 at 11.35.34 AM.png (1×996 px, 352 KB)

  • history link leads to mobile history
Edtadros subscribed.

QA (Wikimedia) - ✅Passed

tested on: chrome desktop 79.0.3945.79, iPhone X

  1. go to beta cluster as anon user

✅2. go to any article page and check that the history icon is not visible in the toolbar

T232652-1en.png (2×1 px, 338 KB)

  1. log in as test user

✅4. redo step two, but this time verify that history icon exists

T232652-2en.png (2×1 px, 998 KB)

✅5. select history icon and verify that the mobile version of the history page opens

T232652-2ben.png (2×1 px, 255 KB)

✅6. redo step two with AMC on, verify that history icon exists

T232652-3en.png (2×1 px, 268 KB)

✅7. select history icon and verify that the expanded version of the history page opens

T232652-4en.png (2×1 px, 302 KB)

There seems to be one issue here (only affecting iOS) — not sure if we want to re-open this task or create a new one?

For logged-in, non-AMC users the icons in the toolbar are incorrectly spaced:

currentdesign
mobile
image.png (1×750 px, 195 KB)
image.png (669×377 px, 156 KB)
desktop
image.png (740×1 px, 82 KB)
image.png (740×1 px, 82 KB)

Could be related to T240868, though that issue seems to have gone away.

I think the challenge here is the download icon is conditional. It would be great to fix that (we have the print service after all.. we're just not using it) or push the overflow menu to all users and leave the download icon in there. Fixing T201954 would remove the need for knowing about, maintaining and testing 2 different page action layouts and would be my recommendation here.

Is the layout broken on Chrome with JS disabled as well?

Ah right, I forgot to check desktop. I've updated my comment above to include screenshots from desktop.

Is the layout broken on Chrome with JS disabled as well?

Yes, here is Chrome on Android with JS disabled:

image.png (691×389 px, 92 KB)