Page MenuHomePhabricator

Allow deep category search in advanced search
Closed, ResolvedPublic1 Estimated 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

Exactly this text.png (1×1 px, 227 KB)

Info i text

infotextDeepcat.png (703×668 px, 123 KB)

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:

Screenshot_20180314_143827.png (513×897 px, 34 KB)

no suggester when category doesn't exist but typing is possible:
Screenshot_20180314_143755.png (460×916 px, 31 KB)

after tag creation text turns red:
Screenshot_20180314_143809.png (508×889 px, 38 KB)

Event Timeline

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

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

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?

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 :)

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

@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".

deepcatErrorMessage.png (1×1 px, 237 KB)

@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 :)

Lea_WMDE changed the task status from Stalled to Open.Mar 14 2018, 1:39 PM
Lea_WMDE triaged this task as Medium priority.
Lea_WMDE updated the task description. (Show Details)
Lea_WMDE set the point value for this task to 8.

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:

category_Help.png (955×1 px, 89 KB)
(bottom left corner)
or see https://commons.wikimedia.org/wiki/Special:UploadWizard (Describe section)

@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.

@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.

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:

Bildschirmfoto 2018-04-25 um 14.56.38.png (696×1 px, 133 KB)

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. :)