Page MenuHomePhabricator

Hide TOC in print mode (Vector 2022)
Closed, ResolvedPublic2 Estimated Story Points

Description

Description

The table of contents is not critical when printing an article. In a perfect world we would give people the option to include it if they want when printing the article. For now we will hide it when printing the article. (Link to village pump discussion)

AC

  • Hide the TOC when printing an article

QA

Find an article with a table of contents in the sidebar. Click print.

  • There should be no table of contents in the article (note: Clare is turning off the A/B test on beta cluster on Mon June 13th and after that you should not be seeing any kind of table of contents in print mode on the the beta cluster)

Developer notes

Because of the new TOC's location in the DOM, in print mode it is going to go above the h1. Ideally it goes under the h1

QA Results - Beta

ACStatusDetails
1T306719#8013317

QA Results - Prod

ACStatusDetails
1T306719#8013320

Event Timeline

Jdlrobson subscribed.

Alex, is the table of contents helpful in print mode? If so, does it make sense to have it at the top of the printed page, or on a separate page, or to have a slightly different design?

I asked on village pump (link to discussion) and it seems like the popular opinion is that it depends on the article. @Jdlrobson perhaps in the future we could add a feature that allows people to choose if they want to include the table of contents?

alexhollender_WMF renamed this task from TOC should be styled for print mode in modern Vector to Hide TOC in print mode (Vector 2022).Jun 2 2022, 5:29 PM
alexhollender_WMF updated the task description. (Show Details)
alexhollender_WMF updated the task description. (Show Details)

Change 804428 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/skins/Vector@master] Hide TOC in print mode

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

bwang removed bwang as the assignee of this task.Jun 9 2022, 7:15 PM
bwang moved this task from Doing to Code Review on the Web-Team-Backlog (Kanbanana-FY-2021-22) board.

Change 804428 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Hide TOC in print mode and clean up other print styles

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

@Jdlrobson @bwang where should i test this? still seeing the TOC in the printed version on beta

Screen Shot 2022-06-13 at 12.37.30 PM.png (1×1 px, 794 KB)

Alex: I think we're currently only hiding the new table of contents. The legacy one is still there, but will disappear this week once the A/B test is completed.

Alex: I think we're currently only hiding the new table of contents. The legacy one is still there, but will disappear this week once the A/B test is completed.

okay. is there anything you want me to review?

just to note: the page i was looking at in beta has the new table of contents.

just to note: the page i was looking at in beta has the new table of contents.

Yep but we currently have both table of contents in the page for narrow screens.

okay. is there anything you want me to review?

If you check a printed article on English Wikipedia you'll see a table of contents at the top of the page: https://en.wikipedia.org/wiki/Kal%C4%81kaua%27s_1881_world_tour
Design review was checking that's gone. I think we can move this to QA.

@bwang I'm not sure it makes sense to hide the legacy table of contents since next week this will be a non-issue. What do you think?

@Jdlrobson for the purposes of QA: where can one check that the TOC is no longer included in print mode?

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Monterey
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

Find an article with a table of contents in the sidebar. Click print.

✅ AC1: There should be no table of contents in the article

Screen Recording 2022-06-18 at 6.28.45 PM.mov.gif (718×866 px, 2 MB)

Edtadros subscribed.

Test Result - Prod

Status: ✅ PASS
Environment: enwiki
OS: macOS Monterey
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

Find an article with a table of contents in the sidebar. Click print.

✅ AC1: There should be no table of contents in the article

Screen Recording 2022-06-18 at 6.31.22 PM.mov.gif (718×866 px, 2 MB)

Edtadros updated the task description. (Show Details)