Page MenuHomePhabricator

Newcomer tasks: upgrades to article counter
Closed, InvalidPublic

Description

Problem:

  • The current article counter being capped at 200 results regardless of the filter results (topic or task type selection) is likely to confuse users about how filtering behavior works (since changing filters will often result in no change to the 200 results count).
  • However, we do not want to show users an overly large number for fear it will overwhelm them. For instance, if a user has no topics selected and chooses "Add links" in the difficulty filter in Arabic Wikipedia, the number will be something like 40,000.

User job story
When I make a change to the topics selected in suggested edits...
I want to see a change in the suggested edits article counter...
So that I know how many articles are related to my choice of filters.

Proposed updates:

  1. Article counter - show the actual number of results (i.e., no capping)
  2. Article cards
    1. Only fetch up to the first 200 results in the UI (per current behaviour).
    2. When the user views the 200th result, the next 200 results available will be fetched if they press the arrow to view the 201st result. And so on in 200 increments.
  3. Pager text:
    1. If there are 1-200 results, the text remains as per current '<#> of <total number> suggestions`
    2. If there are more than 200 results, change the text to say <#> of over 200 suggestions.
    3. If the user has tapped to view the 201st result, the pager text will change to say <#> of over 400 suggestions. And so on in 200 increments.

For visual reference - a sample scenario where there are 324 results:

1. Article counter shows the actual results
image.png (638×1 px, 65 KB)
2. Initially only the first 200 results are fetched
image.png (760×806 px, 396 KB)
3. On showing the 200th result, the right arrow can still be selected to show the 201st result
image.png (590×802 px, 161 KB)
4. Selecting the right arrow shows the 201st result (next batch of 200 fetched), with pager text updated accordingly
image.png (556×770 px, 338 KB)

Event Timeline

FWIW, the number of tasks we fetch from the API (which has performance implications), the number of cards we allow the user to page through, and the number we cap the result counter at, don't necessarily have to be the same. Detaching the first would take some engineering effort (making API continuation work), detaching the last would be trivial; so if we want to keep having 200 cards but show result counts up to, say, 1000, that would be easy to do.

FWIW, the number of tasks we fetch from the API (which has performance implications), the number of cards we allow the user to page through, and the number we cap the result counter at, don't necessarily have to be the same. Detaching the first would take some engineering effort (making API continuation work), detaching the last would be trivial; so if we want to keep having 200 cards but show result counts up to, say, 1000, that would be easy to do.

This would be my preference, since the main purpose of the result count is to indicate that the user's filter selections are causing a change in the article results, so capping the counter number always at 200 will be extremely confusing. To be clear, I would prefer we do not set a cap on the counter, but only fetch the first 200 cards in the UI. In the case for example when the count is 350, if a user actually paginates to the 200th card, that's when we would load the next 150 cards.

To be clear, I would prefer we do not set a cap on the counter, but only fetch the first 200 cards in the UI. In the case for example when the count is 350, if a user actually paginates to the 200th card, that's when we would load the next 150 cards.

Sounds good to me. For consistency, I would support us showing the total number in all locations (task and topic dialogs, start editing dialog, and the in the pager (1 of ... 40,000).

Detaching the first would take some engineering effort (making API continuation work), detaching the last would be trivial; so if we want to keep having 200 cards but show result counts up to, say, 1000, that would be easy to do.

Another option is to cheat a little bit and show the full counter in the suggested edits module pager (e.g. 40,000 for arwiki) but only actually fetch 200 tasks as we currently do, on the assumption that few if any users are actually going to click the right arrow so many times. That would save us some engineering time. If we implemented a variant where it was actually important to fetch (in a paginated way) all the tasks, like if we had a UI that showed tasks in a grid display with many dozens of tasks per page, then we could do the extra engineering work to implement continuation between front-end and back-end in requests to the growthtasks API.

@MMiller_WMF do we want to move ahead with this?

Yeah, that's what I meant with "keep having 200 cards". We'd probably want to change the copy for the no more results card though (maybe even add a different variant for the "there are more results but we won't show them" case) because the current one seems confusing.

@RHo -- could you please update the task description with exactly the behavior that you think should be implemented?

De-prioritizing off the sprint board in favor of other tasks.

No longer relevant.