[FEATURE] feat: Pinned Message Banner below chat header

未关闭
#1,383 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@deepak0x 已经在做这个了。

开始于 2026年10月23日。

  • #1384 来自 @Tisya-Gupta —— 未关闭
  • #1398 来自 @deepak0x —— 未关闭

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
javascript, react
领域
frontend

调研方向

Start from the ChatHeader component, since the banner must render directly below it, and from the ECOptions definition, where the showPinnedBanner flag would be added with a default of true. Read how the chat body scrolls to and highlights a message, and how real-time pin and unpin events reach the client. Done means the banner appears only when messages are pinned, cycles through them, scrolls to the selected message, and respects the flag. The issue spans several subsystems and has no linked pull request, so ask a maintainer before starting.

由索引模型根据 Issue 内容生成。

描述

As an EmbeddedChat developer

I need to:
Show a dismissible banner below the chat header that surfaces the current room's pinned messages, lets users navigate between them, and scrolls to the selected message in the chat body.

So That:
Participants are immediately aware of pinned content (announcements, rules, action items) without having to open the Pinned Messages sidebar, matching the discoverability behaviour of other mainstream chat clients.

Acceptance Criteria

  • A banner appears below the ChatHeader whenever the current room has one or more pinned messages; it is hidden when there are none.
  • The banner shows a pin icon, the text snippet of the currently displayed pinned message (truncated at ~80 characters with ellipsis), and the author's username.
  • When multiple messages are pinned, left/right arrow buttons cycle through them and a counter label (e.g. "2 / 5") reflects the current position.
  • Clicking the banner body scrolls the message list to the corresponding message and applies a brief highlight animation on that message.
  • A close (✕) button dismisses the banner for the current session without unpinning; it reappears on room change or page reload.
  • An ECOptions boolean flag (e.g. showPinnedBanner, default true) lets host applications hide the banner entirely.
  • The banner respects the active theme and is compatible with both the default flat layout and the Bubble message variant.
  • When a message is pinned or unpinned in real time the banner updates (or disappears) without a page reload.
主要语言
JavaScript
星标
171
派生
421
平均合并
3 天 6 小时
30 天内合并 PR
4

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

RocketChat/EmbeddedChat 的其他 Issue

查看 RocketChat/EmbeddedChat 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。