Page MenuHomePhabricator

Newcomer tasks: implement difficulty filters
Closed, ResolvedPublic

Description

Difficulty filter (desktop mockup and mobile mockup)

  • Design
    • This button opens a modal with a series of checkboxes listing each task type available in the wiki, grouped by level of difficulty.
    • These checkboxes combine like “OR” across the levels of difficulty.
    • By default, all the “Easy” task types are checked on.
    • The user’s choices are sticky from time to time as they open and close the filter.
    • An additional option, “Create a new article”, will exist under the “Hard” difficulty, and will have a greyed-out checkbox, along with text that contains a link to a help page about writing a new article. This will link will be provided by ambassadors in T235722.
    • A counter along the bottom that says how many articles fit the filter settings. This should update dynamically as the user alters the filters. When the topic overlay also exists, this number should include any topic filter settings.
    • If the user unchecks all the boxes, the "Done" button is disabled, and a warning message is displayed at the top of the overlay. If they close the dialog, it is like "Cancel", and their settings are unchanged from when they opened it. (desktop mockup and mobile mockup)
    • The button to open the filter says the difficulty level of the chosen tasks. If the user selects tasks from multiple difficulty levels, the difficulty levels are written in a comma separated sentence, and then cut off with an ellipses. (desktop mockup and mobile mockup)
  • Copy
    • Copy for the filter is in this sheet in the "Final copy" column.
    • Copy is also relatively up-to-date in the mockups, but the spreadsheet is the canonical version.
    • The copy under the "Create a new article" task type includes a link to learn more about how to create a new article. Below is a list of those links for our wikis.

Details

ProjectBranchLines +/-Subject
mediawiki/extensions/GrowthExperimentsmaster+1 -0
mediawiki/extensions/GrowthExperimentsmaster+15 -1
mediawiki/extensions/GrowthExperimentsmaster+4 -2
mediawiki/extensions/GrowthExperimentsmaster+13 -3
mediawiki/extensions/GrowthExperimentsmaster+9 -9
mediawiki/extensions/GrowthExperimentsmaster+48 -35
mediawiki/extensions/GrowthExperimentsmaster+41 -22
mediawiki/extensions/GrowthExperimentsmaster+16 -4
mediawiki/extensions/GrowthExperimentsmaster+6 -9
operations/mediawiki-configmaster+25 -0
mediawiki/extensions/GrowthExperimentsmaster+12 -3
mediawiki/extensions/GrowthExperimentsmaster+17 -32
mediawiki/extensions/GrowthExperimentsmaster+14 -8
mediawiki/extensions/GrowthExperimentsmaster+25 -2
mediawiki/extensions/GrowthExperimentsmaster+389 -22
Show related patches Customize query in gerrit

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Change 547165 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/GrowthExperiments@master] Suggested Edits: Load sticky filter state into difficulty dialog

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

Change 547167 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/GrowthExperiments@master] Suggested Edits: Reduce repetition in checkbox config code

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

Change 547165 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Suggested Edits: Load sticky filter state into difficulty dialog

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

Change 547167 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Suggested Edits: Reduce repetition in checkbox config code

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

@MMiller_WMF - the following items from the specs were marked with a red exclamation point
(1)

A counter along the bottom that says how many articles fit the filter settings. This should update dynamically as the user alters the filters. When the topic overlay also exists, this number should include any topic filter settings.

As for now, it cannot be tested in betalabs - the counter always show 200 available articles.

(2)

If the user unchecks all the boxes, the "Done" button is disabled, and a warning message is displayed at the top of the overlay. If they close the dialog, it is like "Cancel", and their settings are unchanged from when they opened it. (desktop mockup and mobile mockup)

No warning message is displayed. And there is a bug - T236973: Newcomer tasks: 'Done' button still active when no filters are selected

(3)

The button to open the filter says the difficulty level of the chosen tasks. If the user selects tasks from multiple difficulty levels, the difficulty levels are written in a comma separated sentence, and then cut off with an ellipses.

Longer names for filters do not produce elipses

Etonkovidova added a comment.EditedOct 31 2019, 12:31 AM

Two questions

@MMiller_WMF Based on this new sheet the tasks header should be changed, for example from "References" -> "Find references"?

Present wordingProposed wording

@RHo - in the icon ( the multi-color variant) that used for Easy, Medium, and Hard levels on the difficulty overlay, the bars emphasize the meaning of difficulty: one darkened bar is Easy level and so on. In the black-and-white variant (which is already strange not to use the same icon as on the difficulty overlay), the bars are always empty.

RHo added a comment.Nov 1 2019, 10:02 AM

@RHo - in the icon ( the multi-color variant) that used for Easy, Medium, and Hard levels on the difficulty overlay, the bars emphasize the meaning of difficulty: one darkened bar is Easy level and so on. In the black-and-white variant (which is already strange not to use the same icon as on the difficulty overlay), the bars are always empty.

hi @Etonkovidova - the monochrome outline levels icon should only appear for when the filter has mixed-difficulty tasks selected (e.g., "Easy, Medium tasks"), for when only 1 difficulty type is selected, the same icon for that single difficulty task should be shown (so for e.g., Hard tasks should show the bars all filled in the Red30 colour)

Moving back to Ready for Development to address the issues mentioned in above comments
(1) Align the label text with this new sheet (as @MMiller_WMF confirmed it should be done.

(2)

@RHo - in the icon ( the multi-color variant) that used for Easy, Medium, and Hard levels on the difficulty overlay, the bars emphasize the meaning of difficulty: one darkened bar is Easy level and so on. In the black-and-white variant (which is already strange not to use the same icon as on the difficulty overlay), the bars are always empty.

hi @Etonkovidova - the monochrome outline levels icon should only appear for when the filter has mixed-difficulty tasks selected (e.g., "Easy, Medium tasks"), for when only 1 difficulty type is selected, the same icon for that single difficulty task should be shown (so for e.g., Hard tasks should show the bars all filled in the Red30 colour)

Icons should be adjusted to be

  • mono-chromed when there is a mix of levels
  • for a single level - the multi-colored icon should be used
MMiller_WMF updated the task description. (Show Details)Nov 1 2019, 11:52 PM
Restricted Application added a subscriber: revi. · View Herald TranscriptNov 1 2019, 11:52 PM

I just added the URLs for the "Create a new article" link.

Change 547835 had a related patch set uploaded (by Catrope; owner: Catrope):
[mediawiki/extensions/GrowthExperiments@master] DifficultyFiltersDialog: Use info link for creating articles here too

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

A counter along the bottom that says how many articles fit the filter settings. This should update dynamically as the user alters the filters. When the topic overlay also exists, this number should include any topic filter settings.

That's just how it will be until topic filtering is added. Basically there will always be more than 200 results, so the counter will always say 200. The exception is if some subset of those articles are protected or missing in the local wiki in which case the counter can drop to ~180 or ~190.

If the user unchecks all the boxes, the "Done" button is disabled, and a warning message is displayed at the top of the overlay. If they close the dialog, it is like "Cancel", and their settings are unchanged from when they opened it. (desktop mockup and mobile mockup)

I'll fix that now.

The button to open the filter says the difficulty level of the chosen tasks. If the user selects tasks from multiple difficulty levels, the difficulty levels are written in a comma separated sentence, and then cut off with an ellipses. (desktop mockup and mobile mockup)

Likewise, I'll submit a patch to add ellipses.

Change 548233 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/GrowthExperiments@master] Suggested Edits: Only save preferences when "Done" is pressed

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

Change 547835 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] DifficultyFiltersDialog: Use info link for creating articles here too

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

Change 548240 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/GrowthExperiments@master] Suggested Edits: Reset checkbox state and card on cancel

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

Change 548247 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/GrowthExperiments@master] Suggested Edits: Use ellipses for long text in filter button label

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

Change 548252 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/GrowthExperiments@master] Suggested Edits: Update button icon depending on task type selection

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

Change 548254 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/GrowthExperiments@master] Suggested Edits: Update copy per latest spreadsheet revisions

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

There are patches pending code review for all of the outstanding issues except for

The copy under the "Create a new article" task type includes a link to learn more about how to create a new article. Below is a list of those links for our wikis.

which needs a config patch.

Change 548260 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[operations/mediawiki-config@master] GrowthExperiments: Add suggested edits links and remote config title

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

which needs a config patch.

Also ready for review now.

Change 548260 abandoned by Kosta Harlan:
GrowthExperiments: Add suggested edits links and remote config title

Reason:
In favor of 547831

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

Change 548233 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Suggested Edits: Only save preferences when "Done" is pressed

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

Change 548240 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Suggested Edits: Reset checkbox state and card on cancel

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

Change 548252 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Suggested Edits: Update button icon depending on task type selection

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

Change 548254 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Suggested Edits: Update copy per latest spreadsheet revisions

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

Change 548247 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Suggested Edits: Use ellipses for long text in filter button label

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

Etonkovidova updated the task description. (Show Details)Nov 5 2019, 1:24 AM
Etonkovidova updated the task description. (Show Details)Nov 5 2019, 1:35 AM

Re-checked and added green check marks for implemented specs.

@kostajh The only spec is needed to be done is (may be some fixes were not merged yet?)

If the user unchecks all the boxes, the "Done" button is disabled, and a warning message is displayed at the top of the overlay.

There is a discrepancy in the counter which is filed as - T237347 (could it the issue only in betalabs).

If the user unchecks all the boxes, the "Done" button is disabled, and a warning message is displayed at the top of the overlay.

yeah I missed that. Working on it now.

Change 548762 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/GrowthExperiments@master] (wip) Suggested Edits: Show error if all checkboxes are deselected

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

Change 548765 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/GrowthExperiments@master] Suggested Edits: Add message for difficulty filter error

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

Change 548766 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/GrowthExperiments@master] Suggested Edits: Show error message if all checkboxes are deselected

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

Change 548762 abandoned by Kosta Harlan:
(wip) Suggested Edits: Show error if all checkboxes are deselected

Reason:
Other patch splits up the work so the translation message can get merged today

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

Change 548765 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Suggested Edits: Add message for difficulty filter error

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

yeah I missed that. Working on it now.

@RHo We can use the default OOUI icon at whatever opacity level we want (see e.g. T225318#5526984 and T198770) but to have the red color we'll need to create and load an SVG. Please let me know how to proceed.

RHo added a comment.Nov 6 2019, 9:50 AM

yeah I missed that. Working on it now.

@RHo We can use the default OOUI icon at whatever opacity level we want (see e.g. T225318#5526984 and T198770) but to have the red color we'll need to create and load an SVG. Please let me know how to proceed.

Hi @kostajh - I think there should be a red version of this icon in OOUI already:
https://doc.wikimedia.org/oojs-ui/master/demos/?page=widgets&theme=wikimediaui&direction=ltr&platform=desktop

Oh indeed. Thanks @RHo!

Change 548766 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Suggested Edits: Show error message if all checkboxes are deselected

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

Etonkovidova updated the task description. (Show Details)Nov 8 2019, 10:23 PM
Etonkovidova updated the task description. (Show Details)Nov 8 2019, 10:27 PM
Etonkovidova moved this task from QA to Design Review on the Growth-Team (Current Sprint) board.EditedNov 8 2019, 10:35 PM

For Design review - the following spec displays a differenct logic (checked in betalabs):

If the user unchecks all the boxes, the "Done" button is disabled, and a warning message is displayed at the top of the overlay. If they close the dialog, it is like "Cancel", and their settings are unchanged from when they opened it.


Notes - the following issues may be filed as separate tasks:

  • if a user clicks 'Cancel', the filter will display 'Select types of edits' and 'No suggestions found'

  • clicking 'Select types of edits' button again will present the active 'Done' button

Thanks, @Etonkovidova. The behavior you're noticing is incorrect. It should not be possible for the user to uncheck all the boxes, close the dialog, and end up with no suggestions. When they uncheck all the boxes and close the dialog, their changes just should not save -- it should go back to whatever settings they had before opening the dialog in the first place.

Back to Ready for Development.

I am merging in @Etonkovidova's bug on T238286: Newcomer tasks - label description (oo-ui-labelElement-label) is empty when no filters are selected into a comment here, since this is where we're having the main discussion.


The issue described below seems to be a regression bug which is directly related to the following T235042-comment

The issue is in testwiki and in betalabs.

  1. Click on the filter selection button and unselect all filters.
  2. The 'Done' button is inactive, so click 'X'
  3. Click the filter selection button again and the difficulty filter overlay will be presented without any selected filters but with the active 'Done' button (this is the bug described in T235042-comment

). Click on 'Done'.

  1. Now reload Homepage or navigate away and return back via the browser Back button. The label will be missing:

The label is empty:

<span class="oo-ui-labelElement-label"></span>

Change 551809 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/GrowthExperiments@master] Disable done button when no checkboxes are selected

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

Change 551809 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Disable done button when no checkboxes are selected

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

@kostajh -- I was just testing this out in beta. While I can confirm that this does disable the Done button, the user is still able to uncheck all the boxes and click the "x", leaving them with no suggestions (i.e. their "no boxes" setting was saved even though they cancelled the dialogue). If they uncheck all the boxes (or do anything else with the boxes), clicking "x" should ignore what they did and put them back the way they were before they opened the dialogue.

@kostajh -- I was just testing this out in beta. While I can confirm that this does disable the Done button, the user is still able to uncheck all the boxes and click the "x", leaving them with no suggestions (i.e. their "no boxes" setting was saved even though they cancelled the dialogue). If they uncheck all the boxes (or do anything else with the boxes), clicking "x" should ignore what they did and put them back the way they were before they opened the dialogue.

That's tracked in T238172: Newcomer tasks: do not refresh suggestions if user cancels difficulty filter, right? If I've understood correctly, then I'd say we handle that specific functionality over there and resolve this task.

[mediawiki/extensions/GrowthExperiments@master] Disable done button when no checkboxes are selected
https://gerrit.wikimedia.org/r/551809

Checked - it works.

MMiller_WMF closed this task as Resolved.Dec 10 2019, 1:46 AM

I am resolving this, but putting comments on T238172 at @kostajh's suggestion, because the user is still able to blank out their selections and end up with no suggestions in the module.