discourse/plugins/chat/test/javascripts/acceptance
Martin Brennan 9953a6edd9
DEV: Rearchitect chat tracking state (#21550)
This moves chat tracking state calculation for channels
and threads into a central Chat::TrackingStateManager service, that
serves a similar purpose to the TopicTrackingState model
in core.

This service calls down to these query classes:

* ThreadUnreadsQuery
* ChannelUnreadsQuery

To get the unread_count and mention_count for the appropriate
channels and threads.

As well as this, this commit refactors the client-side chat
tracking state.

Now, there is a central ChatTrackingStateManager Ember Service
so all tracking is accessible and can be counted from one place,
which can also initialize tracking from an initial payload.

The actual tracking counts are now maintained in a ChatTrackingState
class that is initialized on the `.tracking` property of both channel and
thread objects.

This removes the attributes on UserChatChannelMembership and decoration
of said membership from ChannelFetcher, preferring instead to have an additional
object for tracking in the JSON.
2023-05-16 14:51:13 +02:00
..
chat-composer-test.js UX: improves composer and thread panel (#21210) 2023-04-25 10:23:03 +02:00
chat-live-pane-collapse-test.js DEV: Remove lazy-yt and replace with lazy-videos (#20722) 2023-03-29 11:54:25 -04:00
chat-live-pane-test.js DEV: /channel -> /c chat route rename (#19782) 2023-01-27 09:58:12 -03:00
hashtag-css-generator-test.js DEV: Rearchitect chat tracking state (#21550) 2023-05-16 14:51:13 +02:00