Page MenuHomePhabricator

Hovercard isn't showing any content when page has no lead section
Closed, DuplicatePublic

Description

Request to pages without a lead section return blank text extracts which are displayed as empty in popups.

Hovercard isn't showing any content, it should at least show something.
Source: https://en.wikipedia.org/wiki/Front_end Link "Front-end engineering"

Event Timeline

Volker_E created this task.Jun 24 2016, 3:42 PM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJun 24 2016, 3:42 PM
Volker_E updated the task description. (Show Details)Jun 24 2016, 3:55 PM
Volker_E updated the task description. (Show Details)
Jdlrobson renamed this task from Hovercard isn't showing any content to Hovercard isn't showing any content when page has no lead section.Jun 24 2016, 7:26 PM
Jdlrobson updated the task description. (Show Details)

The query uses exintro because otherwise the magnificent textextracts returns unparsed wikitext for the next sections (as advised by iOS folk). This results in the api returning nothing.

cc/ @Mhurd @Fjalapeno how do you deal with articles without a lead section on the preview? does it show empty like here in hovercards?

There's several ways we can address this:

  • Fix text extracts to return content from the first section if there is no lead section when you send exintro
  • In hovercards, either by modifying the api query somehow (not sure if there's a good combo of params we can change to) or so that if the summary from exintro comes empty, then query a second time with other params.

Thoughts welcome.

Thanks @Volker_E for the report, good catch!

Jhernandez triaged this task as High priority.Jun 30 2016, 5:24 PM
Jhernandez moved this task from Incoming to Needs Prioritization on the Readers-Web-Backlog board.

A third option is to not show a hovercard at all when no extract is found. Pulling from a section is unlikely to be useful.

@Jdlrobson ^I was thinking about the same option, but came to the conclusion, that not showing anything is undesirable behaviour. When Hovercard option is activated, we're building up user expectations and would then break the interaction model without feedback.

My take on this: If an article doesn't have a lead section generating an extract from the first section would be less useful. Showing a Wikidata description in this case may be a better fallback.

It is worth mentioning that an article lacking a lead section is an edge case and arguably the absence of a lead section indicates the article needs some love as it is not mobile friendly (the example you give is a good one) .

My take on this: If an article doesn't have a lead section generating an extract from the first section would be less useful. Showing a Wikidata description in this case may be a better fallback.

  • Navpopups just shows the first 600 characters (by default) no matter where they come from. This seems to work quite well.
  • I'm hesitant about using Wikidata descriptions. They're meant to be minimal descriptions, and are often nothing more than 1 or 2 words. Plus are frequently not available.
  • It would be really good to get support for extracting from sections - T65792: #section-links should preview the correct subsection - If this task moves us towards that, then huge +1. -- (Navpopups supports it already, e.g. the "Debugger front-end" link at front end).

It is worth mentioning that an article lacking a lead section is an edge case and arguably the absence of a lead section indicates the article needs some love as it is not mobile friendly (the example you give is a good one) .

All Wikipedia articles should have intro sections. I would assume this is universal across all languages, though there are only 24 specific language MoS pages listed at https://www.wikidata.org/wiki/Q10966628
That example was indeed a problem in the article (old revision) which I've fixed by moving the first header down (and relabelling it).

It is worth mentioning that an article lacking a lead section is an edge case and arguably the absence of a lead section indicates the article needs some love as it is not mobile friendly (the example you give is a good one) .

Exactly. We could inform the user that the article needs some love and give a link to edit the article.

This is an interesting case. Here's my input.

Exactly. We could inform the user that the article needs some love and give a link to edit the article.

if we do that, a reader who is seeking information is asked to write it. don't quite agree that it will be useful.

it will be like,
user: I wanna know about frontend engineering
wikipedia: why don't you write about it?
user: but i don't know, that's why i'm looking for it
wikipedia: but you should write it

sorry about the joke but you know what i mean :)

anyways, the user expectation of seeing a card is right though. feels like a case of error state.

as for any error state, the two parts would be

What's wrong

  • sorry, there isn't a page preview for this

What can you do about it?

  • read the article
  • write the page preview

Notice the the consistent terminology of calling it a page preview

Mock

Assumption
This is an edge case and the root problem is fixing the articles.

Possible solution for root problem
can we automatically put up a page notice (a bot perhaps) to keep editors informed that someone tried using hovercard for this article and they didn't get what they wanted so the (existance of) lead section for this important? (maybe after 10 users try hovercard for this article)

furthermore

If an article doesn't have a lead section generating an extract from the first section would be less useful.

Less useful than no information at all? if that's possible, i think it can work better than error states.

bmansurov added a comment.EditedJul 22 2016, 4:06 AM

@Nirzar, how about we show content from a non-lead section?

@bmansurov Can we? would that from the first few lines of the first section?

I don't know how TextExtracts works. Spike?

@ovasileva - check how often this happens