So why aren't you just showing the missing items/page numbers? They take up the same amount of space!

Alex said on August 15, 2015

Something similar applies to lists, where you can often see a button saying "View 1 more item" and pagination where one regularly sees something like 1 ... 3 4 5 ... 7.
So why aren't you just showing the missing items/page numbers? They take up the same amount of space!

Alex said on August 15, 2015

Sorry for double posting, it said my comment was marked as spam...

Justin McGuire said on August 16, 2015

While we're at it, I wish there was a way to indicate whether a "Read More" link goes to a new page, or just loads more words in the current page.

Eduardo MPS said on August 17, 2015

Ars Technica feeds work always as 3 paragraphs and a link to read X more paragraphs. obviously I don't know details of the implementation, but it's an interesting approach.

Martijn said on August 24, 2015

Don't do this. Seriously, you're going to get into so much headache.

1) Truncate at words rather, but then, what exactly is a word? That's much harder to explain than you might think at first glance. Think languages that don't have any spaces (Chinese, and usually Japanese). Languages that combine many words into a giant one (Icelandic and Finnish, iirc).

2) Javascript's substring function happily chops a surrogate pair in two, leaving either part look garbled. Most characters don't have this problem, but it does happen. And then there are combined characters (like vowels with a complex set of accents) that should be kept together.

3) For right-to-left languages, it makes no sense to put the "..." at the end, unless the browser can make sense of it and display the ellipses at the beginning.

4) How to handle very long words? Would you chop a person's name in twine? How about a list of numbers? A quoted passage?

5) And does "..." make sense in every language to begin with? I would wager there are some languages/cultures that use a different symbol for "there's more".

cfv said on October 04, 2015

I've always been asked to cut to X number of words, so that doing something along thiese lines:

function cutToWords(str, amount){
var words = string.split(" ");
return words.slice(0, amount).join(' ') + (words.length - amount > 0? "..." : "");

it's not as pretty as a simple substr, but hey, it's still a more intuitive measure, and can be easily enforced on the publishing side as well.

cfv said on October 04, 2015

@Martijn, this sort of thing only works on a culture by culture basis. Some cultures will require adjustments, some cultures will be kind of OK unless you utterly fail to convey the whole "this is a snippet" part in the design, and some cultures will probably use entirely different visual languages to convey that thing. Western European and related cultures on the other hand , which I'm willing to bet is what snook is targeting here, are going to catch what's going on rather easily.

Sorry, comments are closed for this post. If you have any further questions or comments, feel free to send them to me directly.