Page MenuHomePhabricator

CSS UX table header sticky for usability
Closed, DuplicatePublic

Description

reproduce:
Read any article with very large table content (for example see https://en.wikipedia.org/wiki/Usage_share_of_web_browsers ). Scroll attempting to correlate row content with a specific column meaning. Note how header scrolls out of view while rows are visible and lose context on large tables.

solution:
Make headers of tables "sticky" when scrolling such that they remain visible in the viewport until the entire table scrolls out of bounds.
This CSS applies this too broadly and perhaps needs a "main" or similar content-area specific selector added.

thead th {
	position: sticky;
	top: 0;
	/* future logical positioning as ignorable overrides */
	inset-block: 0 auto;
	inset-inline: unset unset;
}

Event Timeline

Aklapper added a project: MediaWiki-General.

Hi @Jimmontwiki, thanks for taking the time to report this and welcome to Wikimedia Phabricator!

I guess this would go into https://phabricator.wikimedia.org/source/mediawiki/browse/master/resources/src/mediawiki.skinning/legacy.less$321 ?

inset-inline: unset unset;

That should be inset-inline: unset; I guess.

Change 575795 had a related patch set uploaded (by RhinosF1; owner: RhinosF1):
[mediawiki/core@master] Fix CSS UX table headers

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

Nor is inset-inline for that matter: https://developer.mozilla.org/en-US/docs/Web/CSS/inset-inline. It also appears quite some common browsers do not have it enabled by default.

Change 575795 abandoned by RhinosF1:
Fix CSS UX table headers

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

Hi @Jimmontwiki, thanks for taking the time to report this and welcome to Wikimedia Phabricator!

I guess this would go into https://phabricator.wikimedia.org/source/mediawiki/browse/master/resources/src/mediawiki.skinning/legacy.less$321 ?

inset-inline: unset unset;

That should be inset-inline: unset; I guess.

I was going to try that in gerrit but for some reason I can’t find that line in mediawiki core.

Did this ever get done?
After 4 months I still have to scroll up and down complex tables to track the column meanings.
What's the status of this CSS addition?
The entire audience of Wikipedia would benefit.

@Jimmontwiki: Hi, see the upper left corner for the status: This task is "open" and not resolved... If you would like to work on fixing this, see mw:How_to_become_a_MediaWiki_hacker . For general info on expectations, see mw:Development_prioritization - thanks a lot!