discourse/plugins/chat/test/javascripts
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
..
acceptance DEV: Add page-aware plugin APIs for saving user preferences (#36757) 2025-12-18 10:58:16 +01:00
components DEV: Rename htmlSafe to trustHTML from @ember/template (#38465) 2026-03-11 18:57:22 -03:00
helpers DEV: Move discourse-common/(utils|lib) to discourse/lib (#30733) 2025-01-13 13:02:49 +00:00
integration DEV: Update Ember to 6.6.0 (#34460) 2025-08-27 16:48:40 +01:00
unit DEV: Split mobile chat unread indicators by current vs other channels (#39115) 2026-04-07 18:46:17 +04:00
chat-fixtures.js DEV: Replace Ember's deprecated mapBy with standard .map (#34963) 2025-09-26 12:59:35 -03:00