-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Customisable "too long" post truncation length, based on number of lines AND number of characters #20191
Comments
Truncation should ideally be based on max height, not character count |
Yes, but I think that's not possible unless you assume a text width. Although I guess it would be reasonable to assume a fairly narrow text width, like 300px. |
Not really, you can do it based on |
is 659 characters, 116 words, and 23 lines at about 650px. So about 28 characters per line (it's ~50 characters for the full width lines) I think my ideal truncation strategy for something like this would be
|
It shouldn't be based on character count at all, because you can do things
The optimal strategy is to limit the max-height based on |
OK, but it needs to be both, because of line wrapping. In your example, you get 9 lines with 9 characters, but I can also get 9 lines just by writing 400ish characters, and some instances allow 1000+ characters, which can easily get you up to 30+ lines with only a few line breaks. |
Yes, so you apply a max-height using |
Giving the user the control on line-clamp could be also a solution to manage the content height: display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 4;
-webkit-box-orient: vertical; |
Also compare with #20188 "Option to disable external link previews". |
Pitch
Currently some long posts truncate, due to #8205
The example posted at that MR (https://share.elouworld.org/@Exagone313/195324 - 1042 chars, one per line) is truncated to 12 lines. However, there are some long-ish posts (e.g. https://mstdn.social/@Mirella_PhD/109310858624901226, which has a 21 lines and then a long image), which do not get truncated, I guess because they are under 500 characters total.
It would be good to have a user-customisable truncation length, for example:
Motivation
These options would help prevent user's timelines from getting clogged up with large posts.
The text was updated successfully, but these errors were encountered: