discourse/plugins/chat/test/javascripts/components
Martin Brennan ea548292bc
DEV: Refactoring chat message actions for ChatMessage component usage in thread panel (#20756)
This commit is a major overhaul of how chat message actions work, to make it so they are reusable between the main chat channel and the chat thread panel, as well as many improvements and fixes for the thread panel.

There are now several new classes and concepts:

* ChatMessageInteractor -  This is initialized from the ChatMessage, ChatMessageActionsDesktop, and ChatMessageActionsMobile components. This handles permissions about what actions can be done for each
message based on the context (thread or channel), handles the actions themselves (e.g. copyLink, delete, edit),
and interacts with the pane of the current context to modify the UI
* ChatChannelThreadPane and ChatChannelPane services - This represents the UI context which contains the
messages, and are mostly used for state management for things like message selection.
* ChatChannelThreadComposer and ChatChannelComposer - This handles interaction between the pane, the
message actions, and the composer, dealing with reply and edit message state.
* Scrolling logic for the messages has now been moved to a helper so it can be shared between the main channel pane and the thread pane
* Various improvements with the emoji picker on both mobile and desktop. The DOM node of each component is now located outside of the message which prevents a large range of issues.

The thread panel now also works in the chat drawer, and the thread messages have less
actions than the main panel, since some do not make sense there (e.g. moving messages to
a different channel). The thread panel title, excerpt, and message sender have also been removed
for now to save space.

This gives us a solid base to keep expanding on and fixing up threads. Subsequent PRs will
make the thread MessageBus subscriptions work and disable echo mode
for the initial release of threads.

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2023-04-06 15:19:52 +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: Modernize chat's component tests (#19577) 2022-12-22 14:35:18 +01: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: Modernize chat's component tests (#19577) 2022-12-22 14:35:18 +01:00
chat-channel-metadata-test.js DEV: rework the chat-live-pane (#20519) 2023-03-03 13:09:25 +01:00
chat-channel-preview-card-test.js DEV: Modernize chat's component tests (#19577) 2022-12-22 14:35:18 +01:00
chat-channel-row-test.js DEV: rework the chat-live-pane (#20519) 2023-03-03 13:09:25 +01: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-title-test.js DEV: Modernize chat's component tests (#19577) 2022-12-22 14:35:18 +01: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 DEV: Refactoring chat message actions for ChatMessage component usage in thread panel (#20756) 2023-04-06 15:19:52 +02:00
chat-composer-upload-test.js DEV: Modernize chat's component tests (#19577) 2022-12-22 14:35:18 +01:00
chat-composer-uploads-test.js DEV: rework the chat-live-pane (#20519) 2023-03-03 13:09:25 +01: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 DEV: Refactoring chat message actions for ChatMessage component usage in thread panel (#20756) 2023-04-06 15:19:52 +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: Refactoring chat message actions for ChatMessage component usage in thread panel (#20756) 2023-04-06 15:19:52 +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 DEV: Modernize chat's component tests (#19577) 2022-12-22 14:35:18 +01: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: properly namespace chat (#20690) 2023-03-17 14:24:38 +01: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: Modernize chat's component tests (#19577) 2022-12-22 14:35:18 +01: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