discourse/plugins/chat/spec/system
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
..
list_channels DEV: Switch to data attributes to represent sidebar section name (#20771) 2023-03-23 13:09:45 +08:00
page_objects DEV: Refactoring chat message actions for ChatMessage component usage in thread panel (#20756) 2023-04-06 15:19:52 +02:00
shortcuts DEV: Fix a constant redefinition warning (#20842) 2023-03-27 13:34:25 +02:00
user_menu_notifications DEV: properly namespace chat (#20690) 2023-03-17 14:24:38 +01:00
user_status DEV: attempts to move all Jobs.run_immediately! at top (#19688) 2023-01-03 11:32:27 +01:00
anonymous_spec.rb DEV: start glimmer-ification and optimisations of chat plugin (#19531) 2022-12-21 13:21:02 +01:00
archive_channel_spec.rb DEV: properly namespace chat (#20690) 2023-03-17 14:24:38 +01:00
bookmark_message_spec.rb PERF: applies optimisations on chat-live pane (#20532) 2023-03-06 16:42:11 +01:00
browse_page_spec.rb FIX: correctly uses request_uri to generate load_more_url (#19680) 2023-01-03 00:19:13 +01:00
channel_about_page_spec.rb DEV: properly namespace chat (#20690) 2023-03-17 14:24:38 +01:00
channel_info_pages_spec.rb DEV: /channel -> /c chat route rename (#19782) 2023-01-27 09:58:12 -03:00
channel_members_page_spec.rb DEV: properly namespace chat (#20690) 2023-03-17 14:24:38 +01:00
channel_message_selection_spec.rb FIX: Regression with chat shift+select messages (#20305) 2023-02-15 08:49:56 +01:00
channel_message_upload_spec.rb DEV: Uncomment chat upload system specs (#20859) 2023-03-28 10:55:01 -04:00
channel_selector_modal_spec.rb DEV: Fix a constant redefinition warning (#20842) 2023-03-27 13:34:25 +02:00
channel_settings_page_spec.rb DEV: /channel -> /c chat route rename (#19782) 2023-01-27 09:58:12 -03:00
chat_channel_spec.rb DEV: correctly tests text is rendered in replies (#20845) 2023-03-27 15:42:30 +02:00
chat_composer_spec.rb DEV: correctly tests text is rendered in replies (#20845) 2023-03-27 15:42:30 +02:00
closed_channel_spec.rb REFACTOR: Fix pluralized strings in chat plugin (#20357) 2023-02-20 10:31:02 +01:00
create_channel_spec.rb DEV: properly namespace chat (#20690) 2023-03-17 14:24:38 +01:00
deleted_channel_spec.rb DEV: start glimmer-ification and optimisations of chat plugin (#19531) 2022-12-21 13:21:02 +01:00
deleted_message_spec.rb PERF: applies optimisations on chat-live pane (#20532) 2023-03-06 16:42:11 +01:00
draft_message_spec.rb FIX: do not show infinite loading state on draft with new users (#20582) 2023-03-08 15:21:20 +01:00
drawer_spec.rb DEV: adds a addChatDrawerStateCallback API (#20640) 2023-03-10 18:49:59 +01:00
edited_message_spec.rb FIX: ensures edited message is correctly re-decorated (#20637) 2023-03-10 17:06:13 +01:00
flag_message_spec.rb DEV: rework the chat-live-pane (#20519) 2023-03-03 13:09:25 +01:00
hashtag_autocomplete_spec.rb DEV: properly namespace chat (#20690) 2023-03-17 14:24:38 +01:00
jit_messages_spec.rb REFACTOR: Fix pluralized strings in chat plugin (#20357) 2023-02-20 10:31:02 +01:00
kick_user_from_channel_spec.rb FEATURE: Auto-remove users without permission from channel (#20344) 2023-03-22 10:19:59 +10:00
mention_warnings_spec.rb PERF: applies optimisations on chat-live pane (#20532) 2023-03-06 16:42:11 +01:00
message_notifications_mobile_spec.rb DEV: attempts to move all Jobs.run_immediately! at top (#19688) 2023-01-03 11:32:27 +01:00
message_notifications_with_sidebar_spec.rb DEV: rework the chat-live-pane (#20519) 2023-03-03 13:09:25 +01:00
message_user_info.rb DEV: rework the chat-live-pane (#20519) 2023-03-03 13:09:25 +01:00
move_message_to_channel_spec.rb DEV: start glimmer-ification and optimisations of chat plugin (#19531) 2022-12-21 13:21:02 +01:00
navigating_to_message_spec.rb DEV: rework the chat-live-pane (#20519) 2023-03-03 13:09:25 +01:00
navigation_spec.rb DEV: /channel -> /c chat route rename (#19782) 2023-01-27 09:58:12 -03:00
network_reconciliation_spec.rb FIX: ensures recovering network doesn't create unread mentions (#19597) 2022-12-23 07:38:45 +01:00
react_to_message_spec.rb DEV: Refactoring chat message actions for ChatMessage component usage in thread panel (#20756) 2023-04-06 15:19:52 +02:00
read_only_spec.rb REFACTOR: Fix pluralized strings in chat plugin (#20357) 2023-02-20 10:31:02 +01:00
sidebar_navigation_menu_spec.rb UX: update chat icon to d-chat (#20744) 2023-03-21 10:40:42 -04:00
sidebars_spec.rb DEV: start glimmer-ification and optimisations of chat plugin (#19531) 2022-12-21 13:21:02 +01:00
silenced_user_spec.rb DEV: start glimmer-ification and optimisations of chat plugin (#19531) 2022-12-21 13:21:02 +01:00
single_thread_spec.rb DEV: Refactoring chat message actions for ChatMessage component usage in thread panel (#20756) 2023-04-06 15:19:52 +02:00
sticky_date_spec.rb DEV: rework the chat-live-pane (#20519) 2023-03-03 13:09:25 +01:00
transcript_spec.rb DEV: Refactoring chat message actions for ChatMessage component usage in thread panel (#20756) 2023-04-06 15:19:52 +02:00
unfollow_dm_channel_spec.rb DEV: Improve performance of system test sign_in helper (#19579) 2022-12-22 16:03:27 +00:00
update_last_read.rb DEV: properly namespace chat (#20690) 2023-03-17 14:24:38 +01:00
uploads_spec.rb DEV: Uncomment chat upload system specs (#20859) 2023-03-28 10:55:01 -04:00
user_card_spec.rb DEV: properly namespace chat (#20690) 2023-03-17 14:24:38 +01:00
user_chat_preferences_spec.rb DEV: rework the chat-live-pane (#20519) 2023-03-03 13:09:25 +01:00
user_presence.rb FIX: accounts for hide_profile_and_presence core user option (#20991) 2023-04-06 09:29:54 +10:00
visit_channel_spec.rb DEV: Pass messageId as a dynamic segment instead of a query param (#20013) 2023-02-01 12:39:23 -03:00