# 重构后，reaction列表从小用户列表中消失了

**URL:** <https://meta.discourse.org/t/the-reaction-list-disappeared-from-small-user-list-after-refactor/388783>\
**Category:** Bug\
**Created:** [2025年十一月18日 06:45 UTC](https://meta.discourse.org/t/the-reaction-list-disappeared-from-small-user-list-after-refactor/388783 "2025-11-18T06:45:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![small-lovely-cat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/small-lovely-cat/32/553546_2.png) [@small-lovely-cat](https://meta.discourse.org/u/small-lovely-cat)\
**Post date:** [2025年十一月18日 06:45 UTC](https://meta.discourse.org/t/the-reaction-list-disappeared-from-small-user-list-after-refactor/388783/1 "2025-11-18T06:45:00Z")

</div>

> <https://github.com/discourse/discourse/pull/35843>
>
> \### What does this do?
> This PR adds reaction data for the first post to the \`To…picListItemSerializer\`, enabling reactions to be displayed on topic lists without requiring additional API calls.
> 
> \### Why is this needed?
> Previously, topic lists only showed basic topic metadata. To display reactions on the first post of each topic, plugins would need to have the frontend make separate API calls for each topic's first post, causing N+1 queries. This change preloads all necessary reaction data when the topic list is serialized. 
> 
> \### How does it work?
> 
> \- Adds \`op\_reactions\_data\` to \`TopicListItemSerializer\`. I added \`ReactionsSerializerHelpers\` to reuse as much of the existing logic as possible.
> \- Adds a \`include\_discourse\_reactions\_data\_on\_topic\_list\` modifier (default false) for giving plugins control over the injection of the new data.
> \- Includes test coverage
> 
> \### Usage
> 
> From within a topic list plugin outlet, the discourse-reactions can be displayed like so:
> 
> \`\`\`gjs
> \<DiscourseReactionsActions
> @post={{@topic.op\_reactions\_data}}
> @showLogin={{false}}
> /\>
> \`\`\`

此 PR 重构了 reaction 列表的加载方式，并弃用了原始的 `/post_action_users` API。

然而，这破坏了显示谁“喜欢”了帖子的原始行为，并使原始区域变为空白。

![image](https://global.discourse-cdn.com/meta/original/4X/f/7/3/f732729eecc051ec86f7dc3410ff96ab1be6349b.png)

这是错误还是按设计行为？有必要添加原始逻辑吗？

---

<div class="post-metadata">

**Author:** ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)\
**Post date:** [2025年十一月18日 10:10 UTC](https://meta.discourse.org/t/the-reaction-list-disappeared-from-small-user-list-after-refactor/388783/2 "2025-11-18T10:10:40Z")

</div>

我不确定这是否是同一件事，但也许是[这个](https://meta.discourse.org/t/unable-to-use-reactions-on-ios-mobile/386867/23?u=natedhaliwal)？

---

<div class="post-metadata">

**Author:** ![small-lovely-cat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/small-lovely-cat/32/553546_2.png) [@small-lovely-cat](https://meta.discourse.org/u/small-lovely-cat)\
**Post date:** [2025年十一月18日 10:32 UTC](https://meta.discourse.org/t/the-reaction-list-disappeared-from-small-user-list-after-refactor/388783/3 "2025-11-18T10:32:18Z")

</div>

感谢您的回复。 👍

附件链接似乎与未显示反应菜单的错误有关，但我提到的问题是，在我记忆中，点击“更多”按钮时会显示类似“[一堆头像] 喜欢该主题”的句子，而现在它消失了。

---

<div class="post-metadata">

**Author:** ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)\
**Post date:** [2025年十一月18日 10:38 UTC](https://meta.discourse.org/t/the-reaction-list-disappeared-from-small-user-list-after-refactor/388783/4 "2025-11-18T10:38:37Z")

</div>

如果它与您链接的 PR 中的更改无关，那可能是因为移除了 `\u003cSmallUserList`，位于

> <https://github.com/discourse/discourse/pull/34265>
>
> This PR moves the likes menu away from the small user list rendering under the p…ost action icons. This causes the page to jump. 
> 
> \---
> It moves us toward a like menu that functions similar to how reactions menu works.
> 
> \*\*Before\*\*
> 
> !\[old-likes\](https://github.com/user-attachments/assets/6a2ce238-8704-4f7e-b511-e3d91f735c86)
> 
> 
> 
> 
> \*\*After\*\*
> 
> 
> https://github.com/user-attachments/assets/bd9bf9f3-d23a-4b04-bd25-9972f8301e4e

---

<div class="post-metadata">

**Author:** ![small-lovely-cat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/small-lovely-cat/32/553546_2.png) [@small-lovely-cat](https://meta.discourse.org/u/small-lovely-cat)\
**Post date:** [2025年十一月18日 10:41 UTC](https://meta.discourse.org/t/the-reaction-list-disappeared-from-small-user-list-after-refactor/388783/5 "2025-11-18T10:41:04Z")

</div>

谢谢，也许这与您提到的 PR 有关。

既然 small-user-list div 仍然存在，是否需要将该函数重新实现？
