Page MenuHomePhabricator

Don't use parentheses around "Size" and "Since" values in pending-changes table
Open, Needs TriagePublic

Description

As the diff sizes (e.g. "+123" or "-432") are listed in their own column, there's no need to put them into additional (redundant) parentheses (e.g. "(+123)" or "(-432)").

Solution: just omit the parentheses. :-)

Example link: https://en.wikipedia.org/wiki/Special:PendingChanges

image.png (603×1 px, 57 KB)

Event Timeline

Change #1061146 had a related patch set uploaded (by Novem Linguae; author: Novem Linguae):

[mediawiki/extensions/FlaggedRevs@master] Special:PendingChanges: remove parentheses from diff sizes

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

Change #1061146 merged by jenkins-bot:

[mediawiki/extensions/FlaggedRevs@master] Special:PendingChanges: remove parentheses from diff sizes

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

Novem_Linguae claimed this task.

The parentheses in other columns, like "since", by the way, are also unnecessary.

Novem_Linguae renamed this task from No parentheses around the sizes in pending-changes table to Don't use parentheses around "Size" and "Since" values in pending-changes table.Aug 11 2024, 12:39 PM
Novem_Linguae reopened this task as Open.

I see the "since" parentheses in your original screenshot. But I cannot reproduce on my localhost, neither with latest master, nor a snapshot of the codebase from a couple days ago. Latest master looks like this to me:

image.png (511×1 px, 41 KB)

Can you go on the beta cluster and see if you can get the "since" values to have parentheses? Example beta cluster link: https://en.wikipedia.beta.wmflabs.org/wiki/Special:PendingChanges. I think you can change en to your language if that's easier.

Only "(less than 1 hour ago)" is shown with parentheses in the "Since" column. Other durations (e.g., 2 hours) are shown without parentheses.

Would the following work?

.mw-fr-pending-changes-table .mw-diff-bytes::before,
.mw-fr-pending-changes-table .mw-diff-bytes::after {
    content: '';
}

I wrote a patch with that exact code already and it's in master. Great minds. https://gerrit.wikimedia.org/r/c/mediawiki/extensions/FlaggedRevs/+/1061146

I'll have to test if it solves the "(less than 1 hour ago)" when I get to a computer. It definitely solves the other column (the size column).

Only "(less than 1 hour ago)" is shown with parentheses in the "Since" column. Other durations (e.g., 2 hours) are shown without parentheses.

That seems to be intentional. So let's keep it.

It’s still there if you disable JavaScript, as well as for a moment on page load if JS is enabled. I haven’t looked into the code, but this is typically what happens when CSS is bundled with independent JavaScript code (independent in the sense that the CSS styles things other than those created by the JS). This should be fixed by moving CSS to its own ResourceLoader module and loading that module using OutputPage::addModuleStyles() rather than OutputPage::addModules().