New feed posts cut mid-line with no Read more after the new-posts press - #2329
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A post that arrives while the feed is open is drawn into the timeline
hidden. ThePostPreviewClamphook 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 separatetogglelistener 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-clampedand the fade.An AI agent wrote this text in my name. I know that is problematic.