Page MenuHomePhabricator

Remove double space from watchlist checkboxes / options
Closed, ResolvedPublic

Description

Between checkboxes and labels: "patrolled edits", "Wikidata".

Ruwiki on image:

Event Timeline

Don't think it's really that hard to improve.

matmarex added a subscriber: matmarex.

It's actually not that simple… I just tried to find out why this happens.

There are two different interfaces that use these messages, on Special:Watchlist and Special:RecentChanges:

  • Special:Watchlist displays a checkbox to show/hide an option, and then the message (e.g. flaggedrevs-hidereviewed).
  • Special:RecentChanges the message (e.g. flaggedrevs-hidereviewed), passing the "Hide"/"Show" link as a parameter.

This is honestly pretty messed up and I'm surprised this problem has not come up earlier. (I mean, are there really no languages where "Hide reviewed edits" and " reviewed edits" would need different grammar forms? I'm surprised this works even in Russian, or Polish, but it apparently does.)

To solve this, we should probably change the RecentChanges' interface to be more similar to the Watchlist one (T119084: Options form at the top of old Special:RecentChanges needs cleanup), at which point we'll be able to simplify the messages. Which is not really trivial, I'm afraid :(

Aklapper renamed this task from Remove double space from watchlist options to Remove double space from watchlist checkboxes / options.May 30 2019, 10:57 AM
Jack_who_built_the_house claimed this task.

Somehow this is fixed, so hurray.

Interesting. It looks like the situation I described in T154114#2943193 has not changed – instead, some of the CSS has changed, so that the spaces are collapsed.

I think this bug was fixed accidentally in https://gerrit.wikimedia.org/r/c/mediawiki/core/+/394832 (rMW7a477b2df2e5: Allow wikilinks in "show/hide <type of change>" labels on Watchlist and…).

By using the $attribs variable in the new code (it was not passed there before), we effectively added class="mw-input-with-label ..." to the <label> (in addition to the wrapper <span>), which has display: inline-block; defined on it, which collapses leading/trailing spaces.