This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/app/models
Alan Guo Xiang Tan 07ef828db9
DEV: Improve MessageBus subscriptions for TopicTrackingState (#19767)
## Why do we need this change? 

When loading the ember app, [MessageBus does not start polling immediately](f31f0b70f8/app/assets/javascripts/discourse/app/initializers/message-bus.js (L71-L81)) and instead waits for `document.readyState` to be `complete`. What this means is that if there are new messages being created while we have yet to start polling, those messages will not be received by the client.

With sidebar being the default navigation menu, the counts derived from `topic-tracking-state.js` on the client side is prominently displayed on every page. Therefore, we want to ensure that we are not dropping any messages on the channels that `topic-tracking-state.js` subscribes to.  

## What does this change do? 

This includes the `MessageBus.last_id`s for the MessageBus channels which `topic-tracking-state.js` subscribes to as part of the preloaded data when loading a page. The last ids are then used when we subscribe the MessageBus channels so that messages which are published before MessageBus starts polling will not be missed.

## Review Notes

1. See https://github.com/discourse/message_bus#client-support for documentation about subscribing from a given message id.
2023-02-01 07:18:45 +08:00
..
action-summary.js DEV: Use method definition syntax consistently (#14915) 2021-11-13 14:01:55 +01:00
archetype.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
associated-group.js FEATURE: Experimental support for group membership via google auth (#14835) 2021-12-09 12:30:27 +00:00
badge-grouping.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
badge.js UX: Show information about badge errors when saving 2022-09-01 09:59:14 +01:00
bookmark.js FIX: Bookmark auto delete preference usage and default value (#19707) 2023-01-05 08:43:58 +10:00
category-list.js FEATURE: Introduce 'Subcategories with featured topics' view (#16083) 2022-03-04 21:11:59 +00:00
category.js UX: Change ordering of categories shown in sidebar (#18803) 2022-11-04 05:21:49 +09:00
composer.js DEV: Add unique ids to deprecations (#19019) 2022-11-16 10:00:39 +00:00
draft.js FEATURE: Cook drafts excerpt in user activity (#14315) 2021-09-14 15:18:01 +03:00
group-history.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
group.js FEATURE: Allow group owners promote more owners (#19768) 2023-01-11 16:43:18 +08:00
invite.js DEV: Replace deprecated String.prototype.substr() (#16233) 2022-04-01 17:35:17 +02:00
live-post-counts.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
login-method.js UX: Fallback to regular title if screen-reader title is unavailable (#15048) 2021-11-23 11:12:54 +00:00
nav-item.js DEV: Add unique ids to deprecations (#19019) 2022-11-16 10:00:39 +00:00
notification.js DEV: Include pending reviewables in the main tab in the user menu (#18471) 2022-10-05 12:30:02 +03:00
pending-post.js FEATURE: Display pending posts on user’s page 2021-11-29 10:26:33 +01:00
permission-type.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
post-action-type.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
post-stream.js FIX: error when opening a previously deleted post (#19346) 2022-12-06 23:49:34 +04:00
post.js FEATURE: Allow admins to permanently delete revisions (#19913) 2023-01-19 15:09:01 -06:00
published-page.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
rest.js DEV: Replace site-settings:main with service:site-settings (#17734) 2022-08-01 09:43:33 +01:00
result-set.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
reviewable-history.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
reviewable.js DEV: Remove 'underscore' string prototype extensions (#16748) 2022-05-13 11:32:38 -05:00
session.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
site.js DEV: Add unique ids to deprecations (#19019) 2022-11-16 10:00:39 +00:00
static-page.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
store.js DEV: Add unique ids to deprecations (#19019) 2022-11-16 10:00:39 +00:00
tag-group.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
tag.js SECURITY: Hide PM count for tags by default (#20061) 2023-01-31 12:08:23 +08:00
topic-details.js DEV: Bump eslint-config-discourse (#14868) 2021-11-10 09:31:41 +10:00
topic-list.js DEV: Use includes() instead of indexOf() >= 0 (#17553) 2022-07-19 10:27:40 +08:00
topic-timer.js FEATURE: Allow durations < 1 hour and < 1 day for topic timers where duration is specified (auto delete replies, close based on last post) (#11961) 2021-02-05 10:12:56 +10:00
topic-tracking-state.js DEV: Improve MessageBus subscriptions for TopicTrackingState (#19767) 2023-02-01 07:18:45 +08:00
topic.js FIX: Ensure soft-deleted topics can be deleted (#19802) 2023-01-27 16:15:33 +02:00
trust-level.js FIX: Don't store translated trust level names in anonymous cache (#13224) 2021-06-01 22:11:48 +02:00
user-action-group.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
user-action-stat.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
user-action.js A11Y: multiple fixes to user stream items (#18368) 2022-09-27 10:59:26 -04:00
user-badge.js DEV: Use method definition syntax consistently (#14915) 2021-11-13 14:01:55 +01:00
user-draft.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
user-drafts-stream.js FEATURE: improve blank page syndrome on the user activity pages (#14311) 2021-09-16 21:35:34 +04:00
user-menu-reviewable.js DEV: Refactor notification/reviewable items rendering in the new user menu (#17792) 2022-08-05 07:55:00 +03:00
user-posts-stream.js DEV: Remove cache option from ajax() (#13142) 2021-05-31 14:41:35 +02:00
user-stream.js FEATURE: improve blank page syndrome on the user activity pages (#14311) 2021-09-16 21:35:34 +04:00
user.js DEV: Remove elder from codebase and also update 'regular' to 'member' (#20065) 2023-01-31 01:41:25 +08:00