Page MenuHomePhabricator

[Sticky header] Consider removing (or increasing) max-width on page title
Closed, ResolvedPublic2 Estimated Story Points

Description

Description

Sometimes a page title is clipped but there is still available space. In this case the clipped page title looks a little weird:

example 1example 2
Screen Shot 2022-01-08 at 2.45.30 PM.png (1×2 px, 487 KB)
Screen Shot 2022-01-08 at 2.46.23 PM.png (1×2 px, 447 KB)
Possible solution 1

Maybe we could do something like flex-grow:1 (or a similar pattern) such that the page title takes up the remaining available space (maybe minus some margin/padding so it's not bumping up against other elements)? I think it would get tricky to figure out when/how to show the fade out in this case, but maybe there's some way to do it. Ignoring the fade-out being dynamic, here's how it would look for a super long title:

Note: I applied this min-width: 0 trick to both the .vector-sticky-header-context-bar element and the .vector-sticky-header-start element to get this to work.

Possible solution 2

We could increase the max-width on the page title element

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

This looks doable by removing the max-width from .vector-sticky-header-context-bar-primary and by moving the fade out psuedo element from vector-sticky-header-context-bar-primary to vector-sticky-header-end::before.

I also ran into an issue with truncated text and flexbox, so we'd have to make sure to add min-width: 0 to vector-sticky-header-start for this approach.

bwang removed bwang as the assignee of this task.Jan 12 2022, 8:16 PM
bwang subscribed.

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

[mediawiki/skins/Vector@master] Fix page title in sticky header:

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

cjming removed cjming as the assignee of this task.Feb 3 2022, 8:37 PM
cjming updated the task description. (Show Details)
cjming subscribed.

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)

Change 759583 merged by jenkins-bot:

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

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

Looks good, resolving!

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

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