discourse/plugins/chat/test/javascripts/components
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-channel-archive-modal-inner-test.js DEV: Modernize chat's component tests (#19577) 2022-12-22 14:35:18 +01:00
chat-channel-card-test.js DEV: converts models to native classes (#21418) 2023-05-08 18:24:41 +02:00
chat-channel-delete-modal-inner-test.js DEV: Modernize chat's component tests (#19577) 2022-12-22 14:35:18 +01:00
chat-channel-leave-btn-test.js DEV: converts models to native classes (#21418) 2023-05-08 18:24:41 +02:00
chat-channel-metadata-test.js DEV: Rearchitect chat tracking state (#21550) 2023-05-16 14:51:13 +02:00
chat-channel-preview-card-test.js FIX: Don't autojoin users when they have ready-only permissions (#20213) 2023-05-10 08:45:13 -03:00
chat-channel-row-test.js DEV: Rearchitect chat tracking state (#21550) 2023-05-16 14:51:13 +02:00
chat-channel-settings-saved-indicator-test.js FEATURE: channels can allow/disallow @all/@here mentions (#19317) 2022-12-05 17:03:51 +01:00
chat-channel-settings-view-test.js REFACTOR: channel retention reminder text (#20310) 2023-02-15 14:50:01 +01:00
chat-channel-status-test.js DEV/ glimmerify chat-channel-status (#21445) 2023-05-09 09:22:25 +02:00
chat-channel-title-test.js DEV: converts models to native classes (#21418) 2023-05-08 18:24:41 +02:00
chat-composer-dropdown-test.js DEV: Modernize chat's component tests (#19577) 2022-12-22 14:35:18 +01:00
chat-composer-inline-buttons-test.js DEV: Modernize chat's component tests (#19577) 2022-12-22 14:35:18 +01:00
chat-composer-placeholder-test.js UX: improves composer and thread panel (#21210) 2023-04-25 10:23:03 +02:00
chat-composer-upload-test.js UX: improves composer and thread panel (#21210) 2023-04-25 10:23:03 +02:00
chat-composer-uploads-test.js DEV: Correct the app-events service injections (#21413) 2023-05-08 10:48:56 +02:00
chat-emoji-avatar-test.js DEV: Modernize chat's component tests (#19577) 2022-12-22 14:35:18 +01:00
chat-emoji-picker-test.js FIX: relies on native focus behavior in chat emoji picker (#21092) 2023-04-13 20:35:13 +02:00
chat-message-avatar-test.js DEV: rework the chat-live-pane (#20519) 2023-03-03 13:09:25 +01:00
chat-message-collapser-test.js DEV: Remove lazy-yt and replace with lazy-videos (#20722) 2023-03-29 11:54:25 -04:00
chat-message-info-test.js DEV: rework the chat-live-pane (#20519) 2023-03-03 13:09:25 +01:00
chat-message-move-to-channel-modal-inner-test.js DEV: Modernize chat's component tests (#19577) 2022-12-22 14:35:18 +01:00
chat-message-reaction-test.js DEV: Refactoring chat message actions for ChatMessage component usage in thread panel (#20756) 2023-04-06 15:19:52 +02:00
chat-message-separator-date-test.js DEV: rework the chat-live-pane (#20519) 2023-03-03 13:09:25 +01:00
chat-message-separator-new-test.js DEV: rework the chat-live-pane (#20519) 2023-03-03 13:09:25 +01:00
chat-message-test.js DEV: converts models to native classes (#21418) 2023-05-08 18:24:41 +02:00
chat-message-text-test.js DEV: Remove lazy-yt and replace with lazy-videos (#20722) 2023-03-29 11:54:25 -04:00
chat-replying-indicator-test.js FEATURE: chat-replying indicator for threads (#21485) 2023-05-11 08:02:04 +02:00
chat-retention-reminder-test.js DEV: rework the chat-live-pane (#20519) 2023-03-03 13:09:25 +01:00
chat-retention-reminder-text-test.js DEV: converts models to native classes (#21418) 2023-05-08 18:24:41 +02:00
chat-upload-test.js FEATURE: Inline audio player for chat uploads (#20175) 2023-02-06 16:00:03 +10:00
chat-user-avatar-test.js DEV: Modernize chat's component tests (#19577) 2022-12-22 14:35:18 +01:00
chat-user-display-name-test.js DEV: Modernize chat's component tests (#19577) 2022-12-22 14:35:18 +01:00
chat-user-info-test.js FIX: Chat member user card rendered out of view (#20332) 2023-02-17 10:14:00 -03:00
collapser-test.js DEV: Modernize chat's component tests (#19577) 2022-12-22 14:35:18 +01:00
dc-filter-input-test.js DEV: Modernize chat's component tests (#19577) 2022-12-22 14:35:18 +01:00
direct-message-creator-test.js DEV: converts models to native classes (#21418) 2023-05-08 18:24:41 +02:00
on-visibility-action-test.js DEV: Modernize chat's component tests (#19577) 2022-12-22 14:35:18 +01:00
user-card-chat-button-test.js UX: hide chat button on user card when suspended (#20292) 2023-02-14 21:12:50 +01:00