Page MenuHomePhabricator

highlightQuery flag as true does not bold dropdown results when pages are translated to certain languages
Closed, InvalidPublicBUG REPORT

Description

Description
Coming out of https://phabricator.wikimedia.org/T281797 (once it is merged), when the highlightQuery feature flag is set to true and pages are rendered in certain languages, the dropdown results are not bolded as expected.

List of steps to reproduce (step by step, including full links if applicable):

  • In a local development environment, pull in relevant patches (vector + wvui) if they've not already been merged.
  • Make sure wvui built assets are sync'd to mediawiki/resources/lib/wvui
  • Update LocalSettings to use wvui search, set the search host to bn to use Bengali as an example, and set highlightQuery feature flag to true:
# WVUI Search
$wgVectorUseWvuiSearch = true;
$wgVectorSearchHost = 'bn.wikipedia.org';
$wgVectorWvuiSearchOptions = [
	"showThumbnail" => true,
	"showDescription" => true,
	"highlightQuery" => true
];
  • Use a Bengali string like "ইতাল" in the search box to view dropdown results.
  • Compare the search dropdown results with and without the query parameter uselang=bn.

What happens?:

When adding the query parameter ?uselang=bn to the url to translate the page into Bengali, the search results dropdown items after the query match are NOT bolded as expected.

Screen Shot 2021-05-26 at 9.13.19 AM.png (839×1 px, 201 KB)

What should have happened instead?:

The search results dropdown items should have characters after the query match bolded as they do when the query parameter is not added:

Screen Shot 2021-05-26 at 9.13.38 AM.png (798×1 px, 180 KB)

Event Timeline

ovasileva triaged this task as Medium priority.May 27 2021, 1:48 PM
Jdlrobson subscribed.

@cjming I'm not understanding the issue here.

I'm seeing bolding with uselang=bn and without it.

Screen Shot 2021-06-03 at 1.22.00 PM.png (920×940 px, 224 KB)

My understanding was the work we did here was to remove bolding on Bengali Wikipedia. With that in mind, why do we need to fix this? What is the problem we are solving for here?

@Jdlrobson strange -- on my local I don't see bolding when highlightQuery is true and uselang=bn

Screen Shot 2021-06-09 at 2.20.34 PM.png (882×1 px, 438 KB)

But I'm not sure how to recreate this issue elsewhere to verify if this is a bonafide bug.

the work we did here was to remove bolding on Bengali Wikipedia.

Oh, missed your last statement - in that case maybe there is no problem. We can close this then.

I thought the highlightQuery flag would apply everywhere in every language.

Yeh looks like this is working as expected.