Page MenuHomePhabricator

Allow defining the order of change tags defined by the software
Closed, ResolvedPublic

Description

Currently, when change tags are displayed on history pages, recent changes, and so on, it is impossible to control their order.

Apparently they are ordered according to the ctd_id field, but this seems to be an unintentional effect of how the SQL queries are written.

The ctd_id field is generated automatically whenever the tag is used for the first time, which means that the order of tags can be different on different wikis. It also means we can't choose a particular order we would like (T272768).

I'd like the tags to appear in some defined order, e.g. the same as the result of the ListDefinedTags hook.

Desired behavior

  1. Visit a page where people have made edits with the New Discussion Tool.
  2. Locate an edit made with the New Discussion Tool.
    • e.g. Ppelberg-test talk contribs‎ 33,200 bytes +173‎ →‎Testing change tag: new section undo Tags: Visual New topic
  3. ✅Notice the New topic tag appears BEFORE the mode (e.g. Source or Visual) used to publish said edit.

Done

  • ===Desired behavior is implemented

Event Timeline

Change 658354 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/core@master] Consistently order change tags

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

I'm trying to figure out what effect this change would have on enwiki. I'm not sure how to present it, but here's the raw data:

Alright, I devised this terrible query. It looks at all en.wp edits over the last 2 weeks (it's impractically slow to query more), and then counts those where the order of tags would change. https://quarry.wmflabs.org/query/51859

Quick observations:

  • It's a huge mess of abuse filter tags
  • It seems that the most common effect is that the "mw-reverted" tag moves from the end to the beginning
  • Second most common is apparently the "mw-undo" tag moving the opposite way, from the beginning to the end
  • Another common change is "visualeditor" moving before "mobile edit,mobile web edit"
  • The expected change to DiscussionTools tags appears as well (with 20 occurrences)

Overall, it probably does not matter, but I wanted to see.

Change 658354 merged by jenkins-bot:

[mediawiki/core@master] Consistently order change tags

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

matmarex claimed this task.