Summary: Trigger notifications for all network requests having an error status code.
Reviewed By: passy
Differential Revision: D10401402
fbshipit-source-id: 8fa63cbc251457142abd71845fb6f1c735b247cc
Summary:
We only want to persist certain reducers that are whitelisted.
Currently some parts of the `connections` reducer and everything from the other reducers was persisted. This changes the behavior to only persist what is explicitly whitelisted and not the other reducers.
These pars of the store are whitelisted:
- `connections.userPreferredDevice`
- `connections.userPreferredPlugin`
- `connections.userPreferredApp`
Reviewed By: jknoxville
Differential Revision: D10401403
fbshipit-source-id: e4aa4f2b2f8f6229b02dcf46798965fa1ae74df6
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:
- Set userPrefferedPlugin for external deeplink
- Listen for deeplink in renderer process and navigate accordingly
Reviewed By: passy
Differential Revision: D10339035
fbshipit-source-id: 4de6249a0672f9ce02b0dfb78a4563302c308578
Summary: This diff adds a basic setup of deeplink, with this diff whenever the link is entered in the browser the flipper app is opened and the corresponding.
Reviewed By: passy
Differential Revision: D10149797
fbshipit-source-id: ddff3d794aec66f9e878abcf4c81e87dfadca070
Summary: Apple seems to have changed the key for device availablility. We check for both now.
Reviewed By: jknoxville
Differential Revision: D10401073
fbshipit-source-id: 284a168a701eb2d5d9b3cbcac2aa6276ee1a2211
Summary: This is meant to reduce the friction of getting network response payloads. Simple switch allows developers to go to "formatted" body ui which shows the json in a text blob.
Reviewed By: passy
Differential Revision: D10378877
fbshipit-source-id: 87aeff5318f0c2c6d3d91d7e3b491595794e69bf
Summary:
It's still very much incomplete but this now exports
some of the top-level functions I'm about to use.
I'd love to just import f71ccd5db2/type-definitions/immutable.js.flow but this doesn't actually work as a module declaration because top-level type declarations are incompatible with it at the moment ... sigh.
Reviewed By: danielbuechele
Differential Revision: D10378353
fbshipit-source-id: 3023882b8bd38cf25d9a6c97905ff71548105775
Summary:
Add support for plugins to opt in to background for android.
This diff does the following
- Adds a method `runInBackground` in java interface of `FlipperPlugin`
- Make the network plugin opt in to run in background
Reviewed By: danielbuechele
Differential Revision: D10360033
fbshipit-source-id: b31c7550d00b760b7033c150232e3925b6272d24
Summary:
Moving from `arc` to `pastry` to create Pastes.
arc paste is deprecated and throws errors sometimes. Pastry seems to be the tool of choice now and has a nicer API anyways.
Reviewed By: passy
Differential Revision: D10302075
fbshipit-source-id: a846adf3768a2adf5c7ff73dc89b18c1e9169ac0
Summary: The minifier removed `debugger` statements from the plugins. We don't need to minify the plugins, because we don't care about bundle size, so we can just disable minification for plugins.
Reviewed By: alangenfeld
Differential Revision: D10334694
fbshipit-source-id: 0b3e23db107f960a3dbeb6a79aa24bacca41c230
Summary: Removing PortForwarderMacApp as it is not used anymore. Before it was used to allow us to debug physical iOS device. However, the support for physical iOS device was removed a while ago for security reasons. The PortForwarder was not in use anymore so it is safe to remove it.
Reviewed By: passy
Differential Revision: D10337888
fbshipit-source-id: 93f508ec524a0fc055141176c06d7e7169d83f16
Summary: As all device plugins are now moved to the plugins folder, this was the last thing in this folder. I am moving it out and putting it next to the core UI parts of the app.
Reviewed By: jknoxville
Differential Revision: D10337838
fbshipit-source-id: 6fa699c28e5df8a53719179fbb760f2a140bafc4
Summary:
Restore the logic for setting and computing notifications that was
partially removed with D10300838.
Reviewed By: jknoxville
Differential Revision: D10361547
fbshipit-source-id: 4d229d5f4dbeda3139463e1c348909b9c5dba66f
Summary:
Disallowing plugins from requiring anything but flipper or their own package broke lots of plugins at yarn start.
The ones that broke, require from the static directory.
Allowing them for now to unblock people.
Reviewed By: passy
Differential Revision: D10358733
fbshipit-source-id: 37077c806e022a6eb7ecf9bc95a455bf6f9a34d8
Summary:
I have a few details left, but its almost done. This PR addresses #145
- The NSUserDefaults plugin uses the SharedPreferences Desktop Part since we can reuse all of it.
- The NSUserDefaults plugin uses swizzling in order to be notified of what specific event changed at runtime.
- Added Test harness in both Sample Swift and Sample apps for iOS in order to test the plugin.
- Updated the documentation in `docs/shared-preferences-plugin.md` and` README.md`
I am open to suggestions since the desktop sharedPreferences version doesn't support deletion of preferences. Most likely I would have to modify the UI, and for that matter, I might as well build a user defaults desktop version
I wanted to add xiphirx in this MR since he developed the shared preferences plugin for Android and Desktop. I don't see a way to remove preferences from the flipper desktop app so I was wondering if you would be OK with me adding that.
Pull Request resolved: https://github.com/facebook/flipper/pull/291
Reviewed By: passy
Differential Revision: D10334685
Pulled By: priteshrnandgaonkar
fbshipit-source-id: d798c01a46df7ddecf713924799f046b560ea922
Summary: Put back deinit message and send deinit call even if the plugin is the background one
Reviewed By: danielbuechele
Differential Revision: D10300165
fbshipit-source-id: ef945282fe628e9196c21b5060a8e464e98bc94c
Summary: Handles the case when persisted state is undefined which will be the case when the initially selected plugin is not the one running in background
Reviewed By: danielbuechele
Differential Revision: D10269073
fbshipit-source-id: b7a17b0daa37a486cc7f456338cb97123ad813b7
Summary: implements `persistedStateReducer` for the network plugins to merge messages into the persistedState even when the plugin is not running.
Reviewed By: danielbuechele
Differential Revision: D10256311
fbshipit-source-id: 53011a2123342825e8404b1c2c798aeb550c596d
Summary:
Adds a new type of plugin: `FlipperBackgroundPlugin`
Background plugins are not torn down when the user switches to another plugin so they keep receiving messages in the background.
Background plugins need to use persistedState to keep their data. To handle the messages received in the background they need to implement a static method that merges a message with the current state from redux. The plugin doesn't need to call this method itself, it is called from `client.js`.
```static persistedStateReducer = (
persistedState: PersistedState,
data: Object,
): PersistedState
```
This method is used to handle messages in both foreground and background.
Reviewed By: danielbuechele
Differential Revision: D10256305
fbshipit-source-id: d86da9caa1b75178841a9a347eb427112141eaa3
Summary:
This diff sets up flipper for running plugins in background. This diff does the following
- Adds a function named `runInBackground` to the interface `FlipperPlugin` to make the plugins opt in to be run in background, default is false
- Changes the javascript side of the flipper to store the messages received by the plugins in background
- Process the stored messages when the plugin in background becomes active
- Currently I have just turned on network plugin to be in background mode.
- Remove the buffering from the network plugin, as it will run in background
- Write a batching layer to batch the messages and send to flipper.
Note: I haven't tested the wilde app yet, but the sample app works. I will remove the "[WIP]" from the title once I have tested it in wilde
Reviewed By: danielbuechele
Differential Revision: D10301403
fbshipit-source-id: 034eebf659a545d6b480a4ac1b73b0aa4b2f9797
Summary:
Plugins can not require files outside their folder, to make sure they don't pull in any dependencies from Flipper which are not exported by the main app.
However, those imports simply resolve to `undefined`. This diff adds a check in the babel-transform for plugins and throws an error if something from outside the plugin is required.
Reviewed By: passy
Differential Revision: D10297980
fbshipit-source-id: 1606f3211103281f9f4aa7bb2f3ca4d085d0ea1b
Summary: Make dylib plugin error message more user friendly by making the URL linkable.
Reviewed By: dshahidehpour
Differential Revision: D10304489
fbshipit-source-id: 3d5c0d8da426e1b5580d431f07b5291dad068ffc
Summary:
* move CPU and Logs plugin to plugins directory, set up package.json for them
* adjust plugins/index.js to expose device and client plugins in the same place, adding two new exports
Reviewed By: danielbuechele
Differential Revision: D10247606
fbshipit-source-id: 347bf8b3f9629987ad29d1d2ed025e0c88b9c967
Summary: Invert the way device plugin <-> device support works with the long term goal of supporting user defined device plugins
Reviewed By: danielbuechele
Differential Revision: D10240765
fbshipit-source-id: 9e886518a2fbfd263c79daa4b805c088ab38ab87
Summary: Adds a notification disapatcher to the redux store which triggers native notifications.
Reviewed By: jknoxville
Differential Revision: D10301490
fbshipit-source-id: d926d9a5378359ebb98a8b5816100f41db1e13e6
Summary:
- Adds the Flipper notifications UI from the hackweek
- The notifications plugin is hidden behind a GK `flipper_notifications`
- Plugins currently can not dispatch any notifications
Reviewed By: jknoxville, passy
Differential Revision: D10300838
fbshipit-source-id: 2a3a823f09fee3370ce725b506b162e57751c382
Summary:
Set up hand-crafted flow type for it and add it to the offline-mirror.
Using the v4 pre-release as v3 apparently has even more effed up Flow support.
Reviewed By: danielbuechele
Differential Revision: D10258117
fbshipit-source-id: 9f6fcea152308696f34645cc99ba41b496dc5385
Summary:
If installation fails, we should exit with an error code and not just a
message. This should help narrow down the CI failures, too.
Pull Request resolved: https://github.com/facebook/flipper/pull/292
Reviewed By: danielbuechele
Differential Revision: D10255759
Pulled By: passy
fbshipit-source-id: a6b033deadf11069e6c5665870a811ae2d0ec5ef
Summary: Also acts as a model for using the computeNotifications api.
Reviewed By: passy
Differential Revision: D10240659
fbshipit-source-id: 610512de7484e10c9c0ed8e661913c2fe10869da
Summary:
Method `computeNotifications` added to the base plugin class.
Plugins should implement this to define a mapping from their state+props to the notifications they are emitting.
I've plugged this into componentDidUpdate, because we don't yet have the background plugin infra. When we do, we'll want some other incoming data hook to use so it's not tied to the react component rendering.
Example usage added to network plugin in the next commit.
Reviewed By: passy
Differential Revision: D10127875
fbshipit-source-id: efd4d8cfc0d3d33852a6cf9a290549a5f90d389d
Summary:
Yesterday I made a change that switches from hardcoded IP address 10.0.2.2, to localhost for emulators on Android 5+.
This didn't work with flipper because it relies on port forwarding, and port forwarding was only done for physical devices, not emulators.
This corrects that, by port forwarding whenever possible. This will enable using localhost, which simplifies remote adb connection support.
Reviewed By: danielbuechele
Differential Revision: D10255554
fbshipit-source-id: 77a05eddf530e0e9495568f2a0901f390464345a
Summary: Now that we have a node test in place, let's run this.
Reviewed By: danielbuechele
Differential Revision: D10217534
fbshipit-source-id: cf3debaf15b80d75234b67e4a78f6343c0fce50a
Summary:
It's not super useful, to be honest, but it's to have one
open source `.node.js` test in place so `yarn test` doesn't
error out.
Reviewed By: danielbuechele
Differential Revision: D10217530
fbshipit-source-id: c0e17e48782174b856ef6d5fe94c5c042564e4f5
Summary:
Original commit changeset: e53aa6ad10ac
This original change relies on adb reverse being run on emulators, which isn't happening. I didn't pick it up during tests because a previous build of flipper had done it.
Reverting the change. Will fix adb reverse and then re apply it later.
Reviewed By: priteshrnandgaonkar
Differential Revision: D10241728
fbshipit-source-id: 521c18c5a0eb45f3af0fe510defd9116b9bb0626
Summary: On emulators and devices that support adb reverse, using localhost will always work, whereas "10.0.2.2" won't work for networked adb connections.
Reviewed By: passy
Differential Revision: D10231163
fbshipit-source-id: e53aa6ad10ac4964431694c48e7148add69487fb
Summary: Pretty sure this was meant to get removed before open sourcing, it isn't referenced anywhere.
Reviewed By: danielbuechele
Differential Revision: D10202081
fbshipit-source-id: 23d213b3a041acad85eb723d32b65f7da276003d
Summary:
The buck install command fails when xcode_dmg is used in sandcastle hosts, meaning xcode is mounted somewhere other than /Applications.
Skip the connection test for now. I'll get oneworld working with it instead.
Reviewed By: passy
Differential Revision: D10231097
fbshipit-source-id: 16e320070f8b3fd4f56ff919bdd3ec47355e342c