Page MenuHomePhabricator

Replace hovercards usage of exsentences with exchars and exintro (like iOS native app)
Closed, ResolvedPublic2 Story Points

Description

Given the bugs that sentence detection in textextracts, let's migrate hovercards to use exintro instead of exchars for the summary.

Spike: T135020
Related bugs: T115817

Acceptance criteria

  • Request 525 characters
  • Use exintro on the query, otherwise exchars will return unparsed wikitext from followup sections
  • Adjust the currently oversimplified approach of overflow: hidden (which cuts sentences off mid word) to use text-overflow: ellipsis (which has a better tradeoff of ellipsizing things midword).
    • Moved to T136283 as it is a new feature and it doesn't block test/initial rollout.

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptMay 20 2016, 10:52 AM
dr0ptp4kt updated the task description. (Show Details)May 23 2016, 12:10 PM
Jdlrobson renamed this task from Replace hovercards usage of exsentences with exchars to Replace hovercards usage of exsentences with exintro.May 23 2016, 4:31 PM
jhobs updated the task description. (Show Details)May 23 2016, 4:32 PM
Jdlrobson set the point value for this task to 2.
dr0ptp4kt renamed this task from Replace hovercards usage of exsentences with exintro to Replace hovercards usage of exsentences with exchars and exintro (like iOS native app).May 23 2016, 7:15 PM
Jhernandez triaged this task as Normal priority.May 25 2016, 10:33 AM
Jhernandez updated the task description. (Show Details)May 26 2016, 10:42 AM

There is no good reliable way of doing multi line ellipsis only with CSS, and currently hovercards doesn't really do anything about it.

In any case it is a new feature unrelated to the exchars change, so I've splitted it into a followup task for prio, triage and design consideration.

Change 290913 had a related patch set uploaded (by Jhernandez):
Use exchars instead of exsentences for the extract

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

phuedx added a subscriber: phuedx.EditedMay 26 2016, 2:29 PM

The TextExtracts API is appending an ellipsis to the extract which is visible when the extract is short, e.g. the first example from T115817 is dealt with very neatly:

But the following isn't:

I note that using CSS ellipsis to deal with this has been moved to T136283 but, given the behaviour of TextExtracts, I'm not convinced that it's a new/distinct feature.

Edit

Thoughts?

@phuedx before this patch Page-Previews had no ellipsis treatment at all.

I would consider the behavior of TextExtracts of adding an ellipsis even when there is no more content in the page/first section a bug. What do you think?

@phuedx I can remove the '...' if it is there until we get to do the css ellipsis?

Seems like a bug in exchars IMO.

Agreed.

@phuedx I can remove the '...' if it is there until we get to do the css ellipsis?

+1

@phuedx Fixed in last PS.

Change 290913 merged by jenkins-bot:
Use exchars instead of exsentences for the extract

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

phuedx added a comment.EditedMay 31 2016, 8:56 AM

290913: Use exchars instead of exsentences for the extract has been pulled by the staging server.

phuedx closed this task as Resolved.May 31 2016, 9:02 AM

I created a test page (and associated pages) to test this change, using the examples from T115817 as well as pre-existing pages.

Since this is a technical change, I'm happy to sign off on it. If anyone objects or we identify a regression, then this task can re-opened.