Page MenuHomePhabricator

Namespaces on Special:Search should be sorted vertically and not horizontally
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

image.png (1,617×506 px, 56 KB)

What should have happened instead?:
Currently this sorting shows every two namespaces together vertically and then goes horizontally left-to-right (or, I assume, right-to-left). This makes it harder to understand that this list is sorted at all (since usually people read these sorts of lists vertically) and breaks if there aren’t enough namespaces in the final row. I think today was genuinely the first time I’ve realised that this list is sorted at all, all because of this imperfect layout.

I want to propose grouping all namespaces in a single columned list and then grouping every two namespaces in their own <div> with column breaking prevention rules. This is entirely possible in the modern CSS and would make this list much more understandable.

Quick mockup by wrapping the namespace checkboxes in devtools in <div class="checkbox-wrapper"> (it can be still contained by 4 columns via CSS if needed) and applying this CSS:

.checkbox-wrapper {
	columns: 13em;
}

.checkbox-container > :nth-child(2n) {
	margin-bottom: 1em;
}

#mw-searchoptions .checkbox-wrapper .checkbox-container {
	columns: unset;
	margin-bottom: 0;
}

image.png (1,617×431 px, 55 KB)

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Event Timeline

Restricted Application added subscribers: Base, Aklapper. · View Herald Transcript

I found the previous non-OOUI look in T106055: Improve "advanced search":

Screenshot 2015-07-16 11.56.25.png (1,435×773 px, 167 KB)

This is much more understandable and clear than the current version. Seems like during OOUI conversion the wrong choice was made which impacted the readability a lot.

Change #1082304 had a related patch set uploaded (by Saint Johann; author: Saint Johann):

[mediawiki/core@master] Sort namespaces list vertically on Special:Search

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

The Safari issue i found is: https://bugs.webkit.org/show_bug.cgi?id=104944
Visible as:

Screenshot 2024-10-31 at 21.31.25.png (990×882 px, 90 KB)

(This image also tests what happens when namespace names overflow, but this too is a pre-existing issue, not caused/worsened/fixed by this patch).

The bad thing about padding-bottom proposal is that in other browsers, this whole search interface would still be having unnecessary bottom padding/margin, but it was already a thing before the patch and I don’t have macOS to be able to test any better solutions, so it’s not a big deal.

Text overflow thing also seems to be Safari-only. Edge and Firefox do not seem to have this issue.

Gehel subscribed.

Adding Web-Team, since they might have more expertise and opinion on the subject than the Search Platform team.

Change #1082304 merged by jenkins-bot:

[mediawiki/core@master] Sort namespaces list vertically on Special:Search

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

TheDJ claimed this task.