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
Kyle Zhao 9b10a78d82 FEATURE: Quick access panels in user menu (#8073)
* Extract QuickAccessPanel from UserNotifications.

* FEATURE: Quick access panels in user menu.

This feature adds quick access panels for bookmarks and personal
messages. It allows uses to browse recent items directly in the user
menu, without being redirected to the full pages.

* REFACTOR: Use QuickAccessItem for messages.

Reusing `DefaultNotificationItem` feels nice but it actually requires a
lot of extra work that is not needed for a quick access item.

Also, `DefaultNotificationItem` shows an incorrect tooptip ("unread
private message"), and it is not trivial to remove / override that.

* Use a plain JS object instead.

An Ember object was required when `DefaultNotificationItem` was used.

* Prefix instead suffix `_` for private helpers.

* Set to null instead of deleting object keys.

JavaScript engines can optimize object property access based on the
object’s shape. https://mathiasbynens.be/notes/shapes-ics

* Change trivial try/catch to one-liners.

* Return the promise in case needs to be waited on.

* Refactor showAll to a link with href

* Store `emptyStatePlaceholderItemText` in state.

* Store items in Session singleton instead.

We can drop `staleItems` (and `findStaleItems`) altogether. Because
`(old) items === staleItems` when switching back to a quick access
panel.

* Add `limit` parameter to the `user_actions` API.

* Explicitly import Session instead.
2019-09-09 11:03:57 -04:00
..
adapters FEATURE: Adds a pop up that shows a more detailed score for reviewables (#8035) 2019-09-04 09:56:25 -06:00
components FEATURE: Quick access panels in user menu (#8073) 2019-09-09 11:03:57 -04:00
controllers UX/PERF: Update readers count when a post from another user is read. Don't fetch the post data again just to update the count. (#8078) 2019-09-09 11:29:15 +10:00
helpers FEATURE: Adds a pop up that shows a more detailed score for reviewables (#8035) 2019-09-04 09:56:25 -06:00
initializers FIX: notifications not updating correctly from background tab 2019-08-30 15:51:20 +10:00
lib Use Discourse.getURL for /clicks/track so clicks can be tracked on relative URLs (#8079) 2019-09-09 17:41:37 +10:00
mixins SECURITY: Don't send CSRF token in query string 2019-08-21 13:16:38 +01:00
models UX/PERF: Update readers count when a post from another user is read. Don't fetch the post data again just to update the count. (#8078) 2019-09-09 11:29:15 +10:00
pre-initializers FIX: Better detection of Apple browsers (#7961) 2019-08-02 12:43:25 -03:00
raw-views DEV: global s/this.get\("(\w+)"\)/this.$1 (#7592) 2019-05-27 10:15:39 +02:00
routes FIX: Topics with muted tag didn't show up when filtering by category and tag 2019-09-06 20:38:03 +02:00
services FIX: Allow accessing nested objects within theme settings 2019-08-30 12:27:02 +01:00
templates FEATURE: add before-topic-progress plugin outlet 2019-09-04 09:31:06 -07:00
widgets FEATURE: Quick access panels in user menu (#8073) 2019-09-09 11:03:57 -04:00
mapping-router.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00