Skip to content

New feed posts cut mid-line with no Read more after the new-posts press - #2329

Merged
wintermeyer merged 1 commit into
mainfrom
fix/hidden-post-clamp
Sep 29, 2026
Merged

wintermeyer merged 1 commit into
mainfrom
fix/hidden-post-clamp

Conversation

@wintermeyer

Copy link
Copy Markdown
Owner

A post that arrives while the feed is open is drawn into the timeline hidden. The PostPreviewClamp hook measured it at 0 height and gave up, and the new-posts press only removes the attribute, so the preview stayed cut through the middle of a line, with no fade and no "Read more". It happened only to posts that came in live, which is why it looked random.

revealPreviewClamp (assets/js/util.js) now watches any body it could not measure with a single ResizeObserver and measures it again once it has a size. That also covers <details> lids, so the separate toggle listener in app.js is gone.

Checked in headless Chrome against the production post: before the fix, revealing left the preview unmeasured; after it, it gets is-clamped and the fade.

An AI agent wrote this text in my name. I know that is problematic.

Ein Beitrag, der live eintrifft, liegt im Feed schon als verstecktes Element bereit. Der Clamp-Hook misst ihn dabei mit Höhe 0 und gibt auf, und das Aufdecken entfernt nur das hidden-Attribut, sodass die Vorschau mitten durch eine Zeile abgeschnitten blieb, ohne Ausblendung und ohne „Weiterlesen“. Jetzt beobachtet ein ResizeObserver jeden Körper, der beim Messen unsichtbar war, und misst neu, sobald er eine Größe hat; das deckt auch den bisherigen toggle-Listener für <details> ab.

An AI agent wrote this text in my name. I know that is problematic.
@wintermeyer
wintermeyer merged commit 06171d6 into main Sep 29, 2026
1 check passed
@wintermeyer
wintermeyer deleted the fix/hidden-post-clamp branch September 29, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant