[openstreetmap/openstreetmap-website] Provide a truncated view of recent diaries (PR #5121)

David Tsiklauri notifications at github.com
Wed Aug 28 14:26:45 UTC 2024


@kcne Thank you for the review. I thought about truncating with a fixed number of characters, but it adds complexity in the code (it needs JS to calculate and trim number of characters) and introduces complexities about consistent height of the shown post (for example, if there is a post that starts with 5 big picture, if all of the pictures are shown (because of the small character number), shown post will be much bigger, than other posts' bodies, which include only characters and words). Same goes for showing the first paragraph, which in some cases will be huge and, in other cases, tiny. Truncation with a number of characters also needs additional custom parsing to avoid cut in the middle of an image link or any character sequence that is written for formatting. Of course, all of these are possible to make, but, I think, complexity they introduce is not worth, as there will be no such big quality of difference in visuals.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5121#issuecomment-2315490476
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5121/c2315490476 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240828/d33cc28d/attachment.htm>


More information about the rails-dev mailing list