Page MenuHomePhabricator

[EPIC] With the current layout, some elements extend beyond the content area and overlap sticky page tools
Open, HighPublic

Assigned To
Authored By
Iniquity
Apr 3 2024, 7:23 PM
Referenced Files
F67842902: image.png
Oct 28 2025, 3:53 AM
F59297562: image.png
Apr 19 2025, 5:55 AM
F55737859: image.png
Jun 23 2024, 5:49 PM
F55737720: image.png
Jun 23 2024, 5:49 PM
Restricted File
May 15 2024, 4:58 PM
F53352731: Screenshot 2024-05-15 at 9.56.27 AM.png
May 15 2024, 4:57 PM

Description

Buttons, wide page objects and some interfaces do not adapt to a narrow content area, causing sticky page tools are to overlap.

Examples:

Screenshot 2024-05-15 at 9.56.27 AM.png (653×765 px, 189 KB)

Note: table overlaps page tools on right

  • Certain special pages e.g. Special:Notifications are not optimized for Vector 2022's side bar menus. It's not clear if this should be fixed by skinStyles or a more generic solution.

    {F53352922}
  • Possible solutions
  • Horizontal scrollable tables
  • Use of container queries or CSS grid fit-content to limit the tables to their container.

Test cases

At 1000px, when both sidebars are open there should be no overlap of tables with the sidebar on the following pages

Some templates cannot be autocorrected and will need to be manually updated to wrap with the noresize class
E.g.

Related Objects

StatusSubtypeAssignedTask
DuplicateNone
StalledFeatureNone
OpenNone
Openbwang
ResolvedBUG REPORTJdlrobson
ResolvedBUG REPORTovasileva
Resolvedmatmarex
ResolvedBUG REPORTNone
DuplicateNone
Duplicateovasileva
InvalidNone
ResolvedTgr
ResolvedAnomie
Resolvedtstarling
Resolvedcoren
ResolvedAnomie
DeclinedBUG REPORTNone
ResolvedAnomie
ResolvedEsanders
ResolvedEsanders
Resolvedssastry
ResolvedAnomie
ResolvedCKoerner_WMF
Resolvedjhsoby
ResolvedTgr
DeclinedTgr
Resolvedcoren
ResolvedAnomie
ResolvedTgr
DeclinedNone
Resolvedssastry
ResolvedTgr
ResolvedTgr
ResolvedTgr
Resolved Deskana
ResolvedCKoerner_WMF
Resolved Whatamidoing-WMF
ResolvedTgr
ResolvedTgr
ResolvedTgr
ResolvedUrbanecm
ResolvedTgr
ResolvedTacsipacsi
ResolvedTgr
ResolvedCKoerner_WMF
ResolvedJdlrobson
Duplicateovasileva
ResolvedJdlrobson
ResolvedJdlrobson
ResolvedBUG REPORTJdlrobson
ResolvedJdlrobson
OpenNone
ResolvedBUG REPORTJdlrobson
DuplicateBUG REPORTNone
ResolvedJdlrobson
ResolvedBUG REPORTovasileva
OpenNone
DeclinedBUG REPORTNone
OpenBUG REPORTNone
ResolvedBUG REPORTTheresNoTime
ResolvedBUG REPORTCCiufo-WMF
DuplicateBUG REPORTJdlrobson
OpenNone
ResolvedJdlrobson-WMF

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Jdlrobson subscribed.

Bernard will be point person for this work. I've asked him to take a look and think about this problem space.

Jdlrobson renamed this task from [Tracking] With the current layout, some elements extend beyond the content area and overlap sticky page tools to [EPIC] With the current layout, some elements extend beyond the content area and overlap sticky page tools.May 15 2024, 4:57 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson updated the task description. (Show Details)

With the dropping of IE11 container queries are very viable here: https://caniuse.com/css-container-queries but it's worth noting our LESS parser does not support them, so we'd need to do this in a CSS file.

ovasileva raised the priority of this task from Medium to High.May 15 2024, 5:15 PM
Jdlrobson updated the task description. (Show Details)

How about a gradient to transparency so that it is clear that the element continues to the right?

image.png (658×1 px, 74 KB)

(https://www.mediawiki.org/wiki/Extension:Popups?useskin=vector-2022, screenshot by @Prod)

Timeless handles this well:

image.png (695×1 px, 64 KB)

(https://www.mediawiki.org/wiki/Extension:Popups?useskin=timeless, shrink the window to see)

Timeless handles this well:

image.png (695×1 px, 64 KB)

(https://www.mediawiki.org/wiki/Extension:Popups?useskin=timeless, shrink the window to see)

This is done by wrapping the table, and using JS to detect overflow, toggling additional classes, and adding two siblings that use relative positioning to overlay the gradient. It's elegant in one way, but also pretty invasive to do, with lots of dom modifications using JS. If we think of nested tables inside infobox or other scripts doing DOM modifications, this can quite easily break some content. I still think its worth considering, but not sure it will be garuanteed to work.

This is done by wrapping the table, and using JS to detect overflow, toggling additional classes, and adding two siblings that use relative positioning to overlay the gradient. It's elegant in one way, but also pretty invasive to do, with lots of dom modifications using JS.

I was able to simplify that a bit with pseudo-elements instead of siblings:

.overflowed.scroll-right::after,
.overflowed.scroll-left::before {
  content: '';
  box-shadow: 0 0 4px 1px rgba(0, 0, 0, 0.25);
  border-left: solid 1px #c8ccd1;
  height: 100%;
  position: absolute;
  bottom: 0;
  z-index: 1;
}

.overflowed.scroll-right::after {
  right: 0;
}

.overflowed.scroll-left::before {
  left: 0;
}

This is done by wrapping the table, and using JS to detect overflow, toggling additional classes, and adding two siblings that use relative positioning to overlay the gradient. It's elegant in one way, but also pretty invasive to do, with lots of dom modifications using JS

Vector 2022 was somewhat inspired by Timeless's approach, but the intention behind Vector 2022's JavaScript is for it to be temporary and its purpose is to mitigate and inform a future version of the parser/content. In future, I envision this will log warnings/errors until an editor makes the appropriate editorial change to fix the table e.g. wrapping it in a div with a class.

How about a gradient to transparency so that it is clear that the element continues to the right?

I believe a gradient was considered before on mobile (Minerva/MobileFrontend) for tables, but declined with reasoning, but I can't find the associated ticket. Sharing in case this triggers someone else's memory.

Change #1114084 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/Vector@master] Tables: new approach to making tables fit to the content

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

Change #1128938 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/MinervaNeue@master] POC: Allow tables and math equations to break out of the content area

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

Test wiki created on Patch demo by Jon (WMF) using patch(es) linked to this task:
http://patchdemo.wmcloud.org/wikis/0a1682d742/w/

Change #1114084 abandoned by Jdlrobson:

[mediawiki/skins/Vector@master] Tables: new approach to making tables fit to the content

Reason:

Needs more discussion on core change. Will look to make fixing this a Q4 goal.

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

How about a gradient to transparency so that it is clear that the element continues to the right?

This seems to be an industry default at this point. ChatGPT's wide-table functionality appeared, like, yesterday, and it already has these side gradients:

image.png (854×922 px, 67 KB)

(Let's keep quiet about the fact that the table is generally designed way better than obsolete wikitables.)

This is weird that the main Internet's encyclopedia can't handle such a basic encyclopedic format like tables, honestly. At this pace, people are just going to stop using Wikipedia for tabular information and resort to generating custom tables with LLMs.

Jdlrobson-WMF subscribed.

This is weird that the main Internet's encyclopedia can't handle such a basic encyclopedic format like tables, honestly. At this pace, people are just going to stop using Wikipedia for tabular information and resort to generating custom tables with LLMs.

User generated content is the issue here. The first step would be updating the parser so table element is wrapped in a DIV element. This would likely cause disruption to existing templates/editors, but I think we are getting to the point where we'll just need to do this and cause that disruption so we don't get left behind.

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

https://patchdemo.wmcloud.org/wikis/0a1682d742/w/

Change #1128938 abandoned by Jdlrobson:

[mediawiki/skins/MinervaNeue@master] POC: Allow tables and math equations to break out of the content area

Reason:

TBC on https://phabricator.wikimedia.org/T391781

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

Lol, checked the current standings in the Formula One 2025 season and was sure that Norris won it ...before realizing there is a horizontal scrollbar

image.png (811×1 px, 165 KB)