Page MenuHomePhabricator

Hovercards sometimes has contents in brackets (parentheses) appearing in excerpts, especially at ruwiki
Closed, ResolvedPublic

Description

Tpimh reports

In English wiki bulbs show the beginning of the article with stripped text in brackets (e.g. dates of birth and death, alternative names), but in Russian wiki it is shown. Sometimes it is the only information that is shown if the text in brackets is long enough. Kind of not usefull at all.

This seems to be a prolific problem at Ruwiki, (screenshots from [[Main page]] links to these articles: Луций Сергий Катилина, and Гай Саллюстий Крисп, and Этрурия.)

I've only been able to find one example at Enwiki (out of ~100 tests) linking to this article https://en.wikipedia.org/w/index.php?title=Samuel_Allyne_Otis&oldid=523235627

and none at Frwiki,


Note: There is a plan to refine what content is excluded, in T91344: Review exclude all approach to parenthetical elements in summary endpoint, but for the moment No bracketed contented is meant to be shown.

Details

Related Gerrit Patches:

Event Timeline

Quiddity assigned this task to Prtksxna.
Quiddity raised the priority of this task from to Needs Triage.
Quiddity updated the task description. (Show Details)
Quiddity added a project: Page-Previews.
Quiddity added a subscriber: Quiddity.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 19 2015, 12:27 AM
Prtksxna added a comment.EditedMar 25 2015, 10:15 AM

In the case of Samuel Allyne Otis, TextExtracts returns the following excerpt —

Samuel Allyne Otis (son of James Otis, Sr., father of Harrison Gray Otis and brother of prominent revolutionary James Otis, Jr.

And when Hovercards finds malformed brackets, in this case — just an opening bracket, it doesn't do anything to the text.

The same seems to be the case with the links on Russian Wikipedia

So, as long as there are malformed brackets in the extract, Hovercards will show them as is.

This seems like a TextExtracts issue for now.

Prtksxna set Security to None.

In our API call if we increase exsenteces to 5 and get rid of exintro we'll be able to get a better TextExtract. We are clipping the extra content on other cards anyway, so this won't cause a problem there.

For example, we could get —

Кантата (итал. cantata, от лат. саntare — петь) — вокально-инструментальное произведение, созданное для солистов и хора.

…instead of just —

Кантата (итал. cantata, от лат.


@MaxSem Would this be alright for our use case?
@ori, would this have any performance implications?

MaxSem added a comment.Apr 3 2015, 4:58 PM

@MaxSem Would this be alright for our use case?

Yes.

@ori, would this have any performance implications?

No.

Change 202001 had a related patch set uploaded (by Prtksxna):
renderer.article: Remove exintro and increase exsentences to 5 in the API call

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

@MaxSem, I noticed something strange with the use of exintro.

exintroresultlink
falseКантата (итал. cantata, от лат.API Call
trueКантата (итал. cantata, от лат.API Call
not setКантата (итал. cantata, от лат. саntare — петь) — вокально-инструментальное произведение, созданное для солистов и хора.API Call

This is why I had removed exintro in resources/ext.popups.renderer.article.js.

@Prtksxna, it seems that exintro is considered true whenever it's set. Just leave it out to get the default value (false) to appear.

Prtksxna added a comment.EditedApr 6 2015, 11:42 PM

@Prtksxna, it seems that exintro is considered true whenever it's set. Just leave it out to get the default value (false) to appear.

Right. That is what I am doing in the patch. @MaxSem points out that we might end up getting the first section heading in Hovercards in case the intro isn't long enough.

Change 202001 merged by jenkins-bot:
renderer.article: Increase exsentences to 5 in the API call

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

Prtksxna closed this task as Resolved.Jul 8 2015, 5:22 PM
Quiddity moved this task from Backlog to Done on the Page-Previews board.Aug 4 2015, 3:56 PM