# User stream item templates needs some update

**URL:** https://meta.discourse.org/t/user-stream-item-templates-needs-some-update/253476
**Category:** UX
**Tags:** reactions, follow
**Created:** [January 31, 2023, 11:06am UTC](https://meta.discourse.org/t/user-stream-item-templates-needs-some-update/253476 "2023-01-31T11:06:39Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [January 31, 2023, 11:06am UTC](https://meta.discourse.org/t/user-stream-item-templates-needs-some-update/253476/1 "2023-01-31T11:06:39Z")

</div>

Hello,

I noticed on these plugins the `user-stream-item` templates need some update _(maybe there are other plugins too)_… to fit to the core changes.

Discourse Follow plugin  
[https://github.com/discourse/discourse-follow/blob/main/assets/javascripts/discourse/templates/components/follow-feed-post.hbs](https://github.com/discourse/discourse-follow/blob/main/assets/javascripts/discourse/templates/components/follow-feed-post.hbs)

Discourse Reactions plugin  
[https://github.com/discourse/discourse-reactions/blob/main/assets/javascripts/discourse/components/discourse-reactions-reaction-post.hbs](https://github.com/discourse/discourse-reactions/blob/main/assets/javascripts/discourse/components/discourse-reactions-reaction-post.hbs)

Now it looks like this :arrow_down_small:

 ![Screenshot 2023-01-31 at 11.49.46](https://global.discourse-cdn.com/meta/original/4X/6/6/d/66decc4fb362dc5fc531e5e5672a3280b866d6a2.png)

This is the expected :arrow_down_small:

 ![Screenshot 2023-01-31 at 12.37.49](https://global.discourse-cdn.com/meta/original/4X/9/7/8/978238c533cc3e9ebfa9e44688f5f8d7b5ca18dd.png)

* * *

There was a fix on the core `user-stream-item` template few month ago which changed the elements order and added some new classes.  
[https://github.com/discourse/discourse/pull/18368](https://github.com/discourse/discourse/pull/18368)

* * *

Thank you :slightly_smiling_face:

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [February 2, 2023, 9:51am UTC](https://meta.discourse.org/t/user-stream-item-templates-needs-some-update/253476/2 "2023-02-02T09:51:02Z")

</div>

If someone need a quick workaround I made some css modification to order these elements to the correct place. :slightly_smiling_face:

Common \> CSS

```scss
.user-stream {
  .item, 
  .user-stream-item {
    // adding the exclusion doesn't matter much
    // except that it won't add these to the current core style
    .info:not(.user-stream-item__header) {
      display: flex;
      align-items: flex-start;
      .stream-topic-details {
        order: 1;
        flex-grow: 1;
      }
      .expand-item,
      .collapse-item {
        order: 2;
      }
      .time {
        order: 3;
      }
    }
  }
}

```

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [March 23, 2023, 3:28pm UTC](https://meta.discourse.org/t/user-stream-item-templates-needs-some-update/253476/9 "2023-03-23T15:28:47Z")

</div>

Thanks for the report @Don! It looks like the reactions/follow plugins originally copy/pasted the HTML structure from core, and so they were both depending on the old CSS.

I think we can make things cleaner by re-using core’s `<UserStreamItem>` component in both plugins:

This will add a bit of extra core customizability: [DEV: Add `{{yield}}` to user-stream-item for plugins/themes by davidtaylorhq · Pull Request #20791 · discourse/discourse · GitHub](https://github.com/discourse/discourse/pull/20791)

Fix for reactions: [UX: Re-use UserStreamItem from core by davidtaylorhq · Pull Request #217 · discourse/discourse-reactions · GitHub](https://github.com/discourse/discourse-reactions/pull/217)

Fix for follow: [UX: Re-use UserStreamItem from core by davidtaylorhq · Pull Request #91 · discourse/discourse-follow · GitHub](https://github.com/discourse/discourse-follow/pull/91)

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [March 25, 2023, 8:00am UTC](https://meta.discourse.org/t/user-stream-item-templates-needs-some-update/253476/10 "2023-03-25T08:00:33Z")

</div>

This topic was automatically closed after 37 hours. New replies are no longer allowed.
