bug: A second date separator ("Today") appears where unread messages start
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- react, typescript
- 領域
- frontend
調査の方向性
src/components/MessageList/utils.ts の processMessages から始めます。ここでは、unread: true とマークされた最初の未読メッセージの前に追加の日付セパレーターが挿入されます。次に DateSeparator.tsx を確認します。これは unread が効果を持たないことを文書化しています。日付セパレーターを有効にし、未読メッセージが一日の途中から始まる状態で MessageList をレンダリングして再現します。1 日につき日付セパレーターが 1 つだけ表示され、未読位置が引き続き 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時間
- マージ済み PR(30日)
- 106
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 件 ·
メンテナーはふだん 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 日以内に返信