Page MenuHomePhabricator

New Vector skin breaks "position: sticky" layouts
Closed, ResolvedPublicBUG REPORT

Description

In the desktop version of the Special:MediaSearch page on Commons, we have a sidebar panel that shows expanded preview information for a given search result. This element is intended to remain fixed on the right edge of the page as the user scrolls through the list of results. This is accomplished using a position: sticky rule.

This behavior no longer works in new vector (as currently deployed on Beta Commons or in a vagrant dev environment). The page in old vector on production commons still behaves as expected.

Steps to Reproduce:
Go to the Beta Commons MediaSearch page and search for a term. Example:
https://commons.wikimedia.beta.wmflabs.org/wiki/Special:MediaSearch?type=bitmap&q=cat

Click a result to expand the right-hand sidebar, then continue scrolling down the page.

Actual Results:
The sidebar scrolls out of view as the user continues down the page.

Expected Results:
The sidebar should remain "sticky" in the user's viewport.
See here for correct behavior in old vector: https://commons.wikimedia.org/wiki/Special:MediaSearch?type=bitmap&q=desert

QA Results - Beta

ACStatusDetails
1T271868#6765597

QA Results - Prod

ACStatusDetails
1T271868#6773341

Event Timeline

ovasileva triaged this task as Medium priority.Jan 13 2021, 5:40 PM

Change 654471 had a related patch set uploaded (by Jdlrobson; owner: Esanders):
[mediawiki/skins/Vector@master] Use padding margin-collapse hack instead of overflow

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

Change 654471 merged by jenkins-bot:
[mediawiki/skins/Vector@master] Use padding margin-collapse hack instead of overflow

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

Change 656489 had a related patch set uploaded (by Nray; owner: Nray):
[mediawiki/skins/Vector@master] Don't override vertical padding on .mw-page-container on tablet+ viewport width

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

Change 656489 merged by jenkins-bot:
[mediawiki/skins/Vector@master] Only override .mw-page-container horizontal padding on tablet+ viewport width

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

This also affects the sticky button bar on Special:Preference (for save/cancel buttons). The patch above appears to fix it.

Test Result - Beta

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

Test Artifact(s):

QA Steps

Steps to Reproduce:
Go to the Beta Commons MediaSearch page and search for a term. Example:
https://commons.wikimedia.beta.wmflabs.org/wiki/Special:MediaSearch?type=bitmap&q=cat

Click a result to expand the right-hand sidebar, then continue scrolling down the page.

✅ AC1: Expected Results:
The sidebar should remain "sticky" in the user's viewport.
See here for correct behavior in old vector: https://commons.wikimedia.org/wiki/Special:MediaSearch?type=bitmap&q=desert

Screen Recording 2021-01-21 at 6.55.48 AM.mov.gif (792×920 px, 3 MB)

Edtadros subscribed.

Test Result - Prod

Status: ✅ PASS
Environment: commons
OS: macOS Big Sur
Browser: Chrome
Device: MBP
Emulated Device: NA

Test Artifact(s):

QA Steps

Steps to Reproduce:
Go to the Commons MediaSearch page and search for a term. Example:
https://commons.wikimedia.org/wiki/Special:MediaSearch?type=bitmap&q=cat

Click a result to expand the right-hand sidebar, then continue scrolling down the page.

✅ AC1: Expected Results:
The sidebar should remain "sticky" in the user's viewport.

Screen Recording 2021-01-25 at 6.00.45 AM.mov.gif (1×964 px, 2 MB)