# 分类图标未显示在帖子文本中

**URL:** <https://meta.discourse.org/t/category-icons-dont-show-up-in-post-text/315851>\
**Category:** UX\
**Tags:** completed, category-icons\
**Created:** [2024年七月11日 02:25 UTC](https://meta.discourse.org/t/category-icons-dont-show-up-in-post-text/315851 "2024-07-11T02:25:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)\
**Post date:** [2024年七月11日 02:25 UTC](https://meta.discourse.org/t/category-icons-dont-show-up-in-post-text/315851/1 "2024-07-11T02:25:13Z")

</div>

继续讨论 [图标未在侧边栏中显示，然后颜色未定义](https://meta.discourse.org/t/icons-dont-show-up-in-the-sidebar-then-the-color-isnt-defined/277712)：

这是一个类似的问题——图标未在帖子的已渲染文本中显示。

为了保持一致性，它们也应该在那里显示，那将是非常好的。

我不确定 #category-icons 标签是否也这样做。它们可能也应该这样做！

---

<div class="post-metadata">

**Author:** ![Lhc\_fl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lhc_fl/32/268115_2.png) [@Lhc\_fl](https://meta.discourse.org/u/Lhc_fl)\
**Post date:** [2024年七月16日 02:47 UTC](https://meta.discourse.org/t/category-icons-dont-show-up-in-post-text/315851/3 "2024-07-16T02:47:42Z")

</div>

感谢您的建议！相关的 PR 已经合并：

> <https://github.com/discourse/discourse-category-icons/pull/36>
>
> This commit allows displaying category icons in the body of the post.
> 
> \## Scre…enshots
> 
> New setting:
> !\[image\](https://github.com/user-attachments/assets/5b3e2597-0732-4bd6-85bd-1d6ec31f4356)
> 
> Before change:
> 
> !\[image\](https://github.com/user-attachments/assets/1d99d4fb-8171-4d91-aa0c-2afde846bc62)
> 
> After change:
> 
> !\[image\](https://github.com/user-attachments/assets/4c62ad06-8ff2-45e5-94f7-bc550f9f42b2)
> 
> 
> 
> Related meta topic: https://meta.discourse.org/t/category-icons-dont-show-up-in-post-text/315851

---

<div class="post-metadata">

**Author:** ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)\
**Post date:** [2024年七月16日 08:42 UTC](https://meta.discourse.org/t/category-icons-dont-show-up-in-post-text/315851/4 "2024-07-16T08:42:11Z")

</div>

紧接着一个问题——如何不在帖子中显示分类图标？

图标只是一种装饰性元素，仅此而已。但在诸如 #Contribute > Bug 这样的文本中，它们只会增加视觉噪音——颜色也是如此，但颜色并没有那么显眼。

好吧，我们可以说像 #unsupported-install 这样的标签从未引发过问题，因为此时图标起到了提供信息的作用——它表明这是一个标签，除此之外别无其他。这也是为什么当你开始使用 #official 这类图标时，我感到不太满意，因为它并没有说明这是分类、标签还是其他什么。你在提及用户时也不会使用简化的头像版本，比如 @Jagster —— 因为你想表明这是一个用户，而不是分类或标签。

不过，你们在这里怎么做是你们的事，与我无关。但普通用户在学习区分这些概念之前，必须明白它们各自代表什么，为此有一个基本要求：他们至少得记住各个分类的名称。

我们在内联 oneboxes 时使用最少的装饰以避免视觉噪音。这些图标也存在类似的问题。

在理想情况下，无论菜单中使用什么图标，分类都应使用统一的图标。标签也是如此。

这也是一个用户体验（UX）问题。

---

<div class="post-metadata">

**Author:** ![Lhc\_fl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lhc_fl/32/268115_2.png) [@Lhc\_fl](https://meta.discourse.org/u/Lhc_fl)\
**Post date:** [2024年七月16日 08:55 UTC](https://meta.discourse.org/t/category-icons-dont-show-up-in-post-text/315851/5 "2024-07-16T08:55:42Z")

</div>

嗯，最初我添加了一个默认启用的设置，用于在正文中显示类别/标签图标。后来我们决定在所有地方使用一致的图标会更统一，因此删除了此设置。

这可能需要讨论。

---

<div class="post-metadata">

**Author:** ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)\
**Post date:** [2024年七月16日 09:35 UTC](https://meta.discourse.org/t/category-icons-dont-show-up-in-post-text/315851/6 "2024-07-16T09:35:35Z")

</div>

棘手，嗯？@Jagster 说得对，同时在帖子中显示类别和标签图标会有点令人困惑。

如果论坛只使用其中一个，那就可以了。

我同意，如果使用图标，最好能有视觉方式区分标签和类别。我个人很乐意为标签添加标签符号，为类别添加类别项目符号。或者至少有这样做的选项。

工具提示会有帮助（桌面端），但我们确实需要同时适用于移动端和桌面端的解决方案。

---

<div class="post-metadata">

**Author:** ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)\
**Post date:** [2024年七月16日 09:40 UTC](https://meta.discourse.org/t/category-icons-dont-show-up-in-post-text/315851/7 "2024-07-16T09:40:24Z")

</div>

有几个层级的“一致性” 😉 比如：

- 上下文，当事物看起来和行为方式相似时，这就是为什么标题与内容不同，但在其中一切都以相同的方式运行。
- 全局，所有内容在任何地方都相同。

何时以及何地取决于管理员的用途、品味和审美眼光。有时用户体验甚至用户界面也很重要。

---

<div class="post-metadata">

**Author:** ![Lhc\_fl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lhc_fl/32/268115_2.png) [@Lhc\_fl](https://meta.discourse.org/u/Lhc_fl)\
**Post date:** [2024年七月18日 09:41 UTC](https://meta.discourse.org/t/category-icons-dont-show-up-in-post-text/315851/8 "2024-07-18T09:41:16Z")

</div>

此主题在上次回复后 2 天自动关闭。不再允许新回复。
