Commit Graph

11 Commits

Author SHA1 Message Date
Michel Weststrate
08b5644253 Killed Flipper headless
Reviewed By: nikoant

Differential Revision: D24160480

fbshipit-source-id: 221e60473dddc0a49cea674e210beb6f85b1b03c
2020-12-15 01:46:44 -08:00
Chaiwat Ekkaewnumchai
21ad9ad433 Rename Notification Blacklist to Blocklist
Summary: per title

Reviewed By: mweststrate

Differential Revision: D25021786

fbshipit-source-id: 444e0959b5a4157171dad5c81b102abf105a99ed
2020-11-30 02:12:45 -08:00
Michel Weststrate
685cc09b3b DeviceLogs plugin to Sandy
Summary:
Converted the DeviceLogs plugin to sandy.

Kept logic and UI the same (so same batching, localstorage mechanisms etc). But used sandy api's for log subscribing, state, and separating the logical part of the component from the UI.

Note that some mechanisms work slightly different, like deeplinking and scrollToBottom handling, to reflect the fact that plugins are now long lived

Reviewed By: jknoxville

Differential Revision: D22845466

fbshipit-source-id: 7c98b2ddd9121dc730768ee1bece7e71bb5bec16
2020-08-20 13:32:47 -07:00
Anton Nikolaev
3e87715a8f Restart button added to plugin update notifications
Summary:
Simple implementation of restart button on auto-update notifications. Should make the flow a bit more convenient.

Changelog: Added button "Restart Flipper" to plugin auto-update notifications.

Reviewed By: passy

Differential Revision: D22528729

fbshipit-source-id: 6da6b858baed1e0f3cae57f1a614907b61899d10
2020-07-15 02:53:33 -07:00
Michel Weststrate
04a29315e2 Remove instanceof checks
Summary: Replaced `instanceof` checks with `isSandyPlugin` utility. That is cleaner to read and makes it easier to find places where we make exceptions for Sandy plugins

Reviewed By: jknoxville

Differential Revision: D22206707

fbshipit-source-id: b44a1b585424f3b9bf0d7ce200c34107f03ed55e
2020-07-01 09:12:35 -07:00
Michel Weststrate
1029a6c97c Introduce types for Sandy plugins through code base
Summary:
So far there were 2 types of plugins: `FlipperPlugin` and `FlipperDevicePlugin`. This introduces a third kind: `SandyPluginDefinition`.

Unlike with the old plugins, the export of the module is not directly exposed as the plugin definition. Rather, we use class `SandyPluginDefinition` (instance) that holds a loaded definition and its meta data separately (`PluginDetails`). This means that we don't have to mix in and mutate loaded definitions, and that for unit tests we can avoid needing to provide a bunch of meta data. This also prevents a bunch of meta data existing on two places: on the loaded classes as static fields, and in the meta data field of the loaded class as well. Finally, we can now freely extends the `PluginDetails` interface in flipper, without needing to store it on the loaded classes and we are sure that no naming conflicts are caused by this in the future.

For compatibility with the existing code base, common fields are delegated from the `SandyPluginDefinition` class to the meta data.

Also cleaned up types around plugins a little bit and removed some unnecessary casts.

For all features that reason about plugins in general (such as exports), sandy plugins are ignored for now.

`SandyPluginInstance` is worked out in further diffs

The `instanceof` calls are replaced by a utility function in later diffs.

{F241363645}

Reviewed By: jknoxville

Differential Revision: D22091432

fbshipit-source-id: 3aa6b12fda5925268913779f3c3c9e84494438f8
2020-07-01 09:12:35 -07:00
Anton Nikolaev
96645a21b1 Fixed silent error on notification side-effect
Summary: Fixed silent error on showing deprecated format notification

Reviewed By: jknoxville

Differential Revision: D22066427

fbshipit-source-id: ae721aaa45e111df3cf8d8344554efac54b6d2ec
2020-06-16 05:31:09 -07:00
Michel Weststrate
8fa4b5ccb2 Update existing subscriptions to use sideEffect
Summary: See previous two diffs, this applies the abstraction to our code base

Reviewed By: passy

Differential Revision: D20679687

fbshipit-source-id: 05e340dca3f832971783a844a78d1ffd553ff9d2
2020-03-27 04:42:12 -07:00
Pascal Hartig
fc9ed65762 prettier 2
Summary:
Quick notes:

- This looks worse than it is. It adds mandatory parentheses to single argument lambdas. Lots of outrage on Twitter about it, personally I'm {emoji:1f937_200d_2642} about it.
- Space before function, e.g. `a = function ()` is now enforced. I like this because both were fine before.
- I added `eslint-config-prettier` to the config because otherwise a ton of rules conflict with eslint itself.

Close https://github.com/facebook/flipper/pull/915

Reviewed By: jknoxville

Differential Revision: D20594929

fbshipit-source-id: ca1c65376b90e009550dd6d1f4e0831d32cbff03
2020-03-24 09:38:11 -07:00
Michel Weststrate
0a8d8f44ff Make sure notication computation can't crash the dispatch
Summary:
Collecting notifications is done in the store.subscribe. If this throws however, the entire original dispatch throws (really Redux?!). So added a try catch around collecting notifications. This stops plugins from crashing while processing the queue (in fact this could happen during any Redux dispatch).

Will look into a more robust mechanism in the future

I suspect this also fixes the hanging graphQL issue

Reviewed By: jknoxville

Differential Revision: D20619226

fbshipit-source-id: 2f6b8e13a5c884dd63b6963d317474a2abf0725c
2020-03-24 06:45:46 -07:00
Anton Nikolaev
863f89351e Yarn workspaces
Summary:
1) moved "sonar/desktop/src" to "sonar/desktop/app/src", so "app" is now a separate package containing the core Flipper app code
2) Configured yarn workspaces with the root in "sonar/desktop": app, static, pkg, doctor, headless-tests. Plugins are not included for now, I plan to do this later.

Reviewed By: jknoxville

Differential Revision: D20535782

fbshipit-source-id: 600b2301960f37c7d72166e0d04eba462bec9fc1
2020-03-20 13:37:41 -07:00