discourse/app/assets
Osama Sayegh 7f3468e7d5
FIX: Decorate posts that are loaded after the initial render in post stream (#14600)
To clarify, this problem is not about the topic posts stream, it's about posts streams like the user Activity one in the profile page (or in technical terms anything using the `{{user-stream}}` component).

Post decorations are currently applied inside a `didInsertElement` hook of the `{{user-stream}}` component. However, when the user scrolls the component will load more posts but these will be missing decorations because the `didInsertElement` is only fired once at the beginning of the component lifecycle.

This PR makes the component keep track of the last decorated post/DOM node, and when new posts are loaded the component fire an event for each new post and pass the post's DOM node with the event. Our plugin API 

(I noticed this problem when I was working on https://github.com/discourse/discourse-follow/pull/37)

Co-authored-by: Robin Ward <robin.ward@gmail.com>
2021-10-14 08:10:13 +03:00
..
images DEV: Add SCSS helper to replace `asset-uri` and `image-uri` (#12664) 2021-04-12 13:57:39 +10:00
javascripts FIX: Decorate posts that are loaded after the initial render in post stream (#14600) 2021-10-14 08:10:13 +03:00
stylesheets UX: Add `Enter` hint to search dropdown (#14587) 2021-10-13 12:09:28 -04:00