discourse/test/javascripts/helpers
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
..
assertions.js select-kit refactoring 2017-12-22 13:08:12 +01:00
component-test.js.es6 FIX: Fallback locale was not available for extra translations 2019-05-24 11:38:26 +02:00
create-pretender.js.es6 FEATURE: Quick access panels in user menu (#8073) 2019-09-09 11:03:57 -04:00
create-store.js.es6 FEATURE: Quick access panels in user menu (#8073) 2019-09-09 11:03:57 -04:00
d-editor-helper.js.es6 DEV: d-editor helper should be synchronous (#7706) 2019-06-05 14:52:38 +02:00
fixture-pretender.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
init-ember-qunit.js Split out common functions into `discourse-common` module 2016-09-22 09:52:19 -04:00
qunit-helpers.js.es6 FIX: Allow the clear callbacks to execute in acceptance tests 2019-06-14 13:29:13 -04:00
review-pretender.js.es6 REFACTOR: Replace score bonuses with low/med/high priorities 2019-05-23 11:54:45 -04:00
select-kit-helper.js.es6 DEV: refactors select-kit helper to prevent it to leak into global state (#7708) 2019-06-06 10:47:10 +02:00
site-settings.js FIX: Don't convert :) into Emoji when emojis or emoji shurtcuts are disabled 2019-05-22 11:44:39 +02:00
site.js.es6 FIX: Redirect users to top when `latest` is the homepage 2018-10-05 12:14:57 +01:00
store-pretender.js.es6 FEATURE: Claim Reviewables by Topic 2019-05-09 13:40:36 -04:00
textarea-selection-helper.js.es6 DEV: refactors textarea-selection helper to prevent leaking (#7709) 2019-06-05 19:20:46 +02:00
widget-test.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00