# 个人消息气泡

**URL:** https://meta.discourse.org/t/personal-message-bubbles/147994
**Category:** Theme component
**Tags:** deprecated
**Created:** [2020年四月13日 23:08 UTC](https://meta.discourse.org/t/personal-message-bubbles/147994 "2020-04-13T23:08:13Z")
**Posts on this page:** 20
**Page:** 2

<div class="post-metadata">

### Author: ![Rhidian](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rhidian/32/176630_2.png) [@Rhidian](https://meta.discourse.org/u/Rhidian)
#### Post date: [2021年四月5日 10:43 UTC](https://meta.discourse.org/t/personal-message-bubbles/147994/68 "2021-04-05T10:43:06Z")

</div>

这可以作为主题实现，但该组件的目的是帮助区分主题帖和私信。如果所有帖子都以消息气泡形式显示，就失去了这一意义。

---

<div class="post-metadata">

### Author: ![Rhidian](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rhidian/32/176630_2.png) [@Rhidian](https://meta.discourse.org/u/Rhidian)
#### Post date: [2021年四月5日 11:28 UTC](https://meta.discourse.org/t/personal-message-bubbles/147994/69 "2021-04-05T11:28:10Z")

</div>

这个间距问题现在应该也修复了。请更新组件并确认一下，好吗？

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [2021年四月6日 14:38 UTC](https://meta.discourse.org/t/personal-message-bubbles/147994/71 "2021-04-06T14:38:17Z")

</div>

看起来不错，但任何之前选择“消息”的用户现在可能会感到有些困惑，因为 `<kbd> :arrow_upper_left: &nbsp; 回复</kbd>` 按钮似乎已变为 `<kbd> :email: &nbsp; 消息</kbd>`（也许是 Discourse 的更新？）：

 ![image](https://global.discourse-cdn.com/meta/original/3X/2/1/2171ed51c62241b2fc2a8eca73fba602fe07fed6.png)

我认为这与这里的最新更改有关：

> [@My users think a reply will be a private reply](https://meta.discourse.org/t/my-users-think-a-reply-will-be-a-private-reply/127305/15?u=downey):
>
> Ahhh, maybe that’s the feature request then, when in a PM, the Reply button should always say Message like that. I know @osama is working on making the composer editor glyph at upper left more dynamic [image] … can you take this change to the submit button as well, please?

目前我还在苦思冥想，除了“`转至消息`”之外，还有什么文本可以作为附加说明，能够同时适用于“回复”和“消息”这两个按钮。如果我想到更好的方案，会在此补充。

---

<div class="post-metadata">

### Author: ![Rhidian](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rhidian/32/176630_2.png) [@Rhidian](https://meta.discourse.org/u/Rhidian)
#### Post date: [2021年四月6日 15:07 UTC](https://meta.discourse.org/t/personal-message-bubbles/147994/72 "2021-04-06T15:07:03Z")

</div>

这是 Discourse 最近的变更——我此前并不知情。这很有道理，因为使用“消息”一词有助于将其与主题回复区分开来。

我推测按钮上从“回复”改为“消息”这一变更，可以在“自定义 \> 文本”设置中进行配置？如果能了解 Meta 站点在“编辑器对话框”中使用了哪个文本设置来显示“消息”一词，将会很有帮助。

注意：此组件功能仅是一种便捷方式，用于追加（或前置）文本。该文本会同时添加到主题“回复”按钮和编辑器“消息”按钮上，因此如果您使用此组件功能，需要考虑到这一点。我可以修改它，使您能够分别为每个按钮追加文本；或者，如果用户希望更改文本，我们也可以移除此功能，并建议他们使用原生的“自定义 \> 文本”功能。

附注：我简单地追加了“私密”一词，以帮助区分这是私密消息而非论坛主题回复。虽然“私密回复”和“私密消息”仍然有效，但在消息按钮上现在显得有些冗余。

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [2021年四月6日 15:13 UTC](https://meta.discourse.org/t/personal-message-bubbles/147994/73 "2021-04-06T15:13:23Z")

</div>

> [@Rhidian](#):
>
> 我推测按钮上从“回复”改为“消息”这一变化，是否可以在“自定义 \> 文本”设置中进行配置？

好主意；我能够将 `js.composer.create_pm` 的值改回 `Reply`，从而实现了与之前相同的功能，尽管“撰写”按钮上的“发送”按钮现在显示为新的信封图标（这没问题）。鉴于此次提交以及该领域未来可能进行的任何工作，@Osama 可能了解一些我们尚未发现的、影响此主题组件的其他变更：

> <https://github.com/discourse/discourse/commit/c9923a3e3e9abd318140f77f06d6472ef28b262b>
>
> See a video of the change in the PR: https://github.com/discourse/discourse/pull…/12449.

---

<div class="post-metadata">

### Author: ![Rhidian](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rhidian/32/176630_2.png) [@Rhidian](https://meta.discourse.org/u/Rhidian)
#### Post date: [2021年四月7日 09:24 UTC](https://meta.discourse.org/t/personal-message-bubbles/147994/75 "2021-04-07T09:24:05Z")

</div>

标题中的消息计数不属于此组件，它是 Discourse 核心消息功能的一部分。

此组件仅对消息文本进行样式处理，使其看起来像对话气泡。

---

<div class="post-metadata">

### Author: ![Zup](https://avatars.discourse-cdn.com/v4/letter/z/c37758/32.png) [@Zup](https://meta.discourse.org/u/Zup)
#### Post date: [2021年四月17日 21:58 UTC](https://meta.discourse.org/t/personal-message-bubbles/147994/77 "2021-04-17T21:58:08Z")

</div>

![Screen Shot 2021-04-17 at 11.52.44 AM](https://global.discourse-cdn.com/meta/original/3X/0/b/0bf89922aa8cac796674d3d81ad4f6b29318e2ae.png)

---

<div class="post-metadata">

### Author: ![Rhidian](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rhidian/32/176630_2.png) [@Rhidian](https://meta.discourse.org/u/Rhidian)
#### Post date: [2021年四月17日 22:39 UTC](https://meta.discourse.org/t/personal-message-bubbles/147994/78 "2021-04-17T22:39:00Z")

</div>

这是哪个版本的 Discourse？

---

<div class="post-metadata">

### Author: ![Zup](https://avatars.discourse-cdn.com/v4/letter/z/c37758/32.png) [@Zup](https://meta.discourse.org/u/Zup)
#### Post date: [2021年四月17日 22:44 UTC](https://meta.discourse.org/t/personal-message-bubbles/147994/79 "2021-04-17T22:44:09Z")

</div>

哎呀，就这些，我的错，抱歉。2.7.0.beta6。

---

<div class="post-metadata">

### Author: ![Rhidian](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rhidian/32/176630_2.png) [@Rhidian](https://meta.discourse.org/u/Rhidian)
#### Post date: [2021年四月18日 06:54 UTC](https://meta.discourse.org/t/personal-message-bubbles/147994/80 "2021-04-18T06:54:02Z")

</div>

我假设你使用的是主题组件的最新版本？

如果是的话，我在运行 Discourse 最新稳定版时并未发现任何错误。[@staff](https://meta.discourse.org/groups/staff) 中是否有人能帮忙解答，这是否是 beta6 核心更新影响主题组件的已知问题？

---

<div class="post-metadata">

### Author: ![Zup](https://avatars.discourse-cdn.com/v4/letter/z/c37758/32.png) [@Zup](https://meta.discourse.org/u/Zup)
#### Post date: [2021年四月18日 07:00 UTC](https://meta.discourse.org/t/personal-message-bubbles/147994/81 "2021-04-18T07:00:14Z")

</div>

是的，TC 是最新版本。但在 2.7.0.beta7 的 TC 列表中仍会收到该警报。

---

<div class="post-metadata">

### Author: ![biologist](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/biologist/32/518364_2.png) [@biologist](https://meta.discourse.org/u/biologist)
#### Post date: [2021年五月11日 09:10 UTC](https://meta.discourse.org/t/personal-message-bubbles/147994/82 "2021-05-11T09:10:14Z")

</div>

尝试添加此主题时，我收到了以下错误消息：

> 很抱歉，使用 #ember- 或 .ember-view CSS 选择器是不允许的，因为这些选择器会在运行时动态生成，并且会随时间发生变化，最终导致 CSS 失效。请尝试使用其他选择器。

看来是 Ember 出了问题。我正在使用当前的测试版。

---

<div class="post-metadata">

### Author: ![Rhidian](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rhidian/32/176630_2.png) [@Rhidian](https://meta.discourse.org/u/Rhidian)
#### Post date: [2021年五月11日 09:31 UTC](https://meta.discourse.org/t/personal-message-bubbles/147994/83 "2021-05-11T09:31:11Z")

</div>

是的，我发现最新的 Discourse Beta 版本要求添加"use strict"，这导致多个主题组件失效。我会尝试逐一修复。在 Discourse 的最新稳定版中，这些组件仍然运行正常。

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [2021年七月22日 17:00 UTC](https://meta.discourse.org/t/personal-message-bubbles/147994/84 "2021-07-22T17:00:34Z")

</div>

你好。我一直很喜欢这个 TC。不过想问问，它会不会因为 2.8.0 的新更新而被弃用？

> [@2.8.0.beta4: Security Release, New PM Style, and more](https://meta.discourse.org/t/2-8-0-beta4-security-release-new-pm-style-and-more/197878?u=downey):
>
> New features in 2.8.0.beta4 Security fix This beta includes a critical security fix. All sites are encouraged to update as soon as possible. This fix ensures that the period parameter for top topic routes is properly validated. New Personal Message (PM) style We’ve updated the personal message style to use bubbles, helping to better distinguish PMs from regular topics. Outside of styles directly impacting the personal messages, there are some supporting additions: Adds class .curre…

---

<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: [2021年七月28日 03:06 UTC](https://meta.discourse.org/t/personal-message-bubbles/147994/85 "2021-07-28T03:06:32Z")

</div>

更新到最新版本后，我不得不从我的站点中移除它，因为它现在会产生冲突。不过，对于仍在使用旧版本的站点，它将在相当长的一段时间内继续有效。

@Rhidian - 非常感谢，你提供了巨大的帮助。它已被整合到 Discourse 核心中，这是最高的赞誉！！！

---

<div class="post-metadata">

### Author: ![AndreasZhou](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andreaszhou/32/212049_2.png) [@AndreasZhou](https://meta.discourse.org/u/AndreasZhou)
#### Post date: [2021年七月28日 03:31 UTC](https://meta.discourse.org/t/personal-message-bubbles/147994/86 "2021-07-28T03:31:42Z")

</div>

哦，这是否意味着当我们更新到最新版本的 Discourse 后，就无法再使用个人消息气泡了？🥶

---

<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: [2021年七月28日 03:44 UTC](https://meta.discourse.org/t/personal-message-bubbles/147994/87 "2021-07-28T03:44:32Z")

</div>

不，完全不需要！该主题组件已面向所有人推出，因此不再需要它。

---

<div class="post-metadata">

### Author: ![AndreasZhou](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andreaszhou/32/212049_2.png) [@AndreasZhou](https://meta.discourse.org/u/AndreasZhou)
#### Post date: [2021年七月28日 04:00 UTC](https://meta.discourse.org/t/personal-message-bubbles/147994/88 "2021-07-28T04:00:35Z")

</div>

啊，那意味着我们可以卸载主题组件，而消息气泡仍会保留？

---

<div class="post-metadata">

### Author: ![Rhidian](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rhidian/32/176630_2.png) [@Rhidian](https://meta.discourse.org/u/Rhidian)
#### Post date: [2021年七月28日 05:05 UTC](https://meta.discourse.org/t/personal-message-bubbles/147994/89 "2021-07-28T05:05:16Z")

</div>

> [@nathank\_01ershaw](#):
>
> @Rhidian - 谢谢，这真的帮了大忙。它已被纳入 Discourse 核心，这是最高的赞誉！！！

感谢 @nathank。是的，我怀疑一旦成为核心功能，就不再需要这个插件了。不过，由于许多托管服务商的版本还落后几版，我们仍会保留它以供这些用户使用。我还没来得及尝试新的核心版本，所以结果如何还有待观察。如果确实需要，我们或许总能在此基础上添加一些核心版本所没有的额外选项。这就是 Discourse 主题的魅力所在：blush:

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [2021年七月28日 18:49 UTC](https://meta.discourse.org/t/personal-message-bubbles/147994/90 "2021-07-28T18:49:28Z")

</div>

恭喜！

我仍有一些想法，希望能利用您在定制方面的出色才华。我有一位朋友开发了一个 Tampermonkey 脚本，非常需要您的帮助将其转换为主题组件。在基础层面，它会在公开场合装饰或高亮显示 OP（原作者）和工作人员账号，例如版主/管理员；我觉得这也可以用于在特定分类中高亮显示该分类下的分类版主（核心功能：将用户名包裹在一个气泡中）。

此外，在实施用户禁言功能之前，他也有自己的实现方式，但需要手动编辑脚本。当时的消息仍然显示，只是通过下拉菜单隐藏了用户名，而不是像现在这样完全禁言。

[上一頁](https://meta.discourse.org/t/personal-message-bubbles/147994.md?page=1)

[下一頁](https://meta.discourse.org/t/personal-message-bubbles/147994.md?page=3)
