Summary:
Upgrading to flow 0.91, fixing a bunch of `$FloxFixMe`s that were introduced by upgrading to 0.86.
Also fixing some linting issues.
Reviewed By: priteshrnandgaonkar
Differential Revision: D13900794
fbshipit-source-id: 5d0a1b62371f3b5d34b909bae0876583acb6f977
Summary:
Adding `headless/index.js` This is the entry point to the headless version of Flipper.
This creates a redux store, and initializes the dispatchers. As all business logic (adb connections, etc.) are managed by dispatchers, this spins up a working version of Flipper, listening on our ports, allowing connections to devices.
For APIs not available in node.js, we are adding polyfills. `WebSocket` is used by redux-devtools, `fetch` is used in a couple of places throughout the application. These polyfills are added to the global namespace, so the app can run the same as in the browser.
Reviewed By: passy
Differential Revision: D13786573
fbshipit-source-id: 685f67e1c0d2948de7c43b8a1e2dc10dc69aa743
Summary: Remove `$Subtype` and `$Supertype` utilities. Replacement was done on a best-effort basis. In many cases it sufficed to replace `$Supertype<T>` and `$Subtype<T>` with `T`, but when this was not possible `any | T` and `any & T` were used instead.
Reviewed By: jbrown215
Differential Revision: D13624765
fbshipit-source-id: 82ee9d43cfc318ed4bd2d84e0f4c5c1d8f488a9c
Summary:
I've left InteractionTracker without a store, so it doesn't know the sessionId. It really should have one, but that will have to be a different change.
We don't actually use the InteractionTracker at the moment so it's not a major deal for now.
The idea is to be able to get data like what percentage of sessions encounter an error, and how many errors sessions usually have etc.
Reviewed By: passy
Differential Revision: D13624031
fbshipit-source-id: 664e7ac5023166c2f72df3058c219901be7ff77a
Summary:
The Android SDK installation on Linux is really dumb. The emulator binary
is dynamically linked and ships with some `.so`s that need to be either in `LD_LIBRARY_PATH` or `$CWD`.
For some reason, there's no script, so you have to manually `cd` into the directory in order to
run it. ¯\_(ツ)_/¯
Reviewed By: jknoxville
Differential Revision: D13589660
fbshipit-source-id: e3bdd7468108f1fb1e52f23ae45e21cacc5480f9
Summary:
Redesigns the bug reporting dialog:
- show information from `package.json`'s `bugs` field, where we can link to support groups or name oncalls.
- adds show/hide animation
- uses new button style
Reviewed By: jknoxville
Differential Revision: D13417287
fbshipit-source-id: 2948794e9b1f42bbd895981d5e4b0578a9b8ee2e
Summary:
Adding the JS part for the ComponentTree plugin.
Native parts are added in D13377058.
Reviewed By: priteshrnandgaonkar
Differential Revision: D13377066
fbshipit-source-id: dab8f2abdde604c3f78cfd80e17b433ef5e33505
Summary:
Updating react-devtools plugin to the latest version.
As Flipper doesn't use a websocket anymore, this plugin was not working. In this diff, we are creating a websocket connection parallel to the rSocket connection which is used by the devtools. First we thought about tunneling the websocket through our rSocket, but this would be a lot more work.
By default they create a web-socket running on port 8097. But if this port is in use another port is used. The hostname and port to connect to is sent to the client-plugin.
Reviewed By: jknoxville
Differential Revision: D12897150
fbshipit-source-id: 6652b3c91fd5bd87fe86b29c730c8b2076bbc6ba
Summary: Retry up to 5 times with exponential backoff.
Reviewed By: passy
Differential Revision: D13138244
fbshipit-source-id: 94c68b87aa281cfc3239b0bb8bdd75a2e0d7edc7
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:
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:
Adds a test runner for jest test and adds three simple test cases:
- render the app
- start a server
- client connecting to the app
Test can be run using `yarn test`.
To make the test runner work, some changes needed to be made:
- remove the export of `init()` from `'flipper'`, because it was a cyclic dependency
- updating Button.js to the new ref-API
Reviewed By: jknoxville
Differential Revision: D10027078
fbshipit-source-id: 49107b0dd4dec666b92ecd841422fe7e6b3a7756
Summary: Makes the code a bit cleaner and maintainable.
Reviewed By: passy
Differential Revision: D9496316
fbshipit-source-id: a59a41b12a57bb2eedc25b154c6f9b0cdc77dd8a
Summary:
My benchmarks have shown react-emotion to be faster than the current implementation of `styled`. For this reason, I am converting all styling to [emotion](https://emotion.sh).
Benchmark results:
{F136839093}
The syntax is very similar between the two libraries. The main difference is that emotion only allows a single function for the whole style attribute, whereas the old implementation had functions for every style-attirbute.
Before:
```
{
color: props => props.color,
fontSize: props => props.size,
}
```
After:
```
props => ({
color: props.color,
fontSize: props.size,
})
```
Reviewed By: jknoxville
Differential Revision: D9479893
fbshipit-source-id: 2c39e4618f7e52ceacb67bbec8ae26114025723f
Summary:
When changing the props of a table often, this might results in a lot of unnecessary rerenders. This could be mostly seen in the analytics plugin, which is sending a lot of messages in a short time.
The update of the table component is now debounced to only re-render every 150ms. This also affects searching and filtering and makes typing in the search input smoother.
Reviewed By: passy
Differential Revision: D9447722
fbshipit-source-id: 00e092e4e047e9c40e5a1ec2789644858acc18dd
Summary:
Tables were using a custom virtualization, which wasn't as performant as other solutions out there. In this diff, the table component is reworked for performance.
- removes `Table` component, because it was never used standalone, `ManagedTable` is what all plugins used
- uses `react-window` for `ManagedTable`
- reworks table highlighting and arrow-navigation to work with the new virtualization
- moves actual filtering out of `ManagedTable` into `Searchable` component for a better separation of concerns.
Reviewed By: jknoxville
Differential Revision: D9447721
fbshipit-source-id: 15eb2eb55eed9f49a0cb1ccfb2d748b3672fa898
Summary:
[Step 1 of a protocol change between desktop app and flipper agent]
The flipper agent periodically tries to connect.
When it doesn't have the required certs, instead of trying to connect, it requests them from the desktop.
After requesting, it just continues the loop, trying to request.
The problem with that is
a) the desktop can take longer than one cycle to generate and provide the certs, meaning the agent will make overlapping requests, causing confusion and it to take longer than necessary.
b) the desktop can take less time than a retry cycle, but the agent will still wait before trying to connect.
Fixing a) by making the agent wait for a response from the desktop before continuing attempting to reconnect.
This means on the next connection attempt, it's guaranteed that the desktop is finished processing the CSR.
b) remains unfixed for now, but can be dealt with separately.
This is step 1 which adds an extra responder to the desktop app. It won't change anything until the agent starts
sending requestResponse messages instead of fireAndForgets. The plan is to leave this in place for a while to give users time to update, after that, we'll roll out the change to the agent.
Reviewed By: passy
Differential Revision: D9179392
fbshipit-source-id: 9a8021253dcd28c15cceeec23630a67aec219fd5
Summary: Adding a flowtype library definition for electron 3 and fixing related type errors
Reviewed By: passy
Differential Revision: D9124758
fbshipit-source-id: e09cb5b05ba952e7f95f68f9043edc586f81ae83
Summary: The selected device, app and plugin are not persisted over a reload using `redux-persist`.
Reviewed By: jknoxville
Differential Revision: D8836481
fbshipit-source-id: 3ace1a950a200255d5daf77791d706ede0ff2138
Summary: electro-builder automatically publishes when it detects builds on TravisCI. This disables this behaviour, as we want to manually publish releases.
Reviewed By: jknoxville
Differential Revision: D8783066
fbshipit-source-id: d8723c87b879b3ef7ee02585997a13cb55095e65