# 修复不准确的链接计数器值的建议

**URL:** https://meta.discourse.org/t/suggestion-for-fixing-the-inaccurate-link-counter-value/359527
**Category:** UX
**Tags:** fixed
**Created:** [2025年三月30日 15:51 UTC](https://meta.discourse.org/t/suggestion-for-fixing-the-inaccurate-link-counter-value/359527 "2025-03-30T15:51:05Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [2025年三月30日 15:51 UTC](https://meta.discourse.org/t/suggestion-for-fixing-the-inaccurate-link-counter-value/359527/1 "2025-03-30T15:51:05Z")

</div>

进一步说，我认为这是一个bug，但似乎是按设计进行的，主题链接计数器在 50 处停止：

> [@Topic link counter stops at 50](https://meta.discourse.org/t/topic-link-counter-stops-at-50/359412):
>
> Discourse 3.5.0.beta3-dev ([afde7cc172](https://github.com/discourse/discourse/commits/afde7cc1727a751e4d87be2ceee17f2d82edf89c)). The link counter displayed at the bottom of a topic seems to stop at 50, even when there are over 1,000 links in the thread: For reference: On another topic, this one also says 50: When there are 250+ links: Does anyone know what might be causing this? thinking

即使主题中有数千个链接 😔

还有：

> [@Richie](#):
>
> 我不知道为什么我们要向最终用户显示一个完全不准确的数字 🤷
> 
> 没有信息比不准确的信息更好。

考虑到这一点，我们能否不向最终用户显示不准确的数字，而是如果主题中有超过 50 个链接，就简单地显示一个 `+` 符号？

例如，这样：

 ![Screenshot 2025-03-30 at 16.48.20](https://global.discourse-cdn.com/meta/original/4X/4/e/0/4e0511d7478de7c6f19e965239caeed4a638c7d3.png)

将变成 `50+`，如下所示：

 ![Screenshot 2025-03-30 at 16.48.30](https://global.discourse-cdn.com/meta/original/4X/e/4/f/e4fc9db82a36eec5c65ec3c87ff097c1286a7593.png)

这样用户就不会被告知不准确的信息了 🤔

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2025年三月31日 05:44 UTC](https://meta.discourse.org/t/suggestion-for-fixing-the-inaccurate-link-counter-value/359527/2 "2025-03-31T05:44:53Z")

</div>

@lindsey 你觉得这是#欢迎PR吗？看起来这是一个小而简单的更改（我们会多选择1，然后用这个信息来决定是否渲染50或50+）

---

<div class="post-metadata">

### Author: ![lindsey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lindsey/32/318210_2.png) [@lindsey](https://meta.discourse.org/u/lindsey)
#### Post date: [2025年三月31日 16:32 UTC](https://meta.discourse.org/t/suggestion-for-fixing-the-inaccurate-link-counter-value/359527/3 "2025-03-31T16:32:30Z")

</div>

同意，已添加 #pr-welcome 以添加 `+` 以提高准确性。

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [2025年三月31日 17:06 UTC](https://meta.discourse.org/t/suggestion-for-fixing-the-inaccurate-link-counter-value/359527/4 "2025-03-31T17:06:19Z")

</div>

谢谢 @lindsey 😁

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [2025年四月1日 00:03 UTC](https://meta.discourse.org/t/suggestion-for-fixing-the-inaccurate-link-counter-value/359527/5 "2025-04-01T00:03:34Z")

</div>

我试了一下：

> <https://github.com/discourse/discourse/pull/32093/files>
>
> Meta: https://meta.discourse.org/t/suggestion-for-fixing-the-inaccurate-link-cou…nter-value/359527
> 
> The link count in the topic map summary is limited to 50 on the backend. 
> However, the frontend displays exactly 50, even when more links exist. 
> This can be misleading as users might assume there are no additional links.
> 
> This PR updates the logic by fetching one extra link from the database and appending a \`+\` to the count when there are more than 50 links.
> 
> Before:
> !\[image\](https://github.com/user-attachments/assets/a741d984-1eb0-41f0-9f58-1a52574fc9bc)
> 
> After:
> !\[image\](https://github.com/user-attachments/assets/8b1e589a-f85f-4c06-a2ac-dd2b34a41b46)

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [2025年四月1日 11:42 UTC](https://meta.discourse.org/t/suggestion-for-fixing-the-inaccurate-link-counter-value/359527/6 "2025-04-01T11:42:30Z")

</div>

太快了！

谢谢 @Arkshine 😃

---

<div class="post-metadata">

### Author: ![anishlukk123](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/anishlukk123/32/489397_2.png) [@anishlukk123](https://meta.discourse.org/u/anishlukk123)
#### Post date: [2025年四月10日 23:29 UTC](https://meta.discourse.org/t/suggestion-for-fixing-the-inaccurate-link-counter-value/359527/7 "2025-04-10T23:29:30Z")

</div>

嘿，我有一个问题：从我所见来看，其他所有组件，例如视图和点赞，都显示了完整的数字。为了保持设计一致性，我们应该在其他情况下添加加号，或者在链接计数中添加完整的数字。

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [2025年四月11日 05:12 UTC](https://meta.discourse.org/t/suggestion-for-fixing-the-inaccurate-link-counter-value/359527/8 "2025-04-11T05:12:26Z")

</div>

> [@Arkshine](#):
>
> 我试了一下：
> 
> [UX: Append '+' to link count if above threshold in topic map by Arkshine · Pull Request #32093 · discourse/discourse · GitHub](https://github.com/discourse/discourse/pull/32093/files)

@Arkshine 这个PR有合并流程吗？🤔

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [2025年四月11日 13:17 UTC](https://meta.discourse.org/t/suggestion-for-fixing-the-inaccurate-link-counter-value/359527/9 "2025-04-11T13:17:45Z")

</div>

已批准的PR并不一定会立即合并。可能存在一些内部担忧或讨论。由于它优先级较低，我们先等等！

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [2025年四月11日 18:01 UTC](https://meta.discourse.org/t/suggestion-for-fixing-the-inaccurate-link-counter-value/359527/10 "2025-04-11T18:01:43Z")

</div>

好的，谢谢，只是不确定流程是什么 🙂

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [2025年四月30日 16:42 UTC](https://meta.discourse.org/t/suggestion-for-fixing-the-inaccurate-link-counter-value/359527/11 "2025-04-30T16:42:12Z")

</div>

它现在已经合并了，谢谢@Arkshine

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [2025年四月30日 19:14 UTC](https://meta.discourse.org/t/suggestion-for-fixing-the-inaccurate-link-counter-value/359527/12 "2025-04-30T19:14:46Z")

</div>

再次感谢你为此付出的努力，@Arkshine 🥳

---

<div class="post-metadata">

### Author: ![chapoi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapoi/32/537252_2.png) [@chapoi](https://meta.discourse.org/u/chapoi)
#### Post date: [2025年十二月3日 11:35 UTC](https://meta.discourse.org/t/suggestion-for-fixing-the-inaccurate-link-counter-value/359527/13 "2025-12-03T11:35:12Z")

</div>


