Page MenuHomePhabricator

CategoryLookupInputWidget search box shows <strong> tags in search results
Open, LowPublic

Description

To reproduce:

Observe: "<strong>" and "</strong>" tags are visible in autocompletions.

This doesn't happen if you type the category name without the "Category" namespace (this is another bug captured in T225556). This happens on desktop and on mobile phone.

Developer Notes

Acceptance Criteria

  • The "<strong>" tags should not be escaped. When present, the user should see the letters bolded instead.

Event Timeline

Amire80 created this task.Jun 2 2019, 8:30 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 2 2019, 8:30 AM
pmiazga assigned this task to nray.Jun 3 2019, 8:21 PM
pmiazga added a project: Readers-Web-Backlog.
pmiazga moved this task from Incoming to Needs Prioritization on the Readers-Web-Backlog board.
ovasileva triaged this task as Medium priority.Jun 4 2019, 1:23 PM
nray updated the task description. (Show Details)Jun 4 2019, 2:58 PM
nray updated the task description. (Show Details)
nray updated the task description. (Show Details)Jun 4 2019, 3:46 PM
nray updated the task description. (Show Details)Jun 4 2019, 3:53 PM
nray updated the task description. (Show Details)

I can replicate this bug, and I think there are potentially two parts to this ticket we may want to address (described in developer notes)

nray updated the task description. (Show Details)Jun 4 2019, 3:57 PM
nray updated the task description. (Show Details)Jun 4 2019, 3:59 PM
nray updated the task description. (Show Details)Jun 4 2019, 6:37 PM
nray updated the task description. (Show Details)Jun 4 2019, 6:45 PM
nray updated the task description. (Show Details)Jun 4 2019, 6:51 PM
nray updated the task description. (Show Details)
nray updated the task description. (Show Details)Jun 4 2019, 6:57 PM
nray renamed this task from On mobile web, the search box shows <strong> tags in the Add to category to CategoryAddOverlay search box shows <strong> tags in search results.Jun 4 2019, 7:29 PM
pmiazga removed nray as the assignee of this task.Jun 6 2019, 3:09 PM
pmiazga moved this task from Needs Prioritization to Upcoming on the Readers-Web-Backlog board.
pmiazga added a subscriber: nray.
nray added subscribers: alexhollender, ovasileva.EditedJun 7 2019, 9:09 PM

I moved this back to needs analysis because I think we need to sort out whether the second AC bullet point I've listed, "If a substring matches the user's search input...", is actually necessary so we can know the scope of this task while estimating.

@ovasileva @alexhollender I noticed we display the "Category:" namespace when a user searches for categories to add, but not when they are viewing the categories that page is already a part of. Is this a bug? Should we even display the "Category" namespace when the user is searching for categories? See below for the Category "1961 births"


nray claimed this task.Jun 8 2019, 12:24 AM

I am not familiar with this part of the UI or categories more generally. My thoughts:

from "Acceptance Criteria" section of the task description
If a substring matches the user's search input, that substring is bolded regardless if the substring is at the beginning or not.

As far as I can tell we don't do this with our main search, nor does it seem a feature on other popular search interfaces (just tried Google, YouTube, and Twitter). I wonder what the motivation or added value would be there? I can imagine someone typing in "Hockey" and the value of "Ice hockey" appearing, but that seems like a larger issue than the characters being bolded or not.

I noticed we display the "Category:" namespace when a user searches for categories to add, but not when they are viewing the categories that page is already a part of. Is this a bug? Should we even display the "Category" namespace when the user is searching for categories?

Since the search box's placeholder text says "Search categories" I think it'd be fine to drop the "Category:" prefix from the search results.

Thinking about this some more:

from "Acceptance Criteria" section of the task description
If a substring matches the user's search input, that substring is bolded regardless if the substring is at the beginning or not.

I don't know if this would be possible unless we changed the way the search works. Currently if I type "Ak" into the search field I am only shown results that start with "Ak". Maybe I'm missing something, but I don't understand how the proposed idea would be possible given how search works currently.

nray added a comment.EditedJun 10 2019, 2:59 PM

Thinking about this some more:

from "Acceptance Criteria" section of the task description
If a substring matches the user's search input, that substring is bolded regardless if the substring is at the beginning or not.

I don't know if this would be possible unless we changed the way the search works. Currently if I type "Ak" into the search field I am only shown results that start with "Ak". Maybe I'm missing something, but I don't understand how the proposed idea would be possible given how search works currently.

Thanks for your feedback @alexhollender. Regarding that AC point - I was overly broad in the wording of that, but my intention was to focus on the fact that <strong> tags are only applied when a user literally types the the word "Category:" before they type the category they are searching for. (e.g. If you type Ak, results for "Ak" will come up but the <strong> tags (which should make the word bolded) won't be there unless the user types Category:Ak. I think that diminishes the value of that highlight feature and I wonder if we could just drop the word "Category" from appearing in the search results so that the highlight algorithm we have could remain the same.

I'm going to split that off into another ticket though as I have a feeling there's more discussion to be had there and the priority might be different than the first AC point.

nray updated the task description. (Show Details)Jun 11 2019, 7:25 PM

I removed the second AC and moved it to its own task at https://phabricator.wikimedia.org/T225556

nray renamed this task from CategoryAddOverlay search box shows <strong> tags in search results to CategoryLookupInputWidget search box shows <strong> tags in search results.Jun 11 2019, 7:26 PM
nray removed nray as the assignee of this task.
nray moved this task from Needs Prioritization to Upcoming on the Readers-Web-Backlog board.
Jdlrobson lowered the priority of this task from Medium to Low.Jul 9 2019, 4:22 PM
Jdlrobson moved this task from Upcoming to Triaged but Future on the Readers-Web-Backlog board.
Jdlrobson added a subscriber: Jdlrobson.

Categories are in beta and is a very neglected feature. Based on this triaged but future+low seems appropriate here.

Jdlrobson updated the task description. (Show Details)Oct 15 2019, 4:25 PM