Page MenuHomePhabricator

Hovercards: Redirect titles should be bolded in the extract
Closed, InvalidPublic

Description

If a popup fires on a redirect, the title of the redirect should be bolded within the extract as well as any other text.

Example: http://en.wikifur.com/wiki/Roxikat

The article links to http://en.wikifur.com/wiki/Camp_Feral which is a redirect to http://en.wikifur.com/wiki/Feral! which starts with the text "Camp Feral! is ..."

It would be desirable for the text "Camp Feral" to be bolded when a popup extract is shown on a page where the redirect "Camp Feral" is used, in addition to the title "Feral!" (This is a little complicated because it causes overlapping bold.)

This is in addition to Bug 67230 - it is quite possible to have a piped link to a redirect, and in that case the piped text, the redirect title, and the article's actual title might all be candidates for bolding.


Version: master
Severity: normal

Details

Reference
bz67232

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:32 AM
bzimport added a project: Page-Previews.
bzimport set Reference to bz67232.
bzimport added a subscriber: Unknown Object (MLST).
Jaredzimmerman-WMF triaged this task as Medium priority.Dec 3 2014, 12:32 AM
Jaredzimmerman-WMF set Security to None.
Nirzar lowered the priority of this task from Medium to Low.Dec 20 2016, 4:57 PM

@GreenReaper the example given is unfortunately outdated. Plus on trying out few redirect hovercards on wikipedia i couldn't find out any article extract (hovercard text content) with the original title AND the redirect title in it to bold.

I feel like this is a pretty much an edge case?

GreenReaper added a comment.EditedDec 20 2016, 6:40 PM

Here's another example - mouse over "Camp Feral!" in the second sentence. Or you can create a link to [[Camp Feral!]] on any article in a preview, then mouseover the link. "Feral" is bolded but not the "Camp" before it, even though it is bold in the article.

It is certainly an edge case because normally the page name will be the only bolded portion in the lede; but it is not always the case because article names are sometimes shortened for more convenient linking, or because it is the more-common name. In that case the "full" name is often added as a redirect, and sometimes articles link to such names.

[Also, while this may or may not be Wikipedia's house style, MediaWIki is not only used on Wikipedia, or with accordance to its style guide…]

@GreenReaper okay. we should evaluate user value and effort required.

for now ping @phuedx for test case

Nirzar added subscribers: ovasileva, Jdlrobson.EditedJul 7 2017, 10:59 PM

This is in Design. Will this get solved with new endpoint? @phuedx

cc @ovasileva

Sorry, @Nirzar. I missed your ping.

This is in Design. Will this get solved with new endpoint? @phuedx

The Page Preview API will preserve any bolding or emphasis that editors have added to the page. The client (Page Previews in the browser) will also follow redirects. AFAICT this two behaviors will solve this issue:

  1. The client would request an intro for Camp Feral.
  2. The Page Preview API would respond with a redirect to Feral!
  3. The client would request an intro for Feral!
  4. The Page Preview API would respond with the intro for Feral!, which has "Camp Feral!" in bold.
ovasileva closed this task as Invalid.Jul 11 2017, 11:34 AM

https://phabricator.wikimedia.org/T69232#3419913 - this works. Closing this and we can add it as a test case for the new api