Summary:
This masks this fact that `mConnection` must be `non-null` for
very little convenience in return. Let's keep this explicit.
Reviewed By: danielbuechele
Differential Revision: D10505205
fbshipit-source-id: d8187cc8e79d4508babe281ff88b3ba75c0baa1f
Summary:
Let's the notification render any React node.
Particularly useful when including links or wanting to
format messages.
Reviewed By: jknoxville
Differential Revision: D10488157
fbshipit-source-id: 06d3c6b4477c78e8bef78e3a3dc0e05bc67a2ef4
Summary:
Gets a oneworld device (just android for now), installs an app. Checks it connects and stays connected for 5s.
The app installed is in an array, we just need to add more targets for further tests.
Reviewed By: danielbuechele
Differential Revision: D10231083
fbshipit-source-id: c33fb091c1b7914a33690398a79fd700c445c06c
Summary:
I feel like doing async stuff here isn't a good idea in general.
But more pressingly, it means you can't immediately call server.close() after new Server(), because the things to close haven't been created yet.
Reviewed By: danielbuechele
Differential Revision: D10488301
fbshipit-source-id: 76ebe91e0c09f353e0bdb9f2e4116757e757abb2
Summary:
We were using `fill={true}` as an attribute to make flexbox containers fill the entire available space.
However, `fill` is an HTML attribute (see: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill) This caused warnings printed to the console.
This diff renames the attribute to `grow` with is also more in line with the Flexbox terminology.
Reviewed By: priteshrnandgaonkar
Differential Revision: D10488389
fbshipit-source-id: ed8553c6203cdf6df94d26c731164ecec4c9fbd2
Summary:
I tried switching Flipper to use the node.js module: https://nodejs.org/api/perf_hooks.html instead of electrons window.performance. But the module couldn't be found.
So instead, I'm just replacing it in the pure node tests.
This means tests without node can work without issues.
Reviewed By: danielbuechele
Differential Revision: D10302114
fbshipit-source-id: b3b8aa5fb350a8246fcdfc2a80cc72daec2448d7
Summary:
The idea behind this is to enable tests running in pure node, without electron, because electron requires display drivers and complicated things.
I've been lazy and only added the bare minimum electron api's for the connection test to pass.
It would be awesome to auto generate it properly.
Reviewed By: danielbuechele
Differential Revision: D10238132
fbshipit-source-id: d4a2da2baf5f8964184b532a581c3a75ee33ef06
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: React has a built in API for computing the state from props called `getDerivedStateFromProps`. So let's use this instead of our custom implementation.
Reviewed By: jknoxville
Differential Revision: D10484213
fbshipit-source-id: 4c434c5252dabfc2f6015cb6a50719b985c60446
Summary:
Allow linking from one plugin to another. Adds a prop `selectPlugin` to the plugin that can be passed a pluginID and an optional `deepLinkPayload`.
The return value tells you if switching the plugin was successful.
```
selectPlugin: (pluginID: string, deepLinkPayload: ?string) => boolean,
```
Reviewed By: passy
Differential Revision: D10483925
fbshipit-source-id: 6f821277150b2db185b7d545c310214a11432eac
Summary:
This will make sure your local pods repo is up to date, so you won't be building against old dependencies.
Pull Request resolved: https://github.com/facebook/flipper/pull/296
Reviewed By: passy
Differential Revision: D10446899
Pulled By: jknoxville
fbshipit-source-id: 61c8832e8d5f7c54a43fc3e419347687756f4883
Summary:
Start adding Nullable and finals in some places to
make our sample app (and hopefully rest of the codebase) follow
some of the standards we have in place elsewhere.
Reviewed By: jknoxville
Differential Revision: D10463816
fbshipit-source-id: 7df6758919331ba8a334c94214b9e02bbab8cd2d
Summary: Adding a GK to be able to disable notifications remotely.
Reviewed By: passy
Differential Revision: D10467036
fbshipit-source-id: ee555bd73cb5c58d1113e28fe88fe605480865cf
Summary:
The start of an example plugin.
My intention is for this to be a place that we keep up to date with the current best practice for doing things.
For example, with the introduction on persistedStateReducer, there are two ways to receive incoming messages, but only one of them works in the background. This should act as a guideline.
For this reason, don't hold back on reviewing it. I want it to be 👌
Reviewed By: priteshrnandgaonkar
Differential Revision: D10448592
fbshipit-source-id: d5fa978c14e47a7fa3c9a29d0929d5a6109267af
Summary: Deep link from the QPL plugin into the network plugin
Reviewed By: passy
Differential Revision: D10462528
fbshipit-source-id: cc044863191fc4375390165f6b7b7d5c5e9c77e3
Summary: Makes QPL iOS plugin to work in background
Reviewed By: jknoxville
Differential Revision: D10446049
fbshipit-source-id: 02ad6f6f83b13e326b6fdd8aa972fa7d29c76eb9
Summary:
When a client disconnects, we want to remove all plugins states for this client, so the next time the client reconnects the plugins start with an empty state.
The main use case for this is when recompiling the app and launching it in the simulator, we don't want to show old network-requests or QPL events.
Reviewed By: passy
Differential Revision: D10447808
fbshipit-source-id: 5fb3f24ee37f564e8dc00315bff86a2bcd5f65f2
Summary: adding a `static defaultPersistedState` which plugins can use to populate their persistedState for the first render.
Reviewed By: passy
Differential Revision: D10446987
fbshipit-source-id: eb37553db7bbec31edf5b4972176e71f303639fe
Summary:
When sending a message from the mobile side, you call something like:
`send(method: string, params: Object)`
But when receiving it in the reducer, you only get the params. Adding method so you can distinguish them.
Reviewed By: passy
Differential Revision: D10447890
fbshipit-source-id: f1fe925e82355866f86b322ecd3c72c604ae86af
Summary:
Just to stay up-to-date. No breaking changes affecting us:
https://github.com/facebook/metro/releases/tag/v0.48.0
Also bumping babel-generator to be in line with the others.
Reviewed By: danielbuechele
Differential Revision: D10446300
fbshipit-source-id: b373bc6b1e6e53f2f760730679d1667928002e5f
Summary:
Metro's new version using `jest-haste-map` wants to access files inside our ASAR bundle, not using electron's require function. This fails, because it can not read from inside the ASAR bundle. For this reason we are disabeling ASAR for now.
Additionally, we are disabling reloads when a hidden file changes. This is because watchman creates a `.watchman-cookie` which shoudln't triggers a reload. But in general I think it's safe to not reload when hidden files are changed, as they are unlikely to have actual code in them.
Reviewed By: passy
Differential Revision: D10426715
fbshipit-source-id: 6ad9dcf88c62d5b65a9736eff28aadaf89c6af7a
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