Page MenuHomePhabricator

Consider supporting search query highlighting in Lookup and other Menu components
Open, LowestPublic

Description

TypeaheadSearch has a prop, highlightQuery, which allows implementations of the component to turn on visual highlighting of the search query within menu item titles. The Menu component takes in a searchQuery prop, which it then passes to each MenuItem. If the prop is provided to MenuItem, search query highlighting will be enabled for that menu item.

We should consider supporting this in other components that use a Menu, especially those which include a text input, such as Lookup and Combobox. If so, we could implement this in a similar manner as TypeaheadSearch by doing the following:

  • Adding a prop called highlightQuery to those components
  • If highlightQuery is true, the current search query will be passed to Menu

Acceptance criteria

  • Design: determine if this behavior should be supported, and in which components
  • If so, open tasks to enable the behavior in those components

Event Timeline

As noted in T311992, we have a use case for Lookup supporting query highlighting. I think it makes sense to enable this behavior in all components that have both a TextInput and a Menu, but will await feedback from the design team.