Commit Graph

11 Commits

Author SHA1 Message Date
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
Joffrey JAFFEUX 03a7d532cf
DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
Robin Ward 40eba8cd93 FEATURE: View flags grouped by topic 2017-09-25 12:25:14 -04:00
Robin Ward cc525b1a8d Upgrade QUnit to latest version 2017-06-15 10:12:07 -04:00
Robin Ward 151597bf0f Update code so Ember 2.3 can have more tests passing 2016-11-08 13:40:35 -05:00
Robin Ward be1d74d207 Split out common functions into `discourse-common` module 2016-09-22 09:52:19 -04:00
Robin Ward a546395397 REFACTOR: Migrate markdown functionality in ES6 2016-07-11 12:57:05 -04:00
Robin Ward b49e9fb174 FIX: Load order of `TopicTrackingState` was off 2015-09-21 14:15:25 -04:00
Robin Ward 8e776d0fd7 Move `TopicTrackingState` to injected object 2015-09-04 13:00:24 -04:00
Robin Ward d4a05825da Convert `Composer` to use Store
- Uses store for `PostStream`, `TopicList` too
2015-04-15 14:54:36 -04:00
Robin Ward ecb553af3f Add tests for our store 2015-03-06 12:37:24 -05:00