Page MenuHomePhabricator

Table: Sort buttons overflow due to labels not wrapping
Closed, ResolvedPublicBUG REPORT

Description

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

What happens?:

Long sort button labels make the buttons overflow and cause the sort icon to be hidden. In <th>s with end alignment, the problem is more accentuated (see top screenshot) due to an unwanted white space being added to the end of the cell.

Screenshot 2024-05-17 at 15.44.05.png (668×2 px, 242 KB)
Screenshot 2024-05-17 at 15.45.21.png (1×2 px, 426 KB)

What should have happened instead?:

The text should wrap like non-sortable column headings

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

Event Timeline

AnneT changed the task status from Open to In Progress.Mon, May 20, 4:15 PM
AnneT claimed this task.

Change #1034120 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[design/codex@main] Table: Improve multiline sortable column headings

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

Change #1034120 merged by jenkins-bot:

[design/codex@main] Table: Improve multiline sortable column headings

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

@Sarai-WMDE Ready for your review! I removed the nowrap style so that text within a sortable column heading will wrap just like any other column heading. This does mean that if you have a very long word, the column width will expand to accommodate it. I think we have to accept this - otherwise, if we break column heading text, you could end up with breaks in unexpected places like this:

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

Thanks for the fix!

This does mean that if you have a very long word, the column width will expand to accommodate it.

That sounds good and reasonable. As long as all headings behave consistently, then it's all good! And, as far as I can tell based on the tests, that's the case 👍🏻 I didn't detect any follow-up issues.

(Changes were reviewed using the Netlify build on Chrome 125, Firefox 126 and Safari 17.3. OS: macOS Sonoma 14.3.)

Change #1037103 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[mediawiki/core@master] Update Codex from v1.6.0 to v1.6.1

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

Test wiki created on Patch demo by ATomasevich (WMF) using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/ce0a74a0e6/w

Change #1037103 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from v1.6.0 to v1.6.1

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