bug: A second date separator ("Today") appears where unread messages start
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 72/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- react, typescript
- 領域
- frontend
研究方向
從 src/components/MessageList/utils.ts 的 processMessages 開始,額外的日期分隔符會插入在標記為 unread: true 的第一則未讀訊息之前。然後檢查 DateSeparator.tsx,其中說明 unread 沒有作用。透過渲染啟用日期分隔符且未讀訊息從一天中途開始的 MessageList 來重現。當每天只出現一個日期分隔符,且未讀位置仍由 UnreadMessagesSeparator 標記時,即完成。
由索引模型根據 Issue 內容生成。
描述
Describe the bug
processMessages inserts an extra date separator before the first unread message from another user, marked unread: true. In v15, DateSeparator documents unread as "Has no effect", so this separator renders exactly like an ordinary date separator. If the unread messages start partway through a day, the list shows the date twice: once at the start of the day, and again ("Today") in the middle of it, above the UnreadMessagesSeparator.
To Reproduce
- Use
<MessageList />with its defaults (date separators on). - In a channel, have another user send several messages today. Read them.
- Have that user send more messages today while you're away from the channel.
- Open the channel. "Today" appears at the start of today's messages, and a second "Today" appears where the unread messages start.
Expected behavior
One date separator per day. The unread position is marked by UnreadMessagesSeparator, so the extra separator isn't needed, or it should render differently from an ordinary date separator.
Our workaround
We pass hideNewMessageSeparator to MessageList. That prop only turns off this extra date separator; UnreadMessagesSeparator still renders. The prop name suggests it hides the "new messages" separator itself, which is what made this hard to find.
Package version
- stream-chat-react: 15.0.0. The same code is in 15.0.2, checked in source (
processMessagesinsrc/components/MessageList/utils.ts, andDateSeparator.tsx). - stream-chat-js: 10.0.1
Desktop
- Chrome on macOS
Additional context
App id: 67855
- 主要語言
- TypeScript
- 星號
- 845
- 分支
- 295
- 平均合併
- 1 天 8 小時
- 30 天內合併 PR
- 106
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
GetStream/stream-chat-react 的其他 Issue
-
bug: Composer textarea doesn't resize when the SDK sets its text (paste, draft, clear after send)未關閉
難度 3/5 1-2 天 新手友好度 62/100
GetStream/stream-chat-react#3468 ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 62/100
GetStream/stream-chat-react#3466 ·
維護者通常 1 天內回覆
-
bug status: unconfirmed
難度 4/5 3-5 天 新手友好度 42/100
GetStream/stream-chat-react#2647 · 2 則留言 ·
維護者通常 1 天內回覆
-
dependencies
難度 3/5 1-2 天 新手友好度 52/100
GetStream/stream-chat-react#1982 · 8 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆
查看 GetStream/stream-chat-react 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
vercel-labs/ui#1139 ·
維護者通常 1 天內回覆
-
generate_image reference URL guard lets through IPv4-mapped IPv6 hosts and 100.64.0.0/10可能已有人在做 @goranai 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 75/100
維護者通常 1 天內回覆
-
bot:ai-assisted component:platform-js status:untriaged
難度 2/5 1-3 小時 新手友好度 82/100
midnightntwrk/platform-js#93 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 66/100
-
難度 1/5 1 小時以內 新手友好度 74/100
nicobailon/pi-web-access#710 ·
維護者通常 1 天內回覆