Page MenuHomePhabricator

Enable sorting functionality for the table of wishes
Closed, ResolvedPublic

Assigned To
Authored By
KSiebert
Jun 11 2024, 11:39 AM
Referenced Files
F56515171: 2024-07-18_15-59-44.png
Thu, Jul 18, 11:09 PM
F56515115: 2024-07-18_15-57-47.mp4.gif
Thu, Jul 18, 11:09 PM
F56515075: 2024-07-18_15-56-53.png
Thu, Jul 18, 11:09 PM
F56515057: 2024-07-18_15-54-51.mp4.gif
Thu, Jul 18, 11:09 PM
F56383999: 2024-07-12_15-28-39.mp4.gif
Fri, Jul 12, 10:32 PM
F56384079: 2024-07-12_15-31-27.mp4.gif
Fri, Jul 12, 10:32 PM
F55924491: 2024-06-27_10-41-02.mp4.gif
Jun 27 2024, 5:49 PM
F55924173: 2024-06-27_10-27-38 (1).gif
Jun 27 2024, 5:49 PM

Description

User Story:

As a user engaging with the wishlist, when I want to find a particular wish, I should be able to sort by certain criteria.

Acceptance criteria:

Given that I'm engaging with the wishlist, when I want to see the data by a different look, then I should be able to sort specific columns

  • date
  • status
  • type
  • And sorting should be local to my computer.
  • And I should not see a sort option for name, project, or focus area (This is not simple to implement at this stage, so is being left out for now. All columns will be sortable.)

Details for QA:

  • Sorting of any column should work.
  • Note that dates should sort correctly (i.e. in date order, not alphabetical). They sort by time, even though the time is not shown (so that wishes created on the same day should still sort in the correct order of time of creation).
  • The sort buttons should display correctly for RTL languages as well (e.g. not overlap with the column header label).

Impact:

  • find wishes of interest, user will be able to sort list of all wishes to their preference

Designs:

  • The sorting system is part of MediaWiki core, so doesn't need any special design considerations.

Derived Requirement

Ensure the table of wishes on the wish index page supports sorting by date, status, and type, with correct handling of dates and compatibility with RTL languages.

BDD

Feature: Sorting Functionality for Wish Table

Scenario: Enable sorting by date, status, and type

Given the user is on the wish index page
When the user clicks on the column headers for date, status, or type
Then the table should be sorted accordingly
Test Steps

Test Case 1: Enable Sorting by Date, Status, and Type

Open Wikipedia on the Minerva skin and navigate to the wish index page.
Click the "Date" column header to sort by date.
Click the "Status" column header to sort by status.
Click the "Type" column header to sort by type.
✅❓❌⬜ AC1: Confirm that the table sorts correctly by date, status, and type.
✅❓❌⬜ AC2: Confirm that the table sorts correctly by date, status, and type with RTL.

QA Results - Wishlist-test.toolforge

ACStatusDetails
1T367160#9931793
2T367160#9997176

Details

Other Assignee
GMikesell-WMF

Event Timeline

JWheeler-WMF renamed this task from Enable sorting functionality on all wishes to Enable sorting functionality for the table of wishes.Jun 11 2024, 9:13 PM
JWheeler-WMF updated the task description. (Show Details)

We may need to add sort keys for the date column to properly sort, as it's by default alphabetical.

Samwilson subscribed.

Good point. I've made a MR for that.

@Samwilson Please review the RTL gif below, thanks!

Test Result - Wishlist-test.toolforge

Status: ✅ PASS
Environment: Wishlist-test.toolforge
OS: macOS Sonoma 14.5
Browser: Chrome 126
Device: MBA
Emulated Device: NA

Test Artifact(s):

Test Steps

Test Case 1: Enable Sorting by Date, Status, and Type

  1. Open Wikipedia on the Minerva skin and navigate to the wish index page.
  2. Click the "Date" column header to sort by date.
  3. Click the "Status" column header to sort by status.
  4. Click the "Type" column header to sort by type.

✅ AC1: Confirm that the table sorts correctly by date, status, and type.

2024-06-27_10-27-38 (1).gif (389×457 px, 2 MB)

❌AC2: Confirm that the table sorts correctly by date, status, and type with RTL.

  • Sorting does not work. I
  • I'm sure you mentioned it before, but the sort button is close to the headers.
  • The table visually should look the same even when in RTL, correct? Meaning, the order shouldn't change

2024-06-27_10-41-02.mp4.gif (800×748 px, 294 KB)

Thanks for testing! I forgot that this was dependent on T368578. Stalling now pending that task's resolution.

That task is done, and I think there's some more work to be done here: the table should be displayed in the content language, but we're handling the sorting according to the interface language (e.g. Wishes/en?uselang=ar shows the sorting arrows on the left, and Wishes/ar?uselang=en shows them on the right; both are incorrect).

Sorting does not work.
I'm sure you mentioned it before, but the sort button is close to the headers.
The table visually should look the same even when in RTL, correct? Meaning, the order shouldn't change

Sorting should now be working correctly, including for RTL.

The issue with the RTL sort button has been fixed, but note this issue: T369592: TableSorter icon follows interface lang instead of content lang (so only expect the sort icon to swap sides when you change the interface language, not when you view a RTL translation page of a wish).

@Samwilson Please review the RTL gif and the possible issue below, thanks!

Test Result - Wishlist-test.toolforge

Status: ✅ PASS
Environment: Wishlist-test.toolforge
OS: macOS Sonoma 14.5
Browser: Chrome 126
Device: MBA
Emulated Device: NA

Test Artifact(s):

Test Steps

Test Case 1: Enable Sorting by Date, Status, and Type

  1. Open Wikipedia on the Minerva skin and navigate to the wish index page.
  2. Click the "Date" column header to sort by date.
  3. Click the "Status" column header to sort by status.
  4. Click the "Type" column header to sort by type.

✅ AC1: Confirm that the table sorts correctly by date, status, and type.

2024-06-27_10-27-38 (1).gif (389×457 px, 2 MB)

❌AC2: Confirm that the table sorts correctly by date, status, and type with RTL.

  • Sorting does not work. I
  • I'm sure you mentioned it before, but the sort button is close to the headers.
  • The table visually should look the same even when in RTL, correct? Meaning, the order shouldn't change

2024-07-12_15-31-27.mp4.gif (1×1 px, 432 KB)

❓ Possible Issue

"Community Wishlist is an ongoing survey that allows contributors to the Wikimedia projects to propose and support tools and platform improvements. Users are welcomed to propose their own wishes at any time and also can show support of other wishes submitted by the community." does not move when it's RTL as seen in the gif below. I'm not sure if there is a task on this already or if there should be one created.

2024-07-12_15-28-39.mp4.gif (450×1 px, 336 KB)

"Community Wishlist … by the community." does not move when it's RTL as seen in the gif below. I'm not sure if there is a task on this already or if there should be one created.

No, that's fine, it follows the page language and not the interface language. The same as when you view an Arabic page with the interface set to English, the content is RTL.

❌AC2: Confirm that the table sorts correctly by date, status, and type with RTL.

Thanks! I think I've fixed it this time. So there are four states, and the normal table sorter handles them like this:

Interface lang ↓ / Page lang →enhe
enicon at righticon at right
heicon at lefticon at left

So we should do the same.

Merged, and the test site updated. @GMikesell-WMF can you have another look? Thanks!

@Samwilson Please review to see if the below is fine. Also "en" and "he" interfaces seem to be fine when the page language is English but not Hebrew? Also ?uselang=en-rtl doesn't sort, is that fine since "he" is working? If these are fine than you can move it to Done.

Test Result - Wishlist-test.toolforge

Status: ✅ PASS
Environment: Wishlist-test.toolforge
OS: macOS Sonoma 14.5
Browser: Chrome 126
Device: MBA
Emulated Device: NA

Test Artifact(s):

Test Steps

I couldn't test he?uselang=he and he?uselang=en as seen in the screenshots.
Gifs are for page language "en" with the interface of "en" and "he"

Interface lang ↓ / Page lang →enhe
en
2024-07-18_15-54-51.mp4.gif (626×1 px, 1 MB)
2024-07-18_15-56-53.png (573×1 px, 78 KB)
he
2024-07-18_15-57-47.mp4.gif (626×1 px, 729 KB)
2024-07-18_15-59-44.png (626×1 px, 74 KB)

Oh oops yes sorry, I was testing with he on my local, but should've changed those to ar on the test wiki. The he/he combo is the same as ar/ar: https://wishlist-test.toolforge.org/wiki/Community_Wishlist/Wishes/ar?uselang=ar

But yep, I think everything's good here. We can revisit if anyone finds any issues, or if the TableSorter issue gets worked on.

Thanks!