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
Régis Hanol bc63232d2e
FIX: sync reviewable count when opening the hamburger menu (#10368)
When a tab is open but left unattended for a while, the red, green, and blue
pills tend to go out of sync.

So whevener we open the notifications menu, we sync up the notification count
(eg. blue and green pills) with the server.

However, the reviewable count (eg. the red pill) is not a notification and
is located in the hamburger menu. This commit adds a new route on the server
side to retrieve the reviewable count for the current user and a ping
(refreshReviewableCount) from the client side to sync the reviewable count
whenever they open the hamburger menu.

REFACTOR: I also refactored the hamburger-menu widget code to prevent repetitive uses
of "this.".

PERF: I improved the performance of the 'notify_reviewable' job by doing only 1 query
to the database to retrieve all the pending reviewables and then tallying based on the
various rights.
2020-08-07 18:13:02 +02:00
..
adapters REFACTOR: Remove Discourse.SiteSettings from reply adapter 2020-07-21 13:51:28 -04:00
components FIX: removes persistedQueryParams as it should work out of the box (#10394) 2020-08-07 09:51:37 +02:00
controllers FIX: removes persistedQueryParams as it should work out of the box (#10394) 2020-08-07 09:51:37 +02:00
helpers REFACTOR: Remove Discourse.__widget_helpers 2020-08-06 14:35:46 -04:00
initializers REFACTOR: Remove Discourse constants from cleanDOM 2020-08-06 15:34:20 -04:00
lib DEV: Fix lint take 2. 2020-08-07 13:17:51 +08:00
mixins FEATURE: Poll breakdown 2.0 (#10345) 2020-08-06 17:57:06 +02:00
models FIX: removes persistedQueryParams as it should work out of the box (#10394) 2020-08-07 09:51:37 +02:00
pre-initializers REFACTOR: Use the session for the ServiceWorkerURL 2020-08-06 15:24:43 -04:00
raw-views DEV: import I18n instead of global usage (#9768) 2020-05-13 16:23:41 -04:00
routes FEATURE: set notification levels when added to a group (#10378) 2020-08-06 12:27:27 -04:00
services REFACTOR: Move Page title / focus / counts logic to service 2020-08-04 12:02:25 -04:00
templates FEATURE: Use PG ts_headline for highlighting topic title in search. 2020-08-07 12:43:09 +08:00
widgets FIX: sync reviewable count when opening the hamburger menu (#10368) 2020-08-07 18:13:02 +02:00
app.js REFACTOR: Use the session to track assetVersion/requiresRefresh 2020-08-06 15:09:13 -04:00
mapping-router.js FIX: Support root paths that omit the trailing slash and have QPs 2020-07-01 14:55:20 -04:00