bug: A second date separator ("Today") appears where unread messages start
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- react, typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Bắt đầu trong src/components/MessageList/utils.ts tại processMessages, nơi dấu phân cách ngày bổ sung được chèn trước tin nhắn chưa đọc đầu tiên được đánh dấu unread: true. Sau đó kiểm tra DateSeparator.tsx, tệp ghi chú rằng unread không có tác dụng. Tái hiện bằng cách render MessageList với dấu phân cách ngày được bật và các tin nhắn chưa đọc bắt đầu từ giữa một ngày. Hoàn thành khi chỉ có một dấu phân cách ngày xuất hiện mỗi ngày và vị trí chưa đọc vẫn được đánh dấu bởi UnreadMessagesSeparator.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 845
- Fork
- 295
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 106
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của GetStream/stream-chat-react
-
bug: Composer textarea doesn't resize when the SDK sets its text (paste, draft, clear after send)Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 62/100
GetStream/stream-chat-react#3468 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 62/100
GetStream/stream-chat-react#3466 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug status: unconfirmed
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
GetStream/stream-chat-react#2647 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
dependencies
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
GetStream/stream-chat-react#1982 · 8 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của GetStream/stream-chat-react
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
vercel-labs/ui#1139 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
generate_image reference URL guard lets through IPv4-mapped IPv6 hosts and 100.64.0.0/10Có thể đã có người làm @goranai đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] IntegerRange.contains counts a non-integer just above max as inside an inclusive rangeĐang mởbot:ai-assisted component:platform-js status:untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
midnightntwrk/platform-js#93 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 74/100
nicobailon/pi-web-access#710 ·
Maintainer thường phản hồi trong vòng 1 ngày