discourse/plugins/chat/test/javascripts/unit
chapoi 4359fd7c75
DEV: Split mobile chat unread indicators by current vs other channels (#39115)
- On mobile, the `navbar back-button` unread indicator now only reflects
unreads from other channels, excluding the
currently viewed one (addresses
https://meta.discourse.org/t/notification-about-chat-messages-in-the-header/386167/8?u=chapoi)
- The `scroll-to-bottom button` now displays a "N new messages" text
label for unread messages in the current channel
(only when the original arrow-button is rendered)
- Both indicators render independently — if there are unreads in both
the current and other channels, both appear
- Fixed || to ?? fallback logic in ChatHeaderIconUnreadIndicator so that
explicit 0 counts are respected instead of
    falling through to global aggregates 

<img width="730" height="1572" alt="CleanShot 2026-04-06 at 17 31 29@2x"
src="https://github.com/user-attachments/assets/5071985d-733f-4e9b-9ff4-38e543521610"
/>

This means that this new indicator _within_ the current channel doesn't
distinguish between unread or mention. This is an intentional
simplification so it represents all new activity.

---------

Co-authored-by: David Battersby <info@davidbattersby.com>
2026-04-07 18:46:17 +04:00
..
components FEATURE: respect user presence when chat is on screen (#36652) 2025-12-16 17:23:32 +11:00
lib FIX: align deleted chat message restore behavior (#38493) 2026-03-11 13:39:54 +01:00
models DEV: thread count should be 0 if threading is disabled in chat (#38383) 2026-03-11 09:41:35 -03:00
services DEV: Split mobile chat unread indicators by current vs other channels (#39115) 2026-04-07 18:46:17 +04:00
utility Build(deps-dev): Bump the lint group across 1 directory with 4 updates (#33881) 2025-07-28 18:02:41 +02:00