Page MenuHomePhabricator

On Special:AbuseLog, force the "Any" item to appear at a consistent location in the dropdowns, and write the items in consistent case
Open, Needs TriagePublic

Description

The page Special:AbuseLog has two dropdowns, labeled "Triggering action" and "Action taken". Both of them have the item "Any". It would be convenient if it always appeared at a consistent location.

"Any" seems to always appear at the bottom of "Triggering action", in all languages. In English, it appears at the top of "Action taken" because it begins with the letter A, and in other languages it appears elsewhere.

In addition, the names of the actions are written in different letter case. In "Action taken", everything begins with a capital letter except "none". In "Triggering action", everything begins with a small letter except "Any" and "Other".

This should be more systematic. My suggestions:

  • Triggering action:
    • Force "Any" to appear at the beginning of the list.
    • Force "Other" to appear at the end of the list. (Logic for this and previous point: "Any" is the widest, "Other" comes after the context of all the other actions.)
    • The rest of the actions must remain in lowercase because they are technical, but consider changing them to something human-readable and translatable.
    • Change the design of "Any" and "Other", for example to bold font. In some languages they can be emphasized by different capitalization, but most writing systems don't have capitalization.
  • Action taken:
    • Force "Any" to appear at the beginning of the list.
    • Force "none" to appear at the end of the list. (Logic for this and previous point: "Any" is the widest, "None" is the narrowest, and the rest is in between.)
    • Change all the labels to all-lowercase or first capital.

Event Timeline

Amire80 created this task.Jun 16 2020, 6:38 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 16 2020, 6:38 AM
Huji awarded a token.Jun 16 2020, 2:00 PM

Both of them have the item "Any". It would be convenient if it always appeared at a consistent location.

This should be a simple code change, but I'm unsure whether HTMLForm sorts the options on its own.

In addition, the names of the actions are written in different letter case. In "Action taken", everything begins with a capital letter except "none". In "Triggering action", everything begins with a small letter except "Any" and "Other".

This is because the names in "triggering action" are meant to be the same as the values of the action variable (ref), plus special options "Any" and "Other". Since the bijection is intended, the dropdown is using the same messages that are used to refer to these actions throughout the whole codebase.

The rest of the actions must remain in lowercase because they are technical, but consider changing them to something human-readable and translatable.

I'm uncertain... The main drawback that I'm seeing is that we could potentially lose the one-to-one correspondence, especially if the translation is wrong (e.g. because the translator doesn't have enough knowledge, or because the target language doesn't have a way to preserve the exact meaning). I think this a generic issue with translating language keywords (a stupid example: AFAICS, most languages do not translate "for" and "while" in "for loop" and "while loop" respectively).

Aside from this, I agree with all the other recommendations re ordering and bold.

Huji added a subscriber: Huji.Jun 16 2020, 5:11 PM

How about we change "none" to "None" for the action taken, so it is all uniformly in upper case?

Change 605972 had a related patch set uploaded (by Huji; owner: Huji):
[mediawiki/extensions/AbuseFilter@master] Standardize the order of options in dropdown filters for search

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

Huji added a comment.Jun 16 2020, 5:29 PM

The patch does most of what was asked. I have no idea how to make an option bold. But I think the placement of choices (widest at the top, narrowest at the bottom) is distinctive enough.

How about we change "none" to "None" for the action taken, so it is all uniformly in upper case?

I didn't realize that "none" was lowercase. Yeah, this might be a good idea, although perhaps it should use a new message (and not "abusefilter-log-noactions" which is also used in other places)

Huji added a comment.Jun 25 2020, 6:15 PM

@Daimona I made it a separate message in PS4 of https://gerrit.wikimedia.org/r/605972/. The original message, abusefilter-log-noactions is only used in one more place which is in the log entries. However, I agree with you that we should not change the look and feel of the log entries just for the sake of uniformity of dropdown menu options.