Page MenuHomePhabricator

Allow deep category search in advanced search
Closed, ResolvedPublic1 Story Points

Description

Motivation
Searching for categories is one of the main use cases for advanced search, and most people expect such a search to also find contents of subcategories of the searched category.

Task
Add the new deep category search keyword to the advanced param form, once it is implemented.

Mock
For position and label see

Info i text

TEXT FOR COPYING:

Pages in this language:
Description: Searches for pages that are in these categories and subcategories.
Be aware of the following:

  • Only the first 5 subcategories will be considered in your search.
  • The number of categories is limited to 256.
  • You can look for pages in multiple categories.

Help page: deepcategory
Syntax-Equivalent in the normal search: deepcategory: followed by a category name like deepcategory:Help. Use double quotes if the name contains spaces: deepcategory:"Hidden categories".

Acceptance Criteria

  • The label and field are in the position as indicated in the mock
  • Users can add multiple categories to the field
  • There is a dropdown that suggests which categories exist, but you can also write your own category name that is not in the dropdown
  • The tags of categories without a file page have red font
  • A tag is only created by clicking the drop down item or pressing enter.

Note We can reuse the category multiselect widget from the Upload wizard

suggester:


no suggester when category doesn't exist but typing is possible:

after tag creation text turns red:

Event Timeline

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

Waiting for the deep cat keyword to be implemented by the Discovery-Search team

debt moved this task from needs triage to Up Next on the Discovery-Search board.
debt added a subscriber: Smalyshev.
debt added a subscriber: debt.Oct 17 2017, 5:53 PM

Let's scheduled a meeting to go over responsibilities for doing this work.

debt added a comment.Oct 19 2017, 7:48 PM

I've scheduled a meeting for Wednesday, Oct 25. If you'd like to attend and you don't have a calendar invite, please let me know.

Hi @debt, could you invite me (we have two Leas )? Unfortunately I can't do this Wednesday, though. Next week?

daniel added a subscriber: daniel.
debt added a comment.Oct 23 2017, 4:23 PM

Whoops, I've added you to the invite, @Lea_WMDE and moved it to next week. Let me know if that time is good! :)

@debt if you want me in for the technical perspective, please send me an invite. PLease note that next week is Daylight Confusion Week: for a week, we are only 8 hours ahead of your instead of the usual 9. Should make it a little easier to find a meeting time :)

debt added a comment.Oct 23 2017, 6:08 PM

I've added you to the meeting, @daniel - hopefully the time works for you! :)

Ainali added a subscriber: Ainali.Nov 21 2017, 9:09 PM
Lea_WMDE updated the task description. (Show Details)Feb 15 2018, 3:27 PM
Lea_WMDE moved this task from Text stuff to TODO/Doing (Design) on the Advanced-Search board.
Charlie_WMDE updated the task description. (Show Details)Feb 16 2018, 2:42 PM
Charlie_WMDE updated the task description. (Show Details)Feb 20 2018, 1:31 PM
Charlie_WMDE updated the task description. (Show Details)Feb 22 2018, 5:22 PM
Charlie_WMDE updated the task description. (Show Details)Mar 5 2018, 4:56 PM

@Lea_WMDE @JStrodt_WMDE I'm not sure about the error message we want to display when the search results get cut off. Do you have any input on the wording? I think it would be good to also reference the field with it's label that is causing this to happen because it might not be obvious that "pages in these categories" is the same as "deepcat".

@Charlie_WMDE I agree that "deepcat" would be confusing, but the text says "deepcategory search", and that's better. IMO it also depends on where the link "deepcategory" leads to. Do you know this already?

So the info text below would be a new ticket, and I am not sure how this will look like. Let's discuss this in UX JF first, before we go into detailed discussions here :)

Charlie_WMDE updated the task description. (Show Details)Mar 7 2018, 12:03 PM
Charlie_WMDE updated the task description. (Show Details)Mar 7 2018, 12:07 PM
Charlie_WMDE updated the task description. (Show Details)Mar 7 2018, 1:54 PM
Lea_WMDE updated the task description. (Show Details)Mar 7 2018, 2:15 PM
Charlie_WMDE updated the task description. (Show Details)Mar 7 2018, 3:10 PM
Lea_WMDE updated the task description. (Show Details)Mar 7 2018, 3:51 PM
Lea_WMDE changed the task status from Stalled to Open.Mar 14 2018, 1:39 PM
Lea_WMDE triaged this task as Normal priority.
Lea_WMDE updated the task description. (Show Details)
Lea_WMDE set the point value for this task to 8.
Charlie_WMDE updated the task description. (Show Details)Mar 14 2018, 1:41 PM
Charlie_WMDE updated the task description. (Show Details)
Charlie_WMDE updated the task description. (Show Details)Apr 4 2018, 1:33 PM

Change 425061 had a related patch set uploaded (by Tonina Zhelyazkova; owner: Tonina Zhelyazkova):
[mediawiki/extensions/AdvancedSearch@master] Add deep category field

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

@Lea_WMDE @Charlie_WMDE The category multiselect widget in UploadWizard creates pills which contain clickable links. Do we want that functionality in Advanced Search as well?
For reference:

(bottom left corner)
or see https://commons.wikimedia.org/wiki/Special:UploadWizard (Describe section)

Please don't deploy until T188350#4133189 and T192270 are fixed.

gabriel-wmde added a comment.EditedApr 17 2018, 11:31 AM

@Lea_WMDE @Charlie_WMDE Does the category field also have this "Create pill on comma" behavior like the others? Please say it doesn't.

It can't have the "Create pill on space" behavior since category names can contain spaces, so there already is an inconsistency.

Charlie_WMDE added a comment.EditedApr 17 2018, 12:48 PM

@gabriel-wmde No worries, it does not. Sorry for not writing that in the task description. I've updated the text.

@Tonina_Zhelyazkova_WMDE If this functionality comes automatically, feel free to include it. It's a plus not a minus. But keep in mind, just like in the upload wizard, the category opens in a new tab! If it means extra effort I guess it would have to be an extra ticket anyway? (sorry for the late reply)

Lea_WMDE changed the point value for this task from 8 to 1.
Lea_WMDE moved this task from Todo to Blocked externally on the WMDE-FUN-Sprint-2018-04-18 board.
Charlie_WMDE updated the task description. (Show Details)Apr 18 2018, 1:24 PM

I removed the part saying that the tag text color should be black and not blue. i.e. we should keep the color blue and red as in the original widget.

For transparency, as of now the deepcat field behaves in the following manner:

  • accepts only enter as pill separator.
  • categories which exist are marked in blue, the ones that do not - in red.
  • all category pills are click-able. The link opens in a new tab.

That all sounds great! Thank you.

Also for transparency I want to add, there is a drop-down that suggests categories based on what the user entered, which when selected with the mouse also form a pill, correct?

@Lea_WMDE both tickets referenced here seem to be done. Both gerrit branches are merged to master and seem deployed as of yesterday.
I tried testing the umlauts on de.wikimedia and it doesn't seem to be working. I also don't see the deepcategory:Philosophy search on en.wikipedia returning the expected warning.
Maybe I'm doing something wrong, may you please check the status?

I tested the warning on mediawiki, and it worked:

For the umlauts, there is no category with ä ö ü or ß on mediawiki (see https://www.mediawiki.org/w/index.php?title=Special:Categories&offset=&limit=500), so we should double check tomorrow on de-wiki.

I also don't see the deepcategory:Philosophy search on en.wikipedia returning the expected warning.

The patch for T188350: Produce search error if deepcat search returns too many categories is on 32-wmf.1 train, which means it will be deployed sometime tomorrow. You can check on group 0 wikis in the meantime, or on group1 ones later today.

@Tonina_Zhelyazkova_WMDE The fixes are now both live on dewiki/enwiki and work as intended, so we can continue with this ticket. :)

yay! Thanks @Smalyshev for the work and @MichaelSchoenitzer_WMDE for testing!

Lea_WMDE closed this task as Resolved.May 30 2018, 10:33 AM