discourse/app/assets/javascripts
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
..
admin DEV: Rename all uses of PluginOutlet @args in core 2023-01-31 13:51:25 +00:00
bootstrap-json Build(deps): Bump jsdom from 21.0.0 to 21.1.0 in /app/assets/javascripts (#19944) 2023-01-22 22:39:36 +01:00
confirm-new-email DEV: Update linting setup and fix issues (#17345) 2022-07-06 10:37:54 +02:00
dialog-holder Build(deps): Bump ember-auto-import in /app/assets/javascripts (#19981) 2023-01-24 22:50:05 +01:00
discourse DEV: Improve MessageBus subscriptions for TopicTrackingState (#19767) 2023-02-01 07:18:45 +08:00
discourse-common FIX: Validate asset url before replacing base url (#16438) 2023-01-30 07:32:48 +08:00
discourse-ensure-deprecation-order DEV: Silence 3.x deprecations 2022-07-19 10:00:59 +01:00
discourse-hbr Build(deps-dev): Bump @embroider/test-setup in /app/assets/javascripts (#20017) 2023-01-26 18:45:22 +01:00
discourse-plugins Build(deps): Bump ember-auto-import in /app/assets/javascripts (#19981) 2023-01-24 22:50:05 +01:00
discourse-widget-hbs Build(deps-dev): Bump @embroider/test-setup in /app/assets/javascripts (#20017) 2023-01-26 18:45:22 +01:00
docs
ember-addons
ember-cli-progress-ci DEV: Add progress output in CI during ember-cli build (#17977) 2022-08-17 22:39:52 +01:00
locales FEATURE: Add Croatian language (#17130) 2022-06-18 00:18:22 +02:00
pretty-text Build(deps-dev): Bump @embroider/test-setup in /app/assets/javascripts (#20017) 2023-01-26 18:45:22 +01:00
select-kit Build(deps-dev): Bump @embroider/test-setup in /app/assets/javascripts (#20017) 2023-01-26 18:45:22 +01:00
truth-helpers Build(deps-dev): Bump @embroider/test-setup in /app/assets/javascripts (#20017) 2023-01-26 18:45:22 +01:00
wizard DEV: Rename all uses of PluginOutlet @args in core 2023-01-31 13:51:25 +00:00
.licensee.json DEV: Have licensee check xmldom license (#18840) 2022-11-02 11:51:11 -04:00
.npmrc
discourse-js-processor.js DEV: Introduce minification and source maps for Theme JS (#18646) 2022-10-18 18:20:10 +01:00
handlebars-shim.js
package.json DEV: Make dialog-holder a monorepo package (#19051) 2022-11-16 16:43:45 +01:00
polyfills.js Drop support for iOS < 15.7 (#19847) 2023-01-16 17:28:59 +00:00
service-worker.js.erb FEATURE: Enable service worker for Apple devices (#19643) 2023-01-30 13:23:19 -03:00
yarn.lock Build(deps): Bump deepmerge in /app/assets/javascripts (#20082) 2023-01-30 23:00:42 +01:00