Page MenuHomePhabricator

[betalabs] Newcomer tasks - discrepancy in the counter
Closed, ResolvedPublic

Description

  1. On Homepage-Suggested edits module click on the filter button to select filters. The counter at the bottom of the overlay will display - 200 articles found.
  2. Deselect all filters - the counter at the bottom of the overlay will display - 200 articles found.
  3. If you start checking filters checkboxes, you'll see how the number 200 would get smaller, so when all filers are selected, the number of articles found would be less than 200.

Screen Shot 2019-11-04 at 6.00.48 PM.png (577×819 px, 105 KB)

The Easy filter always displays 200 and, logically, when other filters are selected in addition to Easy filter, the number of articles should still be 200. Arguably, in the real life, the numbers might reflect the situation when some articles get fixed while a user is sorting them with filters, but since it's not the case in test env, it'd be worth to see where discrepancy might be coming from.

Event Timeline

Etonkovidova renamed this task from [betalabs] Newcomer tasks - the discrepancy in the counter to [betalabs] Newcomer tasks - discrepancy in the counter .Nov 5 2019, 2:24 AM

The counter changes because, although the bucket of tasks we pull from always has more than 200, on the client-side we filter out articles that have a protected status. So if we get back 200 articles from the API there may be cases where 1 or more are protected; those are removed from the list we have from the API and then we have fewer than 200.

Deselect all filters - the counter at the bottom of the overlay will display - 200 articles found.

We should probably set it to 0.

@kostajh -- though I understand why the number ends up being less than 200, I think it is weird for the user to check more boxes and get fewer results. It may make them misunderstand that the checkboxes combine as ORs instead of ANDs. Is there any solution you recommend? What if you pulled like 250 instead of 200, then removed the protected articles, then displayed 200 of them?

And yes, when no boxes are checked, the count should be zero.

Eventually should probably move protected status check to the server side (and ideally to ElasticSearch).
In the short term, probably just fetch 250 tasks and use the extra 50 as a reserve to replace protected articles?

(By the way, do we really need to show the user 200 articles? I have a hard time imagining that anyone would go past 50 or so, and fetching so many tasks has a performance cost, both on the server side and for clients on slow connections.)

Change 548962 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/GrowthExperiments@master] Suggested Edits: Bump query to 250 tasks, then return slice of 200

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

Deselect all filters - the counter at the bottom of the overlay will display - 200 articles found.

@RHo what should the button label say when all filters are deselected?

image.png (1×1 px, 203 KB)

For now I've opted to reuse the dialog title and the difficulty-outline:

image.png (1×1 px, 207 KB)

Change 548970 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/GrowthExperiments@master] Suggested Edits: Allow count to set to 0 when checkboxes deselected

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

Deselect all filters - the counter at the bottom of the overlay will display - 200 articles found.

@RHo what should the button label say when all filters are deselected?

image.png (1×1 px, 203 KB)

Hi @kostajh - I thought this state would never be possible since there is an error message that users must select one task type to proceed?

image.png (424×1 px, 38 KB)

Or does the label change before the "Done" is instantiated? In which case what you have LGTM.

Or does the label change before the "Done" is instantiated? In which case what you have LGTM.

Right, the "live preview" part of this feature has the card in the background change, and the icon and label to the button widget are updated as the user selects/deselects checkboxes. You can see that currently on beta.

Change 548962 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Suggested Edits: Bump query to 250 tasks, then return slice of 200

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

Change 548970 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Suggested Edits: Allow count to set to 0 when checkboxes deselected

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

@MMiller_WMF - moving to PM Review column to inform you that the issue is resolved.

Checked in betalabs - the counter behaves as expected

  • no filters selected - the counter is zero
  • the issue - selecting more filters displays less results - is resolved.