<p></p>
<p dir="auto">When I thought how to do truncated diary entries I first considered doing it server-side. I already go through markdown parse trees in the richtext library to get images and descriptions for Open Graph tags. I can probably extend that to generate truncated entries.</p>
<p dir="auto">Then I thought that ultimately I want to limit entry heights. Isn't it easier to ask the browser what height each element is instead of trying to estimate it server-side? And if there's an image, it usually doesn't have its height specified in the source markdown code, therefore I can't know it server-side but client-side I can.</p>
<p dir="auto">But it's not that simple. Images can load any time, including never. I'd have to listen to load events to recalculate the heights. Now it doesn't look like a good idea. Let's suppose there's a large image and some text below. Before the image is loaded that text fits in the truncated view. Am I going to remove the text after the image loads, possibly when the user is reading it? I guess it's better to estimate heights and truncate server-side.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5121#issuecomment-2353504228">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLONPJJ6VRJHGVXHYCDZW4IL7AVCNFSM6AAAAABNFQLUA6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJTGUYDIMRSHA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLJRM274QGXLTJRKYY3ZW4IL7A5CNFSM6AAAAABNFQLUA6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUMI6P6I.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/5121/c2353504228</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/5121#issuecomment-2353504228",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5121#issuecomment-2353504228",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>