discourse/plugins/chat/test/javascripts/components
Joffrey JAFFEUX dcaa719363
FIX: correctly handle subscriptions (#24270)
Subscriptions manager have been a pain since the beginning, one of the problem is that thread and channels behave mostly the same but with various small difference which I expect to increase over time.

Trying to use subclasses for this case has proven to be a mistake, this commit now uses a class for each case (channel, thread) which for now contains a lot of duplication, which might be reduced in the future but has the merit to make reasoning about each case very simple.

This refactor is fixing a bug introduced in 90efdd7f9d which was causing the wrong channel to be unsubscribed, this shouldn't be possible anymore. We had tests for this which were disabled due to flakeyness, I will consider re-enabling them in the future.

Other notes:
- notices had been added to the subscriptions manager service, they have been moved into their own dedicated service: `ChatChannelNoticesManager`
- the `(each model)` trick used in `<ChatChannel />` since 90efdd7f9d to ensure atomicity has been applied to `<ChatThread />` too
2023-11-07 16:37:42 +01:00
..
chat-channel-card-test.js DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
chat-channel-leave-btn-test.js DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
chat-channel-metadata-test.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
chat-channel-preview-card-test.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
chat-channel-row-test.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
chat-channel-status-test.js DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
chat-channel-test.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
chat-channel-title-test.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
chat-composer-dropdown-test.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
chat-composer-message-details-test.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
chat-composer-placeholder-test.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
chat-composer-upload-test.js DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
chat-composer-uploads-test.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
chat-emoji-avatar-test.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
chat-emoji-picker-test.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
chat-header-icon-test.js DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
chat-message-avatar-test.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
chat-message-collapser-test.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
chat-message-info-test.js DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
chat-message-left-gutter-test.js DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
chat-message-reaction-test.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
chat-message-separator-date-test.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
chat-message-separator-new-test.js DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
chat-message-test.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
chat-message-text-test.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
chat-modal-archive-channel-test.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
chat-modal-delete-channel-test.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
chat-modal-move-message-to-channel-test.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
chat-notices-test.js FIX: correctly handle subscriptions (#24270) 2023-11-07 16:37:42 +01:00
chat-replying-indicator-test.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
chat-retention-reminder-test.js DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
chat-retention-reminder-text-test.js DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
chat-thread-header-test.js FIX: correctly display escaped thread titles (#24159) 2023-10-30 21:06:31 +01:00
chat-thread-list-item-test.js FIX: correctly display escaped thread titles (#24159) 2023-10-30 21:06:31 +01:00
chat-thread-participants-test.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
chat-upload-test.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
chat-user-avatar-test.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
chat-user-card-button-test.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
chat-user-display-name-test.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
chat-user-info-test.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
collapser-test.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
dc-filter-input-test.js DEV: Sort imports 2023-10-10 21:46:54 +01:00