Page MenuHomePhabricator

Request: Make search results show descriptions as two lines rather than one line
Open, MediumPublicBUG REPORT

Description

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

What happens?:
On my screen at least, the short description is truncated at 59 characters in Vector 2022, followed by an ellipsis.

Here's what the search looks like in the Vector 2022 skin, desktop version:
https://commons.wikimedia.org/wiki/File:SD_search_in_vector_2022_skin.png

Here's what the search looks like in the current default skin available to non-logged-in readers, mobile version:
https://commons.wikimedia.org/wiki/File:SD_search_in_2022_default_skin.png

What should have happened instead?:
In most skins and apps and browsers, when the short description is shown in the search results, the search results provide at least two lines of text in the short description. This new, and presumably better, skin should show at least two lines of text.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.:

Event Timeline

It has been brought to my attention that this same problem exists in an even worse form in the "Related articles" section of the default mobile skin. Here's a screen shot showing truncation at just 35 characters:
https://commons.wikimedia.org/wiki/File:SD_in_related_articles_2022_default_mobile_skin.png

This display should also have at least two lines.

FWIW, I am using Chrome on Mac OS, logged out, with mostly default settings. The viewable area inside my browser window is 1225x701.

Aklapper renamed this task from Vector 2022 skin fails to show a second line for short descriptions when searching to Vector 2022 skin fails to show second line of text for short descriptions in search proposals.Jun 24 2022, 8:15 AM
Jdlrobson renamed this task from Vector 2022 skin fails to show second line of text for short descriptions in search proposals to Request: Make search results show descriptions as two lines rather than one line.Jun 24 2022, 3:04 PM
Jdlrobson moved this task from Incoming to Requests on the Desktop Improvements (Vector 2022) board.
Jdlrobson added a project: Codex.
ovasileva triaged this task as Medium priority.Aug 31 2022, 2:37 PM
ovasileva moved this task from Incoming to Groomed on the Web-Team-Backlog board.

@Sarai-WMDE - wondering if the Design Systems team has any thoughts on this? This is currently what it looks like on mobile - I'm not sure if we would want it to stretch, but maybe there's an option to show text on multiple lines if there's space within the card.

Screen Shot 2022-08-31 at 4.38.48 PM.png (814×451 px, 140 KB)

Hey @ovasileva 👋🏻 Showing description text in multiple lines is possible, yes.

In Codex, MenuItems can be configured to either display descriptions in full, or to provide a truncated version of them. This is achieved via the property hideDescriptionOverflow. I think this property is set to true in the TypeaheadSearch component by default (see code), but this should be configurable.

Edit/Update: Please keep in mind that this would then make visible the entirety of the description content, at full length, for all items. They wouldn't be necessarily limited to two lines if their character count goes beyond that. (I'm not sure if there's any character limitation for descriptions at the moment).

Short descriptions of excessive length are errors, so we shouldn't worry about how they display.

en.WP controls the length of short descriptions via a tracking category. I don't know much about Wikidata, but if short description lengths are not being monitored there, they should be. Truncating the short description's display at 59 or 35(!) characters is unhelpful.

@Jonesey95 thanks for raising this question. Can you clarify which search result in the test case you mentioned ("Russian Soviet") lacks sufficient information/clarity, and would benefit from more of the short description being shown?

Screen Shot 2022-09-02 at 1.02.47 PM.png (456×539 px, 85 KB)

If, as you mentioned, short descriptions are meant to be short, I wonder if multiple lines are necessary? I hope that between the image, title, and first few words of the short description the search results are sufficiently distinct from one another, and sufficiently clear.

You can see that two of the short descriptions are truncated. The Vector 2022 skin is not supposed to be a degraded user experience in comparison to other skins. In most skins and apps and browsers, when the short description is shown in the search results, the search results provide at least two lines of text in the short description. This new, and presumably better, skin should show at least two lines of text.

See https://en.wikipedia.org/wiki/Wikipedia_talk:Short_description#Table_and_histograms_showing_SD_lengths for en.WP data.

About 3% of short descriptions (roughly 122,000 articles) are longer than 59 characters.

About 25% of short descriptions are longer than 34 characters.

I'm hoping that this will be a simple adjustment to some CSS in the skins.

@Jonesey95 I understand that some short descriptions are currently getting truncated, but I'm not sure whether that's a problem. For example with the search term Water two of the short descriptions are truncated (Watergate scandal, and Water buffalo), but I can still tell very easily what each of those pages are about:

Screen Shot 2022-09-02 at 5.40.19 PM.png (691×546 px, 145 KB)

In other words, the truncated short descriptions don't result in any kind of usability issue for me, as far as I can tell. If you have examples of search terms where the truncation of the short descriptions results in confusion, or the inability to have sufficient information about a given result in the menu, please share them with us.