Don't show reference previews that don't have visible content
Closed, ResolvedPublic2 Estimated Story Points

Description

It is possible a <ref> contains no visible content, e.g. only whitespace or HTML elements that are all invisible (display: none). Example: https://de.wikipedia.org/wiki/Adelsgesellschaft.

The Reference Previews popup appears empty in this case. This looks like a bug in the Popups extension, even if it was a deliberate choice made by the article author.

Since the only useful element in an empty popup is the "jump down to reference" link, this is what an empty popup should do instead: The popup should not be shown, but immediately jump down to the link target.

Event Timeline

Change 556644 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/Popups@master] [WIP] Don't show preview popups with no visible content

https://gerrit.wikimedia.org/r/556644

thiemowmde set the point value for this task to 2.
thiemowmde moved this task from Proposed to Currently in sprint on the WMDE-TechWish board.
thiemowmde moved this task from Sprint Backlog to Review on the WMDE-QWERTY-Sprint-2020-10-21 board.

I'm trying to understand the use case. Which reference in the example article is visibly empty?

I'm trying to understand the use case. Which reference in the example article is visibly empty?

I see--like the footnote after "Fisch und Falken", currently "[83 1]", and its content is just &nbsp;. Its purpose is to format a link to a specific location on the page. Ingenious!

Scroll down to this section: https://de.wikipedia.org/wiki/Adelsgesellschaft#Register_der_Adelsgesellschaften. There is a huge table. The very right column contains arrows. You can use these to jump up and back down between the text and the corresponding table row.

Change 556644 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Don't show preview popups with no visible content

https://gerrit.wikimedia.org/r/556644