Topic on Talk:Page Previews

Jump to navigation Jump to search

Text summaries are clipped awkwardly sometimes.

9
Connor Krammer (talkcontribs)

Most times the hover cards do a good job of ending after an appropriate amount of content, but on longer excerpts text gets truncated, often abruptly. (Example: The link to the flow extension at the top of this talk page.) This is opposed to just ending at a sentence boundary.

This wouldn't be so bad if ellipses were at least appended to the text, but in either situation it badly triggers the zeigarnik effect. This leads to clicking on the page to finish reading the excerpt... and then you've left the page and lost your original reading context.

As a designer/copywriter/programmer, this just stuck out at me -- I don't know if it bothers anyone else. Overall though, I think hover cards are a great idea. The project page states that the goal of the feature is to provide readers with an excerpt so that they "can make the decision about whether they want to read the full article" or not, but it strikes me as being just as useful for getting a quick idea of what a term means. (It's kind of the idea pondered here.)

I have a couple other suggestions, but I want to turn those over in my head for a bit first. For most of the project though: looks good!

Vibhabamba (talkcontribs)

Connor, I completely agree with you, we should truncate sentences. Say we have to truncate after 250 characters. This would be very different for different languages. What counts as a character in Hindi is much less than an actual alphabet. So we are struggling a bit with this technical limitation.

Its a great insight that once the user lands on the target page, the transition is lost. I have some ideas, but would also like to hear of how we might be able to solve this.

This post was hidden by RandomDSdevel (history)
Vibhabamba (talkcontribs)

I believe we have some language engineering folks who can help figure this out. Pau Giner?

Pginer-WMF (talkcontribs)

Showing some partial content in a way that works well across multiple languages is a hard thing to do. Depending on how you want to deal with it, you may need to take into account how each language separate words, use a different line according to their script, or the very notion of "character" and how those are counted.

It would be useful to have a generic component in MediaWiki that let's you just show a given number of lines, or whichever content fits in a given space. This is something that the Language Team may consider to support in the future.

An alternative to cropping with an ellipsis, could be to make the last part of the text to fade out by applying a transparent-to-white gradient on top of it (covering the last line).

Regarding the continuity problem mentioned by Connor, that can be solved if when reaching the article though a hovercard, the first sentence of the article gets highlighted for a second (e.g., background could fade to grey and back to white again). In that way, the user could guess that the text is the same and continue reading where he/she left.

Santhosh.thottingal (talkcontribs)

Breaking the sentence after a certain number of characters is not i18n safe. It can cause lot of issues with complex scripts. Complex scripts require grapheme boundary detection or word boundary detection for finding out sensible line break positions. That is defined in TR29 of unicode standard and very difficult for the context. Pau's suggestion about fading the last line looks good to me.

TheDJ (talkcontribs)

Santhosh.thottingal: I think you are making it a bit too complicated here. You are looking for solutions to fix an imperfection, but your workaround is also not perfect. Don't trade the one imperfection for another imperfection too easily.

Santhosh.thottingal (talkcontribs)

TheDJ: I was just pointing out the i18n aspect. I did not propose any solution or workaround. Thanks.

LuisVilla (talkcontribs)

As an example of somewhat awkward cropping, mousing over a link to https://en.wikipedia.org/wiki/Bernard_Zakheim gives "Bernard Zakheim, Apr.", presumably because it treats the period as a sentence termination rather than an abbreviation. Not the end of the world but something else to consider while improving this.

Reply to "Text summaries are clipped awkwardly sometimes."