discourse/test/javascripts/widgets
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
..
actions-summary-test.js.es6 FEATURE: Flag count in post menu 2019-05-06 16:13:31 -04:00
avatar-flair-test.js.es6 DEV: uses find() helper instead of this.$() in js tests (#7062) 2019-02-25 16:04:55 +01:00
button-test.js.es6 DEV: uses find() helper instead of this.$() in js tests (#7062) 2019-02-25 16:04:55 +01:00
hamburger-menu-test.js.es6 DEV: prevents staff computed property to be overridden (#7931) 2019-07-24 22:01:08 +02:00
header-test.js.es6 DEV: uses find() helper instead of this.$() in js tests (#7062) 2019-02-25 16:04:55 +01:00
home-logo-test.js.es6 DEV: Improve component test skip option and skipped new tests 2019-05-16 15:15:37 -03:00
post-links-test.js.es6 DEV: uses find() helper instead of this.$() in js tests (#7062) 2019-02-25 16:04:55 +01:00
post-stream-test.js.es6 DEV: uses find() helper instead of this.$() in js tests (#7062) 2019-02-25 16:04:55 +01:00
post-test.js.es6 DEV: prevents staff computed property to be overridden (#7931) 2019-07-24 22:01:08 +02:00
poster-name-test.js.es6 DEV: uses find() helper instead of this.$() in js tests (#7062) 2019-02-25 16:04:55 +01:00
topic-participant-test.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
topic-status-test.js.es6 FIX: Rename deprecated icons, allow custom icons in badges 2019-07-16 11:13:44 -04:00
user-menu-test.js.es6 FEATURE: Quick access panels in user menu (#8073) 2019-09-09 11:03:57 -04:00
widget-test.js.es6 FIX: Fallback locale was not available for extra translations 2019-05-24 11:38:26 +02:00