Page MenuHomePhabricator

Replace hovercards usage of exsentences with exchars and exintro (like iOS native app)
Closed, ResolvedPublic2 Estimated 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

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
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

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

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:

Screen Shot 2016-05-26 at 15.23.15.png (225×337 px, 34 KB)

But the following isn't:

Screen Shot 2016-05-26 at 15.23.48.png (224×326 px, 35 KB)

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

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

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

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.