Summary: This diff fixes the improper plugin id getting assigned to the variable which lead to notifications not getting shown. The client id has `#` so pluginId is no longer the second argument when one splits the string by `#`. This diff fixes this problem.
Reviewed By: passy
Differential Revision: D13176776
fbshipit-source-id: cd5bdc33c61485e3cdc2f2dbcc615980c39c8b8c
Summary:
Plugins were loaded in `/plugins/index.js` which was loaded once at launch of the app. This moves the list of available plugins to redux. This way, plugins can be dynamically added. The redux store keeps to Maps of plugins (devicePlugins and clientPlugins) with their ID as key:
```
devicePlugins: Map<string, Class<FlipperDevicePlugin<>>>,
clientPlugins: Map<string, Class<FlipperPlugin<>>>,
```
On launch of the app, all plugins bundled with the app and the one found in `pluginsPath` are dynamically added.
This changes now allows to add new plugins at any time. All components that need to know which plugins are available (e.g. the sidebar) are connected to the redux store. This way, they will automatically update, whenever a new plugin is added.
- add `plugins` to the redux store to keep the list of available plugins
- add a plugins dispatcher, responsible for loading the plugins on launch
- connecting all React components that imported `plugins/index.js` before to the redux store to get the plugins from there.
- moved the updating of the MenuBar to the plugins dispatcher as it needs to update whenever a new plugin is added.
Reviewed By: jknoxville, passy
Differential Revision: D12449236
fbshipit-source-id: 6ef3e243e2c80443614b901ccbfde485fcb4301c
Summary:
Allows filtering notification by category. Category filters are also persisted in redux.
Adds a test suite for notification reducer
Reviewed By: passy
Differential Revision: D12999884
fbshipit-source-id: 5f8d2357e52f091c17b726e1f89ed68f3b7294fb
Summary: This diff adds action buttons to the notifications. Notifications with actions can only be sent from the main process. This is why we need to send a message to the main process which then shows the notification. The action callbacks are sent back to the renderer process to handle the action and log the event.
Reviewed By: passy
Differential Revision: D12999886
fbshipit-source-id: b415fded3172582fad11d88cabf0cfc5b3b8d4f9
Summary: Clicking on a notifications links to the Notification Hub highlighting the selected notification.
Reviewed By: jknoxville
Differential Revision: D10487822
fbshipit-source-id: ed907ec244bef970d1b30ddb719856949229d0c4
Summary: Adding a GK to be able to disable notifications remotely.
Reviewed By: passy
Differential Revision: D10467036
fbshipit-source-id: ee555bd73cb5c58d1113e28fe88fe605480865cf
Summary:
Adding a static method plugins can implement to trigger notifications:
```
static getActiveNotifications: ?(persistedState: P) => Array<Notification>;
```
When the plugin's persisted state changes, this API is called from the `notification`-dispatcher which updates the notifications store.
Reviewed By: passy
Differential Revision: D10378434
fbshipit-source-id: 778fe3ad4229b03bd5ba14ebfdafa5020c25f34f
Summary: Adds a notification disapatcher to the redux store which triggers native notifications.
Reviewed By: jknoxville
Differential Revision: D10301490
fbshipit-source-id: d926d9a5378359ebb98a8b5816100f41db1e13e6