Page MenuHomePhabricator

Sort labels alphabetically on Special:Watchlist
Closed, ResolvedPublicFeature

Assigned To
Authored By
Samwilson
Dec 17 2025, 2:53 AM
Referenced Files
F71533799: 2026-01-15_14-32-12.png
Thu, Jan 15, 10:33 PM
F71533668: 2026-01-15_14-07-25.mp4
Thu, Jan 15, 10:30 PM
F71533686: 2026-01-15_14-24-24.png
Thu, Jan 15, 10:30 PM
F71533664: 2026-01-15_14-04-50.png
Thu, Jan 15, 10:30 PM
F71533683: 2026-01-15_14-24-08.png
Thu, Jan 15, 10:30 PM
F71533661: 2026-01-15_12-38-37.png
Thu, Jan 15, 10:30 PM

Description

The labels on Special:WatchlistLabels are sorted alphabetically (if the user clicks to sort by that column, and after T410356 is finished), but on the filter list on Special:Watchlist they're not.


Derived Requirements

  1. The label filter list on Special:Watchlist must display labels sorted alphabetically.
  2. Alphabetical sorting must be consistent with the sorting behavior used on Special:WatchlistLabels.
  3. Sorting must be locale-aware and follow standard MediaWiki collation rules.
  4. The sorted order must be applied automatically without requiring user interaction, unless on Special:Watchlist.
  5. Label sorting must not affect existing watchlist filtering functionality.
Test Steps

Test Case 1: Alphabetical Sorting of Label Filter List

Preconditions

  • The user is logged in.
  • Multiple watchlist labels exist with non-alphabetical names (for example: Zeta, Alpha, Beta).
  1. Navigate to Special:Watchlist.
  2. Locate the labels filter list.
  3. Observe the order in which labels are displayed.
  4. ✅❓❌⬜ AC1: Verify that labels in the filter list are displayed in strict alphabetical order according to locale-aware collation.

Test Case 2: Consistency With Special:WatchlistLabels Sorting

Preconditions

  • Same labels exist on both Special:Watchlist and Special:WatchlistLabels.
  1. Navigate to Special:WatchlistLabels.
  2. Observe the alphabetical order of labels after you sort it.
  3. Navigate back to Special:Watchlist.
  4. Compare the label ordering in the filter list.
  5. ✅❓❌⬜ AC2: Verify that the alphabetical order of labels on Special:Watchlist matches the ordering used on Special:WatchlistLabels.

Test Case 3: Automatic Sorting Without User Interaction

Preconditions

  • Same as Test Case 1.
  1. Navigate to Special:Watchlist.
  2. Do not interact with sorting or filtering controls.
  3. Observe the label filter list on initial page load.
  4. ✅❓❌⬜ AC3: Verify that labels are already sorted alphabetically on page load without requiring any user action.

QA Results - Beta

ACStatusDetails
1T412887#11527028
2T412887#11527028
3T412887#11527028

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change #1219059 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/core@master] Sort watchlist labels in the Special:Watchlist filter

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

Change #1219059 merged by jenkins-bot:

[mediawiki/core@master] Sort watchlist labels in the Special:Watchlist filter

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

@Samwilson Confirmed Sort labels alphabetically on Special:Watchlist, as seen in the screenshots/video. I will mark this as Resolved. Thanks for all your work!

Test Result - Beta

Status: ✅ PASS
Environment: Beta
OS: macOS Tahoe 26.1
Browser: Chrome 143
Device: MBA
Emulated Device: NA

Test Artifact(s):

Test Steps

Test Case 1: Alphabetical Sorting of Label Filter List

Preconditions

  • The user is logged in.
  • Multiple watchlist labels exist with non-alphabetical names (for example: Zeta, Alpha, Beta).
  1. Navigate to Special:Watchlist.
  2. Locate the labels filter list.
  3. Observe the order in which labels are displayed.
  4. AC1: Verify that labels in the filter list are displayed in strict alphabetical order according to locale-aware collation.
En-LTRAr-RTL
2026-01-15_14-32-12.png (936×1 px, 181 KB)
2026-01-15_14-24-08.png (816×1 px, 88 KB)

Test Case 2: Consistency With Special:WatchlistLabels Sorting

Preconditions

  • Same labels exist on both Special:Watchlist and Special:WatchlistLabels.
  1. Navigate to Special:WatchlistLabels.
  2. Observe the alphabetical order of labels after you sort it.
  3. Navigate back to Special:Watchlist.
  4. Compare the label ordering in the filter list.
  5. AC2: Verify that the alphabetical order of labels on Special:Watchlist matches the ordering used on Special:WatchlistLabels.
En-LTRAr-RTL
2026-01-15_14-04-50.png (786×1 px, 143 KB)
2026-01-15_14-24-24.png (823×1 px, 146 KB)

Test Case 3: Automatic Sorting Without User Interaction

Preconditions

  • Same as Test Case 1.
  1. Navigate to Special:Watchlist.
  2. Do not interact with sorting or filtering controls.
  3. Observe the label filter list on initial page load.
  4. AC3: Verify that labels are already sorted alphabetically on page load without requiring any user action.

GMikesell-WMF updated the task description. (Show Details)