[go: up one dir, main page]

Page MenuHomePhabricator

TOC should float on larger screen sizes when the "hide" button is pressed
Closed, ResolvedPublic2 Estimated Story Points

Description

Background

If the TOC is collapsed (either because the screen is narrow, or someone has pressed the "hide" button), a button is present that allows you to access it. This button appears at the top of the page, or if you are scrolled down it appears as a floating button. This task is about ensuring that the floating button is present in the specific case of logged-out, above 1000px, and scrolled down the page.

Current TOC button availability when scrolled down the page:

logged-inlogged-out
below 1000px
above 1000px✅ (in sticky header)

QA Steps

Expected:
Floating TOC button is present on the page

Screen Shot 2022-08-22 at 3.56.34 PM.png (740×758 px, 143 KB)

Actual:
No floating TOC button is present on the page

AC

  • TOC floats to top left corner of the page when the "hide" button is pressed, user scrolls past the page title, the sticky header isn't present, and on larger screensizes

Developer notes

Should be a small CSS change in TableOfContentsUnpinned.less
Adding a case for .vector-below-page-title and .vector-toc-unpinned:not( .vector-sticky-header-visible )

QA Results - Beta

ACStatusDetails
1T315932#8639557

QA Results - Prod

ACStatusDetails
1T315932#8665151

Event Timeline

bwang renamed this task from TOC should float on larger screen sizes when the sticky header isn't present to TOC should float on larger screen sizes when the "hide" button is pressed.Aug 22 2022, 9:01 PM
bwang updated the task description. (Show Details)
Jdlrobson updated the task description. (Show Details)
ovasileva triaged this task as Medium priority.Aug 29 2022, 1:57 PM
ovasileva moved this task from Incoming to Current Fiscal Year on the Web-Team-Backlog board.

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

[mediawiki/skins/Vector@master] Refactor unpinned TOC styles to be simpler, enable floating TOC style for anon users above tablet viewports

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

LGoto set the point value for this task to 2.Feb 9 2023, 6:23 PM

@alexhollender_WMF As I was working on this I realized I didnt ever check how this would look on large screens, so I wanted to check with you on how this looks:

small viewports

Screenshot 2023-02-14 at 11.23.22 AM.png (1×1 px, 297 KB)

wide viewports

Screenshot 2023-02-14 at 11.20.15 AM.png (1×2 px, 562 KB)

extra wide viewports

Screenshot 2023-02-14 at 11.21.22 AM.png (1×3 px, 836 KB)

@alexhollender_WMF As I was working on this I realized I didnt ever check how this would look on large screens, so I wanted to check with you on how this looks:

those all look fine to me. for the extra wide it would be nice to keep the icon within the page boundary (white part), but not a big concern either way. also would it make sense to do this at the same time T320453: [subtask] Update styling and position of floating TOC button?

Change 879149 abandoned by Bernard Wang:

[mediawiki/skins/Vector@master] Refactor unpinned TOC styles to be simpler, enable floating TOC style for anon users above tablet viewports

Reason:

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

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

[mediawiki/skins/Vector@master] Ensure hidden TOC is visible below the page title on large viewports for anon users

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

@alexhollender_WMF I think that makes the most sense. @ovasileva is it ok for me to pull T320453 into the sprint?

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

[mediawiki/skins/Vector@master] Ensure hidden TOC is visible below the page title on large viewports for anon users

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

Change 889190 abandoned by Bernard Wang:

[mediawiki/skins/Vector@master] Ensure hidden TOC is visible below the page title on large viewports for anon users

Reason:

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

Change 889828 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Shows TOC below page title for anon users

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

Test Result - Beta

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

Test Artifact(s):

QA Steps

Visit a page with a TOC (e.g. https://en.wikipedia.org/wiki/Oscar_Isaac?useskin=vector-2022) in an incognito window (i.e. logged-out), with a screen wider than 1000px
Click "hide" on table of contents
Scroll down page
Expected:
Floating TOC button is present on the page

✅ AC1: TOC floats to top left corner of the page when the "hide" button is pressed, user scrolls past the page title, the sticky header isn't present, and on larger screensizes

Screen Recording 2023-02-22 at 6.26.33 PM.mov.gif (818×1 px, 2 MB)

Edtadros subscribed.

Test Result - Prod

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

Test Artifact(s):

QA Steps

Visit a page with a TOC (e.g. https://en.wikipedia.org/wiki/Oscar_Isaac?useskin=vector-2022) in an incognito window (i.e. logged-out), with a screen wider than 1000px
Click "hide" on table of contents
Scroll down page
Expected:
Floating TOC button is present on the page

✅ AC1: TOC floats to top left corner of the page when the "hide" button is pressed, user scrolls past the page title, the sticky header isn't present, and on larger screensizes

Screen Recording 2023-03-01 at 4.34.20 PM.mov.gif (786×1 px, 1 MB)

Screen Recording 2023-03-01 at 4.33.13 PM.mov.gif (786×1 px, 1 MB)

Looks good, resolving!