Page MenuHomePhabricator

[M] Table of contents misaligned with max width disabled
Closed, ResolvedPublic1 Estimated Story Points

Description

Expected:
The table of contents should appear under the dropdown button.

Actual:

Screen Shot 2022-11-01 at 1.38.42 PM.png (708×1 px, 476 KB)

QA Results - Prod

ACStatusDetails
1T322162#8385092

Event Timeline

@ovasileva is this a blocker for rolling out the toggle?

@ovasileva is this a blocker for rolling out the toggle?

Let's analyze and discuss, but yes, I think it should be a blocker, at least for further rollout.

I took a look at this and I think the .mixin-column-full-width() in grid.less is doing a little too much.

I think we can fix this issue by remove the margin-left/right:auto in favour of setting
justify-self: start on .mw-table-of-contents-container and
justify-self: center; on .mw-content-container separately.

Screen Shot 2022-11-02 at 10.44.02 AM.png (540×886 px, 130 KB)

LGoto set the point value for this task to 1.Nov 3 2022, 5:03 PM
LGoto renamed this task from Table of contents misaligned with max width disabled to [M] Table of contents misaligned with max width disabled.Nov 3 2022, 5:27 PM

Would be great to leverage T322355 for QAing this fix

I noticed this while working on T317897 too, it seems to be to be a 1 line fix, adding .mw-table-of-contents-container to the selector here: https://github.com/wikimedia/Vector/blob/master/resources/skins.vector.styles/layouts/grid.less#L20

.mw-content-container,
.mw-table-of-contents-container {
  ...
}

Change 854568 had a related patch set uploaded (by Nray; author: Nray):

[mediawiki/skins/Vector@master] Fix TOC misaligned when max width option is disable

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

nray subscribed.

I noticed this while working on T317897 too, it seems to be to be a 1 line fix, adding .mw-table-of-contents-container to the selector here: https://github.com/wikimedia/Vector/blob/master/resources/skins.vector.styles/layouts/grid.less#L20

.mw-content-container,
.mw-table-of-contents-container {
  ...
}

Thanks @bwang, I agree!

Discussed in standup - will backport this, then continue with T320101: [M] Enable VectorVisualEnhancementsNext everywhere next week

Change 854568 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Fix TOC misaligned when max width option is disable

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

Change 855068 had a related patch set uploaded (by Nray; author: Nray):

[mediawiki/skins/Vector@wmf/1.40.0-wmf.8] Fix TOC misaligned when max width option is disable

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

Change 855068 merged by jenkins-bot:

[mediawiki/skins/Vector@wmf/1.40.0-wmf.8] Fix TOC misaligned when max width option is disable

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

Mentioned in SAL (#wikimedia-operations) [2022-11-09T21:26:35Z] <samtar@deploy1002> Started scap: Backport for [[gerrit:855068|Fix TOC misaligned when max width option is disable (T322162)]]

Mentioned in SAL (#wikimedia-operations) [2022-11-09T21:26:55Z] <samtar@deploy1002> samtar and nray: Backport for [[gerrit:855068|Fix TOC misaligned when max width option is disable (T322162)]] synced to the testservers: mwdebug2002.codfw.wmnet, mwdebug1001.eqiad.wmnet, mwdebug2001.codfw.wmnet, mwdebug1002.eqiad.wmnet

Mentioned in SAL (#wikimedia-operations) [2022-11-09T21:35:24Z] <samtar@deploy1002> Finished scap: Backport for [[gerrit:855068|Fix TOC misaligned when max width option is disable (T322162)]] (duration: 08m 48s)

Discussed in standup - will backport this, then continue with T320101: [M] Enable VectorVisualEnhancementsNext everywhere next week

Per @ovasileva comment, I backported this today and so it is in production everwhere. Given that, I'm assuming this should be moved to qa in production

Edtadros subscribed.

Test Result - Prod

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

Test Artifact(s):

QA Steps

Disable max-width preference
Visit https://en.wikipedia.org/wiki/Corps_Austria_Frankfurt_am_Main
Click "hide" on table of contents
✅ AC1: The table of contents should appear under the dropdown button.

Screen Recording 2022-11-09 at 9.43.36 AM.mov.gif (924×1 px, 762 KB)

Screen Recording 2022-11-09 at 9.39.17 AM.mov.gif (924×1 px, 843 KB)

Looks good, resolving!