Page MenuHomePhabricator

[Bug] CategoryLookupInputWidget only highlights letters in results when user types "Category:" (or substring) first
Closed, DeclinedPublic

Description

Steps to reproduce

  1. Login and turn on Beta mode in the hamburger menu settings at https://en.m.wikipedia.org/
  2. Visit https://en.m.wikipedia.org/wiki/Barack_Obama#/categories
  3. Click the "Add to category" blue button
  4. Type "1961" into the search box. Notice that there are no <strong> tags around the word "1961". Note: strong tags appearing in the results is a bug captured in T224819. The strong tags should not be escaped and the letters should be bolded instead.
  5. Now clear the input and type "Category:1961". Notice there are <strong> tags around the word "Category:1961"

Expected results

  • "1961" is highlighted when you type that in the text input without "Category:" in front of it

Actual results

  • "1961" is not highlighted. It is only highlighted when you type "Category:1961"

ezgif-5-61e3a8da30b1.gif (1×994 px, 3 MB)

Environments observed

  • Browser version: Chrome Version 75.0.3770.80
  • OS version: Mac OS 10.14.5
  • Device model: MacBook Pro
  • Device language: En

Check any additional observations

Open Questions

  • This highlight algorithm is the same one we use in mobile search box. This bug is present in the CategoryOverlay because the search results contain the "Category" namespace in the results. If we removed the namespace from the results, we might be able to keep the same highlight algorithm.

Event Timeline

nray renamed this task from [Bug] Example title to [Bug] CategoryLookupInputWidget only highlights when user types "Category:" first.Jun 11 2019, 7:11 PM
nray added a project: MobileFrontend.
nray renamed this task from [Bug] CategoryLookupInputWidget only highlights when user types "Category:" first to [Bug] CategoryLookupInputWidget only highlights letters in results when user types "Category:" first.Jun 11 2019, 7:15 PM
nray updated the task description. (Show Details)
nray renamed this task from [Bug] CategoryLookupInputWidget only highlights letters in results when user types "Category:" first to [Bug] CategoryLookupInputWidget only highlights letters in results when user types "Category:" (or substring) first.Jun 11 2019, 7:23 PM
ovasileva triaged this task as Medium priority.Jun 18 2019, 3:41 PM
Jdlrobson lowered the priority of this task from Medium to Low.Jul 9 2019, 4:36 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson added projects: patch-welcome, OOUI.
Jdlrobson subscribed.

Category is in beta, so marking as low.
This category search widget uses OOUI (which is different to search) which I guess doesn't support highlighting in this way so we may need to add that support in OOUI first.

Jdlrobson changed the task status from Open to Stalled.Jul 24 2020, 3:38 PM

Stalled on T246049

We are removing this feature. See T246049