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/tests/helpers
Alan Guo Xiang Tan ce531913a8
FIX: Sync user's reviewables count when loading reviewables list (#20128)
1. What is the problem here?

When a user's reviewables count changes, the changes are published via
MessageBus in a background Sidekiq job which means there is a delay before the
client receives the MessageBus message with the updated count. During
the time the reviewables count for a user has been updated and the time
when the client receives the MessageBus message with the updated count,
a user may view the reviewables list in the user menu. When that happens, the number of
reviewables in the list may be out of sync with the count shown.

2. What is the fix?

Going forward, the response for the `ReviewablesController#user_menu_list` action will include the user's reviewables count as
the `reviewables_count` attribute. This is then used by the client side
to update the user's reviewables count to ensure that the reviewables
list and count are kept in sync.
2023-02-02 10:19:51 +08:00
..
component-test.js DEV: Remove user options from current user serializer (#19089) 2022-12-05 18:25:30 +02:00
create-pretender.js SECURITY: Hide PM count for tags by default (#20061) 2023-01-31 12:08:23 +08:00
create-store.js DEV: Deprecate create-store test helper (#19021) 2022-11-16 10:54:46 +01:00
d-editor-helper.js DEV: Replace deprecated String.prototype.substr() (#16233) 2022-04-01 17:35:17 +02:00
deprecation-counter.js DEV: Improve discourse-common/deprecate implementation (take 2) (#19032) 2022-11-16 09:30:20 +00:00
fixture-pretender.js Support for Testem in Ember CLI (#12442) 2021-03-19 09:32:46 -04:00
notification-types-helper.js DEV: Refactor new user menu files (#17879) 2022-08-16 10:37:56 +08:00
presence-pretender.js DEV: Always await for publishToMessageBus (#17626) 2022-07-24 19:55:58 +02:00
qunit-helpers.js DEV: Deprecate controllerFor test helper (#19606) 2022-12-23 11:33:42 +01:00
review-pretender.js FIX: Sync user's reviewables count when loading reviewables list (#20128) 2023-02-02 10:19:51 +08:00
reviewable-types-helper.js DEV: Refactor new user menu files (#17879) 2022-08-16 10:37:56 +08:00
select-kit-helper.js DEV: Remove all use of Ember/jQuery globals in core (#18670) 2022-10-19 17:04:49 +01:00
site-settings.js DEV: Convert SiteSettings to a tracked object (#19015) 2022-11-17 18:44:23 +01:00
site.js DEV: Remove hints of jshint (#14828) 2021-11-08 09:12:37 +08:00
store-pretender.js REFACTOR: Move javascript tests inside discourse app 2020-10-02 11:29:36 -04:00
temporary-module-helper.js DEV: Support theme/plugin overrides of colocated component templates (#19237) 2022-11-30 14:14:38 +00:00
textarea-selection-helper.js REFACTOR: Move javascript tests inside discourse app 2020-10-02 11:29:36 -04:00