Page MenuHomePhabricator

Add # of pages to categories in Category filter menu (and widen the menu)
Open, NormalPublic3 Story Points

Description

What to do

  1. Make the category lookup menu (but not the entry field) wider
  2. Make the category lookup menu display the number of pages per category item:

Design specs

TK from @Prtksxna

Why we're doing this

1. Widening the menu
As you can see in the screenshot below, there is also something of a display issue that happens when category names are long—as seems to be fairly common.

2. Adding the page totals
There are a lot of categories for which users have made bogus upper-case versions to serve as a kind of category redirect. E.g., Living people/Living People or African-American artists/African-American Artists (in both cases, the lower-case name is the real one). If users make the wrong choice during event setup, they may have a hard time figuring out why they aren't getting the metrics they expected.

Unfortunately, there is no technical way to pre-identify and exclude bogus categories. So instead, we propose to give users a clue as to which are the real categories by providing a count of the number of pages each category contains.

Event Timeline

Where is the repository located?

aezell added a subscriber: aezell.EditedOct 23 2018, 7:31 PM

It's here: https://github.com/wikimedia/grantmetrics

Seems like we have work to do to make this clearer. :)

In T207214#4689683, @aezell wrote:

It's here: https://github.com/wikimedia/grantmetrics
Seems like we have work to do to make this clearer. :)

I'm not sure what you are asking Alex. As far as I know, this is something we need to work on to release Category filter. Moving to Estimation (if there is a problem, just move it back).

It's here: https://github.com/wikimedia/grantmetrics
Seems like we have work to do to make this clearer. :)

I'm not sure what you are asking Alex. As far as I know, this is something we need to work on to release Category filter. Moving to Estimation (if there is a problem, just move it back).

I think he was responding to T207214#4689530 and T207214#4689668 :)

Prtksxna removed a subscriber: Prtksxna.Nov 21 2018, 8:19 AM
jmatazzoni renamed this task from Category filter does not observe category redirects to Add # of pages to categories in Category menu.Nov 28 2018, 12:24 AM
jmatazzoni set the point value for this task to 3.
jmatazzoni renamed this task from Add # of pages to categories in Category menu to Add # of pages to categories in Category filter menu (and widen the field somewhat) .Nov 28 2018, 1:44 AM
jmatazzoni updated the task description. (Show Details)
jmatazzoni moved this task from To be estimated to Holding on the Event Metrics board.
jmatazzoni added a subscriber: Prtksxna.

@MusikAnimal, is it possible to have the dropdown be wider than the input field?

Also, when we add the number of pages to the category we should make it so that its easy to scan with either all on the left or on the right.

jmatazzoni added a comment.EditedDec 4 2018, 5:44 AM

@Prtksxna, I like this design (below), with one refinement: please label the number "pgs." or "pages" so that it's unambiguous. Thanks.

Also, what happens if the category name is longer than the space? Can the number stay but the category name get truncated?

@Prtksxna @jmatazzoni With some hackery we can do all of the above. I really like the design!!! It might make the search a little slower, since we need a separate API call to get the category count, but we'll make it work.


I don't think we should repeat the word "pages" or "pgs.", it gets redundant. How about we only add the "pages" label to the first option?

If you add it to the first, it'll get lost if you scroll?

In any case -- this task is quite confusing as it's laid out right now. Did we settle on a design?

I'd like to move whatever we settle on to the description with a straight forward implementation plan, so it can be implemented without having to read through the whole discussion.

Mooeypoo updated the task description. (Show Details)Jan 14 2019, 11:49 PM
jmatazzoni renamed this task from Add # of pages to categories in Category filter menu (and widen the field somewhat) to Add # of pages to categories in Category filter menu (and widen the menu somewhat) .Mar 2 2019, 12:16 AM
jmatazzoni updated the task description. (Show Details)

@Prtksxna, I love this solution! Please provide any necessary design specs (and/or put the code into your mockup so engineers can just grab it). E.g., please clarify:

  • How wide can the menu extend?
  • What happens when (as seems likely) the category name still doesn't fit? Does it go "behind" the oval? How much space between where it truncates and the oval...
  • Provide any design specs necessary for the various elements

It might be useful to show how this concept works with some longer category names. Here is a list of capitalized and uncapitalized names you can use:

African-American Civil Rights Movement (1954–68) in film‏‎ (0 pgs)
African-American civil rights movement (1954–68) in film‏‎ (238 pgs)
African-American Civil Rights Movement (1954–68) in popular culture‏‎ (0 pgs)
African-American civil rights movement (1954–68) in popular culture‎ (5,320 pgs)

jmatazzoni renamed this task from Add # of pages to categories in Category filter menu (and widen the menu somewhat) to Add # of pages to categories in Category filter menu (and widen the menu) .Mar 2 2019, 12:17 AM
jmatazzoni removed a project: Community-Tech.
jmatazzoni moved this task from Holding to High value ideas on the Event Metrics board.
Restricted Application added a project: Community-Tech. · View Herald TranscriptMar 7 2019, 8:39 PM
  • How wide can the menu extend?

Since there isn't anything else on the side, I think this menu can extend to all the width it can get.

If possible, we can make the menu extend till the right edge of the remove button.

  • What happens when (as seems likely) the category name still doesn't fit? Does it go "behind" the oval? How much space between where it truncates and the oval...

Since categories usually have important information at the end of the name (such as a year), I'd rather we truncate in the middle using ellipses than in the end. So Rocket launches in India by ISRO Bangalore between years 2000-2010 would become Rocket launches in Indi…2000-2010. Would this be possible?

  • Provide any design specs necessary for the various elements

The number badge is the standard Bootsrap badge - <span class="badge">42</span>