ElkArte Community

Elk Development => Bug Reports => Topic started by: forumsearch0r on September 08, 2014, 11:20:14 am

Title: Weirdly truncated text on Android
Post by: forumsearch0r on September 08, 2014, 11:20:14 am
Where's the value of having the last character chopped off here?
Title: Re: Weirdly truncated text on Android
Post by: emanuele on September 08, 2014, 11:24:04 am
What browser?
Title: Re: Weirdly truncated text on Android
Post by: forumsearch0r on September 08, 2014, 12:17:39 pm
Currently Chrome.
Title: Re: Weirdly truncated text on Android
Post by: emanuele on September 08, 2014, 12:26:01 pm
arg... I cannot test it because Chrome doesn't want to work in the emulator... :-\
Title: Re: Weirdly truncated text on Android
Post by: Adrek on September 08, 2014, 01:40:03 pm
OT: Android phone + USB cable + Chrome for Windows and you don't need emulator :) https://developer.chrome.com/devtools/docs/remote-debugging
Title: Re: Weirdly truncated text on Android
Post by: emanuele on September 08, 2014, 02:16:35 pm
That assuming I have a smartphone. ;)
Title: Re: Weirdly truncated text on Android
Post by: IchBin on September 08, 2014, 02:42:15 pm
Get with the times ema!!
Title: Re: Weirdly truncated text on Android
Post by: emanuele on September 08, 2014, 03:06:47 pm
NOEZ!!
Title: Re: Weirdly truncated text on Android
Post by: emanuele on June 24, 2017, 04:23:27 pm
That is technically still a bug.
The problem is that links are cut to avoid them overflowing.
The overflow happens because of the white-space: nowrap;.

Why do we need the white-space: nowrap?
If we can get rid of it, we would be able to remove the overflow:hidden as well and have the links span on multiple lines.
Title: Re: Weirdly truncated text on Android
Post by: Frenzie on June 25, 2017, 12:33:01 pm
I imagine it was added because in some edge cases you might get stuff like

Code: [Select]
Lalala some text [two
words]

Which would make for an easier to hit target if they weren't split up. However, I don't think that's worth making long links more worthless.

PS I don't think this happens quite the way it's shown in the OP? It looks to me like links just won't exceed one line, but they'll gladly take up the whole line.
Title: Re: Weirdly truncated text on Android
Post by: emanuele on June 25, 2017, 01:07:54 pm
In fact, it may very well shorten the text inside an a tag quite a bit, of course you need to to have quite a bunch of text to have a taste of it without shrinking way too much the window. (http://www.elkarte.net/community/index.php?topic=1965.msg32697#new)

Somehow unusual. :P
Title: Re: Weirdly truncated text on Android
Post by: Frenzie on June 26, 2017, 09:03:11 am
Right, and I definitely consider that undesirable, but putting some words in front of it doesn't seem to make it do that particular extra-bad thing. "In fact, it may very well shorten the text inside an a tag quite a bit, of course you need to to have quite a bunch of text to have a taste of it without shrinking way too much the window. (http://www.elkarte.net/community/index.php?topic=1965.msg32697#new)"

What I see is:
"
In fact, blabla…
"

Not:
Code: [Select]
thing. "In fact…"
like on the screenshot in the OP.
Title: Re: Weirdly truncated text on Android
Post by: emanuele on June 26, 2017, 12:54:52 pm
You mean In fact, it may very well shorten the text inside an a tag quite a bit, of course you need to to have quite a bunch of text to have a taste of it without shrinking way too much the window. (http://www.elkarte.net/community/index.php?topic=1965.msg32697#new) this should stay on the same line?
Title: Re: Weirdly truncated text on Android
Post by: Frenzie on June 27, 2017, 06:16:32 am
Well yeah. Like what it does if you get rid of all the weird non-standard styling. :P

Title: Re: Weirdly truncated text on Android
Post by: Spuds on June 29, 2017, 10:32:01 am
So we want to drop all of the a.bbc_link mumbo jumbo and have a simple word-wrap: break-word;
Title: Re: Weirdly truncated text on Android
Post by: emanuele on June 29, 2017, 12:42:23 pm
Dunno. xD
Actually, I don't remember why we added it. lol
Title: Re: Weirdly truncated text on Android
Post by: Frenzie on June 29, 2017, 03:15:27 pm
Probably something to do with http://aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (at least I don't see why you wouldn't want it to break on http://aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/aaaaaaaaaaa/aaaaaaaaaaaaaaaaaaaaaaaa/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/aaaaaaaaaaaaaaaaaa).

That use case would be served by maintaining these:

display: inline-block;
overflow: hidden;
max-width: 100%;
text-overflow: ellipsis;

The only potential downside is that this might look mildly curious:

http://aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/aaaaaaaaaaaaaaaaaaaaaaaa/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/aaaaaaaaaaaaaaaaaa

That'd turn into
Code: [Select]
http://aaaaaaaaaaaaaaaaaaaaaaaaa...
/aaaaaaaaaaaaaaaaaaaaaaaa/etc

Of course in turn that'd break the same-line thing.

I think it would be more elegant to add text-overflow:ellipsis to the post container, but perhaps this whole solution stems from that apparently not having, e.g., a .postarea class in every location (.post in preview).

All in all my main complaint is white-space: nowrap. Details like word-break: break-all could also be interesting but that's just polish. :P