Page MenuHomePhabricator

New Pages Feed: filter to draft states (1.2)
Closed, ResolvedPublic8 Estimated Story Points

Description

The work in this task and in T195545 and T196181 make up the first useful feature change that we could roll out to users. The work in the task roughly accomplishes these user stories:

  • As a reviewer, I need to be able to filter to only those drafts that have been submitted to AfC and are awaiting review. This would include drafts that are awaiting their second, third, etc. review, but it would exclude drafts that have been submitted for review, have already been reviewed, and awaiting resubmission by their authors.
  • As a reviewer, I need to not accidentally attempt to review a draft already under review by another reviewer.

Specifically, the work is to build on T195545 by doing these things:

  • When "Articles for Creation" is selected:
    • The feed is filtered by default to the pages in the draft namespace that are of state "Awaiting review" (see bullets below for exact criteria of the different types of drafts).
    • The "Set filters" menu contains only the "State" options, with the default setting being "Awaiting review". These options are radio buttons -- only one can be selected at a time. Below are the "State" options and the criteria for identifying them with categories. If categories prove difficult to use, it may also be possible to detect these pages based on values of "Template:AFC submission", similarly to how the "Template:AFC statistics" page is made. Here are the criteria using categories:
    • The selected state is listed next to the word "Showing" in the list's header, e.g. "Showing: Awaiting review"

Note: the specifics listed above and the wireframe shown below may be changed by ongoing community conversation around the design, which can be found here.

Here is a wireframe of what the feed would look like after this work, showing the NPP/AfC toggle and the filter menu (note that this wireframe does not show many of the details that should remain unchanged, like the info listed with each page in the list):

AfC state after T195924.png (555ร—687 px, 53 KB)

Related Objects

Event Timeline

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

I might suggest renaming "All" to "All drafts," just to be clear that some of that is not in AfC.

kaldari set the point value for this task to 8.May 29 2018, 11:57 PM

@Samwilson @MusikAnimal -- in doing some investigating today, I realized that my original criteria for identifying "Unsubmitted" and "Declined" drafts was incorrect. The reason is because it turns out that all drafts created via the Article Wizard get a category that is like "Category:AfC submissions by date/10 April 2018", regardless of whether they have actually been submitted to AfC. I now believe it's not possible to distinguish "Unsubmitted" and "Declined" drafts from "All Drafts" without looking at templates. To clarify this, I made a spreadsheet showing which categories and templates are present on drafts as they progress through stages of the AfC workflow:

image.png (386ร—1 px, 84 KB)

And in the process of putting that together, I also ran counts to show how many drafts are in the different stages -- excluding redirects. This should help us understand the volume we're dealing with (keep in mind that this is just a snapshot from today, and it changes a little every day):

  • All drafts: 40,065
    • Unsubmitted: 19,359
    • Awaiting review: 1,101
      • Awaiting first review: 675
      • Awaiting subsequent review: 426
    • Declined: 19,605

I'm going to update the description of this task to give the correct criteria. I know we weren't planning on using templates for anything, so if this poses additional challenges, we should discuss in standup.

There should be a hidden category for declined (which we can query for just like any category, I think), e.g. https://en.wikipedia.org/wiki/Draft:Grey_Wolf_Communication is in "AfC submissions declined with a custom reason".

If it makes it easier, and users want this functionality, we could ask the community to make the AfC submission template add a generic "Declined AfC submissions" category. Then we could easily distinguish the various states by category alone.

@jmatazzoni -- I like your suggestions of making the state say "All drafts", instead of just "All". I made that change in the description.

@Samwilson @MusikAnimal -- I am going to ask community members about @MusikAnimal's idea of adding a "Declined" category. If that works out, then we can simplify the criteria for states, and I'll update the description accordingly.

No, that category already exists. Please go to https://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-rendering and scroll down to the "Advanced options" section. Tick the box for showing hidden categories, and then go look at a few declined drafts.

No, that category already exists. Please go to https://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-rendering and scroll down to the "Advanced options" section. Tick the box for showing hidden categories, and then go look at a few declined drafts.

Right, but we want a dedicated category for all declined drafts. Category:Declined AfC submissions exists but everything goes in a subcategory (which is harder to query for). Whether the community wants to use this (analogous to Category:Pending AfC submissions) or create a new category, is up to them. I think the pending category is only used in this way so they can use Special:RandomInCategory via the "Find a random AfC submission" button at CAT:PEND.

@MusikAnimal -- I posted here to ask the community's thoughts on that category change.

@MusikAnimal @Samwilson -- the community made the change, and now you can see all the declined drafts in Category:Declined AfC submissions. I double-checked the counts and categories in the MySQL database, and everything looks right to me. Could you please check it out on your end so I can tell the community member that we're all good on our end, or if we have any questions or additional requests?

Change 440018 had a related patch set uploaded (by MusikAnimal; owner: MusikAnimal):
[mediawiki/extensions/PageTriage@master] [WIP] Add AfC state filters for drafts

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

@MMiller_WMF It looks like Category:Draft AfC submissions contains only unsubmitted drafts, making our work a lot easier.

It does say at the top of the category page that it contains "Pending draft submissions, not yet submitted for review, or a reviewer has provided feedback and more work is needed before the submission is accepted." (emphasis mine). I think the "pending" part of this statement is inaccurate, or a misnomer (as they are pending submissions in the sense they are pending submission, not pending review). The "reviewer has provided feedback" -- I don't know this is true for any of the drafts listed in that category, but it's clear that drafts in the other three categories (pending, declined and being reviewed) are NOT also in Category:Draft AfC submissions.

So basically, for now I'm going to use Category:Draft AfC submissions. It may be worthwhile to check with the community that this is in fact what this category is for.

Or actually... I should get clarification: Is "unsubmitted" meant to include drafts that aren't part of AfC? If it means anything, usually non-AfC drafts won't get submitted to AfC, because that requires adding the template and correct parameters, which newbies don't know how to do.

@MusikAnimal -- yes, I also noticed that "Category:Draft AfC submissions" is on over 99% of the drafts that would belong to the "Unsubmitted" state. But there are a couple reasons that I shied away from actually using it:

  • I don't think that category is currently used for any part of the AfC process right now, so I would be concerned that it would have some category rot over time, be repurposed for something else, or otherwise break.
  • Using the absence of the other categories, as opposed to the presence of this one, will guarantee that our numbers add up to the total, which will reduce confusion -- and have fewer points of failure.

But it actually is easier to use the presence of this one category, as opposed to the absence of the other two?

Well, the important thing is whether or not we want unsubmitted AfC drafts, or does any draft count as unsubmitted? I think you said there were some 80,000 other drafts that aren't part of AfC, none of those have the "Draft AfC submissions" category.

In my opinion it may make more sense to show only pages relevant to AfC for this option, because as an AfC reviewer I'm probably more interested in drafts that were intent on being reviewed. Normal drafts are sometimes created by people like myself, just to perfect it before pushing to the mainspace. On the other hand, non-AfC drafts also need to be patrolled, but we can get those from the "All" option (and there most will be non-AfC, too).

I was also worried about the category rot, so if we do want to restrict to AfC then we should make sure this category is safe to use.

But it actually is easier to use the presence of this one category, as opposed to the absence of the other two?

I'm having trouble getting it to work properly without a category, but it's certainly doable and I will figure it out here soon enough. So, if this is a product decision that we want all drafts for "Unsubmitted", then it's worth doing the extra work.

@MusikAnimal -- for your reference, here are the current breakdowns of all non-redirect pages in the draft space:

  598 Awaiting first review
  399 Awaiting subsequent review
19682 Declined
19050 Unsubmitted (meaning that it is not awaiting review or declined)

I don't really consider there to be a notion of "unsubmitted AfC drafts" -- there are drafts that come from Article Creation Wizard, and those automatically have an AfC template on them. But drafts that do not come from the wizard can also be submitted to AfC, if they somehow get the template. I think that "Unsubmitted" should include all drafts that have never been submitted for review, regardless of whether they have an AfC template on them.

Change 440018 merged by jenkins-bot:
[mediawiki/extensions/PageTriage@master] Add AfC state filters for drafts

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

Change 442987 had a related patch set uploaded (by Niharika29; owner: MusikAnimal):
[mediawiki/extensions/PageTriage@wmf/1.32.0-wmf.10] Add AfC state filters for drafts

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

Change 442987 merged by Niharika29:
[mediawiki/extensions/PageTriage@wmf/1.32.0-wmf.10] Add AfC state filters for drafts

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

This gives an error in production if config var is not present:

Uncaught ReferenceError: is_draft is not defined
    at child.eval (eval at _.template (Special:NewPagesFeed:16), <anonymous>:3:1947)
    at child.template (<anonymous>:16:874)
    at child.render (<anonymous>:186:637)
    at child.addOne (<anonymous>:200:6)
    at Array.forEach (<anonymous>)
    at Function._.each._.forEach (<anonymous>:2:69)
    at child.Collection.(anonymous function) [as forEach] (<anonymous>:31:683)
    at child.addAll (<anonymous>:200:496)
    at child.trigger (<anonymous>:19:695)
    at child.reset (<anonymous>:29:440)
    at Object.options.success (<anonymous>:29:717)
    at fire (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki|mediawiki.base|mediawiki.legacy.wikibits&only=scripts&skin=vector&version=06sarth:46)
    at Object.fireWith [as resolveWith] (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki|mediawiki.base|mediawiki.legacy.wikibits&only=scripts&skin=vector&version=06sarth:47)
    at done (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki|mediawiki.base|mediawiki.legacy.wikibits&only=scripts&skin=vector&version=06sarth:126)
    at XMLHttpRequest.<anonymous> (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki|mediawiki.base|mediawiki.legacy.wikibits&only=scripts&skin=vector&version=06sarth:129)

Change 442995 had a related patch set uploaded (by Mooeypoo; owner: Mooeypoo):
[mediawiki/extensions/PageTriage@master] Verify is_draft exists before checking its value in underscore

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

Change 442995 merged by jenkins-bot:
[mediawiki/extensions/PageTriage@master] Verify is_draft exists before checking its value in underscore

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

โ€ข Vvjjkkii renamed this task from New Pages Feed: filter to draft states (1.2) to z0baaaaaaa.Jul 1 2018, 1:07 AM
โ€ข Vvjjkkii removed MusikAnimal as the assignee of this task.
โ€ข Vvjjkkii triaged this task as High priority.
โ€ข Vvjjkkii updated the task description. (Show Details)
โ€ข Vvjjkkii removed the point value for this task.
โ€ข Vvjjkkii removed subscribers: gerritbot, Aklapper.
CommunityTechBot renamed this task from z0baaaaaaa to New Pages Feed: filter to draft states (1.2).Jul 2 2018, 3:18 PM
CommunityTechBot assigned this task to MusikAnimal.
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot set the point value for this task to 8.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added subscribers: gerritbot, Aklapper.

@MusikAnimal -- I did some reviewing in Test Wiki and ran into some issues pretty quickly. Maybe I am doing something wrong, or maybe there are some wires that just need to be connected:

  • I am not able to find the Article Wizard on Test Wiki at this URL. Is it elsewhere? I thought I remember you saying you had put it on Test Wiki. I created drafts and applied categories manually without the wizard instead.
  • I created three drafts, and gave them all different categories. I see them all with state = "All", but I'm not seeing them show up with the State filters that correspond to their categories. All of these drafts only show up under "All":
    • Test Draft 001 has no categories, so I am expecting to see it with State of "Unsubmitted".
    • Test Draft 002 has "Category:Pending AfC submissions", so I am expecting to see it with State of "Awaiting review".
    • Test Draft 003 has "Category:Declined AfC submissions", so I am expecting to see it with State of "Declined".
    • I used the AFCH to submit Test Draft 004, but it also does not show up with state "Awaiting review".
  • In the filter menu itself in the UI, the header currently says, "That:" and is followed by the radio buttons with each of the possible states. We want that header to say "Show:", like the first header does on the NPP set of filters, and we want there to be a header above the radio buttons that says "State". Please see the wireframes in the description of this task for an image. Here's a screenshot of that "Show:" header:

image.png (165ร—261 px, 18 KB)

@MusikAnimal -- I just tried these things out in Beta Labs:

  • The Article Wizard is present there, and I was able to use it, though it seems to be somewhat different than in English Wikipedia, and it seems to apply a somewhat different AfC template than exists in English Wikipedia. Will that make a different for the validity of our testing?

Beta Labs:

image.png (413ร—933 px, 109 KB)

English Wikipedia:
image.png (411ร—928 px, 106 KB)

  • The filters do work correctly in Beta Labs. The appropriate drafts were filtered with the right states for the right categories.
  • The issue with the wording in the filter menu are there.

Change 445348 had a related patch set uploaded (by Samwilson; owner: Samwilson):
[mediawiki/extensions/PageTriage@master] Add 'State' label above AfC filter radio buttons

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

  • I created three drafts, and gave them all different categories. I see them all with state = "All", but I'm not seeing them show up with the State filters that correspond to their categories.

The AFC tag is not yet present in the database on testwiki; update.php needs to be run (I mean, in spirit, not actually).

The UI issue I've made a patch for: https://gerrit.wikimedia.org/r/445348

Screenshot_2018-07-12 New pages feed - Dev Wiki wiki1.png (174ร—176 px, 8 KB)

Did you want the 'Show:' to be in a larger font as well? Or is the bold/non-bold enough of a distinction?

@Samwilson -- what are the implications of update.php needing to be run? Is that something we can do? When?

Regarding the "Show:" issue -- that can be in the same size font, which is how the current filters work at https://en.wikipedia.org/wiki/Special:NewPagesFeed.

@Etonkovidova -- this is ready for you to test (pending @Samwilson's changes).

what are the implications of update.php needing to be run? Is that something we can do? When?

We've ran it. But the filtering still isn't working for some reason... investigation underway. Sorry for the confusion.

To get to the Article Wizard on testwiki, use this https://test.wikipedia.org/wiki/Wikipedia:Article_wizard/CreateDraft This is a direct link to the page to create the draft.

Change 445348 merged by Niharika29:
[mediawiki/extensions/PageTriage@master] Add 'State' label above AfC filter radio buttons

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

I think that @Samwilson's change should now be in beta, so I'm moving this to @Etonkovidova's column.

Checked in betalabs and in testwiki

@MMiller_WMF
(1) Filters are working for newly submitted drafts. Not sure, how new drafts need to be to get filtered properly though.

(2) Review (AFCH) option is present in both betalabs and testwiki (just a reminder that the option is present in monobook as a tab).
Using the option though produces Console error: Uncaught TypeError: Cannot read property 'pages' of undefined

(3) Categories: Pending AfC submissions Pending AfC submissions being reviewed now could be present at the same time, thus the article will be in Awaiting review, but not in Under review(example - https://test.wikipedia.org/wiki/Draft:Test_Zilant1_1). I need more testing on how those categories are tracked by the workflow. The mentioned example, Draft:Test Zilant1 1 also has a Declined AfC submissions but the filter won't show this draft which probably makes sense since the filter does not reflect the current status.

(4) Notification template added correctly to User talk page

@MMiller_WMF you may review the task for PM sign-off.

(1)

As a reviewer, I need to not accidentally attempt to review a draft already under review by another reviewer.

Special:NewPagesFeed 'Under review' filter gives no indication which reviewer is reviewing what. Even on the Draft page template 'Review in progress' there is only a reference to a reviewer that added the draft to under review 'Last edited 7 minutes ago by [username]'. Is it enough?

(2)

The feed is filtered by default to the pages in the draft namespace that are of state "Awaiting review" (see bullets below for exact criteria of the different types of drafts).

The default state is 'All'.

MMiller_WMF moved this task from QA to Q1 2018-19 on the Community-Tech-Sprint board.

@Etonkovidova -- I am good with all of this. I agree with you that we need to change the default state, so I filed that separately: T200948

Also filed separately is this issue about filtering to the pre-existing drafts in testwiki: T200945

I am now going to resolve this task.