Follow-up to T402834: Hide "declined" wishes from wish index
The workaround at the time was to manually supply everything but declined to the statuses= filter of the wish-index parser function. That already bit us once because we added a new status ("Accepted"), so we had to manually update the wiki pages. There are only a few now, but by design anyone can make use of this parser function elsewhere and I imagine they will.
Now with filters live, we have to deal with this:
Not a pressing issue but it looks bad and makes the UI clunkier to deal with.
Technical requirements
- Introduce an option for $wgCommunityRequestsStatuses, say excluded: true that indicates entity statuses that should not be shown unless requested.
- In WishIndexRenderer, we compute an array of statuses that are not excluded, and pass them in to status parameter. So no change to our query is involved, or to the UI.
- Don't include "Declined" as a selectable status in the filters
Acceptance criteria (high-level)
- The wish-index parser function should only show wishes with a Declined status if declined is passed in via the statuses= parameter.
- The filters UI should not include "Declined" as a status to filter by. Those who want to see declined wishes can browse to https://meta.wikimedia.org/wiki/Community_Wishlist/Wishes/Declined
Derived Requirement
Automatically hide wishes with a Declined status from the wish-index unless explicitly requested. The wish-index parser function should exclude Declined wishes by default, and the filters UI should not include "Declined" as a selectable status.
Test Steps
Test Case 1: Ensure Declined Wishes Are Hidden by Default
- Navigate to the Community Wishlist wish-index page.
- Observe the list of wishes displayed.
- ✅❓❌⬜ AC1: Confirm that wishes with the status 'Declined' are not shown in the wish-index by default.
Test Case 2: Ensure Declined Wishes Can Be Viewed When Explicitly Requested
- Navigate to the wish-index parser function with statuses='Declined' in the URL.
- Observe the list of wishes displayed.
- ✅❓❌⬜ AC2: Confirm that only wishes with the status 'Declined' are shown.
Test Case 3: Ensure Filters UI Does Not Include 'Declined'
- Open the wish-index filters panel.
- Check the list of selectable statuses.
- ✅❓❌⬜ AC3: Confirm that 'Declined' is not present as an option in the filters UI.
Test Case 4: Validate Link to Declined Wishes Page
- Navigate to https://meta.wikimedia.org/wiki/Community_Wishlist/Wishes/Declined
- Verify the page content.
- ✅❓❌⬜ AC4: Confirm that users can view all declined wishes via the Meta page.
QA Results - Meta Beta
| AC | Status | Details |
|---|---|---|
| 1 | ✅ | T407309#11381766 |
| 2 | ✅ | T407309#11448745 |
| 3 | ✅ | T407309#11381766 |
| 4 | ✅ | T407309#11431100 |
