Page MenuHomePhabricator

[Sticky header] Prevent language button contents from wrapping
Closed, ResolvedPublic2 Estimated Story Points

Description

Description

Currently when there is a long page title and the browser width is smaller, the language button contents wrap:

Screen Shot 2022-01-10 at 10.36.04 AM.png (800×1 px, 719 KB)

Adding white-space: nowrap on the button and min-width: 0 on the .vector-sticky-header-start element fixes the issue. Perhaps there's a better way to do this.

Screen Shot 2022-01-10 at 10.44.15 AM.png (604×1 px, 450 KB)

Note

The approach here might be affected by what we end up doing in T298885.

QA steps

Screen Shot 2022-02-03 at 4.57.07 PM.png (852×2 px, 350 KB)

Details

Related Changes in Gerrit:

Event Timeline

The proposed solution in the description works well for me and should be compatible with https://phabricator.wikimedia.org/T298885

Note, it might make sense to upstream the white-space: nowrap style to the mw-interlanguage-selector class in ULS. I can't imagine a situation where we want that button to wrap.

Jdlrobson added a subscriber: bwang.

FYI the language codes my and blc have the longest label

Change 759583 had a related patch set uploaded (by Clare Ming; author: Clare Ming):

[mediawiki/skins/Vector@master] Fixes for sticky header:

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

Test wiki created on Patch demo by CMing (WMF) using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/1c183841bf/w/

Test wiki on Patch demo by CMing (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/1c183841bf/w/

Test wiki created on Patch demo by CMing (WMF) using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/d990d92b37/w/

cjming updated the task description. (Show Details)
cjming subscribed.

Change 759583 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Fixes for sticky header:

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

Test wiki on Patch demo by CMing (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/d990d92b37/w/