Summary:
Install plugins to pending directory first to enable installing new versions of existing plugins. On startup Flipper moves all the plugins from pending directory into installed plugins directory.
Auto-update, after downloading a plugin package, will also extract it to "pending", so after restart update will automatically be applied.
Reviewed By: mweststrate
Differential Revision: D21929713
fbshipit-source-id: 141b106415e941156ae598cf810ab3bed8c76ced
Summary:
See previous diffs, same change as with analytics, don't stringify when creating the rows, but rather provide a closure to do that lazily, which reduces CPU (and mem) usage.
Note that this implicitly assumes the captures variables are immutable, as otherwise the semantics would change. But than again, if those variables are changed in the future, copyText will reflect their latest rather than initial state, which is better anyway.
Reviewed By: nikoant
Differential Revision: D21931748
fbshipit-source-id: 62325dd25953bab3a4e2e9a0d5dea3b3a7787bae
Summary:
`copyText` is generated when building rows for table, and is typically filled by JSON stringifying the incoming data. That is a pretty expensive process that could be done lazily. As shown in later diffs, this reduces the generation of rows for tables from ~18ms to ~3ms, which makes rendering a lot smoother.
(n.b. fixing the code duplication in the managedtables is part of the component lib plan)
Reviewed By: passy
Differential Revision: D21929660
fbshipit-source-id: 67cc69945e2bb28a6462a9d9ab765e33ced89378
Summary:
If the analytics plugin was in the foreground, and messages arrived in quick succession, some messages would not be processed.
Although the code was tested, there were not enough assertions to make sure the loop was correct. coverage !== correctness {emoji:1f605}
This fixes T68101450
Changelog: Fixed regression where analytics messages where lost
Reviewed By: jknoxville
Differential Revision: D21929679
fbshipit-source-id: c9fe2b18a249e40085d99914a809abf14fa7cf8f
Summary:
When trying to profile the Electron app, since recently the profiler hangs when trying to start the initializer. Found the following weird message in the console and googled the problem :-P
{F239554230}
Reviewed By: jknoxville
Differential Revision: D21929677
fbshipit-source-id: 7a9f150ebc8df30fa2890c9dbb79c8c144a5feae
Summary: Use interface PluginDetails everywhere where plugins are handled and removed PluginDefinition type which was effectively a subset of PluginDetails
Reviewed By: mweststrate
Differential Revision: D21927456
fbshipit-source-id: 434ebeef955b922cc11757e78fbba8dec05f1060
Summary: Moved plugin installation utilities to "plugin-lib" module. There are no functional changes in this diff, just refactoring so that plugin installation utils can be re-used by different modules.
Reviewed By: passy
Differential Revision: D21927387
fbshipit-source-id: 340516a544f7cfdcc15d94660dcb74a012054531
Summary:
I noticed that Android device detection is _much_ faster than iOS, so I tried to optimize it a bit
1. Removed a test run on `instruments -s`. That command is really slow (easily 5 secs), and the check has become redundant since Doctor already does a similar check
2. When querying for devices, it tries to fetch emulated and physical devices in parallel, but only processes the results after both have finished. However, finding simulators is almost instant, while querying the physical devices takes ~5 seconds ore more. So in this diff we process the found devices till in parallel, rather than waiting until both have arrived
This diff reduces the time until the ios simulator + FB app is detected from 28 to 4 seconds on my machine.
Changelog: Improved the startup sequence for emulated iOS devices, so that devices and apps connect a lot faster after starting Flipper
Reviewed By: jknoxville
Differential Revision: D21907597
fbshipit-source-id: 73edf0b04c4ad8367e04557e33f4c0d9e9bcd710
Summary:
See previous diff, let's store the collapsed state of sidebar sections in local storage.
Introduced a reusable hook to take care of that.
Changelog: Device plugins are now expanded by default, and the expand / collapse state will now be remembered across restarts
Reviewed By: passy
Differential Revision: D21903394
fbshipit-source-id: a3c0231acc0aa0877522ec328eedd09cb11aedb1
Summary: Heard several reports that expanding device plugins by default would be preferred
Differential Revision: D21881338
fbshipit-source-id: 9f7444a4282684e4e0f046cf6a6679181ec55e73
Summary: Download updated plugins in background. This is implemented by periodical polling of Marketplace GraphQL API (interval 5 min by default). The feature is under GK flipper_plugin_auto_update, so for now it is enabled only for me.
Reviewed By: mweststrate
Differential Revision: D21863057
fbshipit-source-id: 51d8223ad4b2a928f7571ea480c10ba2efd9935d
Summary:
The last piece of the puzzle to get this working.
Now if a user has iOS development enabled in Flipper settings, and has XCode installed, we'll run the PortForwardingMacApp processes required to interact with iOS devices.
It's not great the way it starts the processes without any error checking, but since that's the way it currently works, I'm leaving it as it is for now.
Reviewed By: mweststrate
Differential Revision: D21881041
fbshipit-source-id: 1d1fdb7e0621cff88408bb707d768bb5c6bea0cc
Summary:
Part of https://github.com/facebook/flipper/issues/262
Use the user-configured idb install location instead of a hardcoded one.
Reviewed By: passy
Differential Revision: D21860236
fbshipit-source-id: 5c604d7b6361e7c93ab49d8a03a437dfce880ac1
Summary:
Part of https://github.com/facebook/flipper/issues/262
The default is the location on facebook computers, to avoid breaking it for existing users.
Reviewed By: passy
Differential Revision: D21860237
fbshipit-source-id: f4adfba0c63f7bb10751effb012dda734c455bee
Summary:
By default Node.JS has its internal certificate storage and doesn't use the system store. Because of this, it's impossible to access ondemand / devserver which are signed using some internal self-issued FB certificates. These internal certificates are automatically installed to MacOS system store on FB machines, so here we're using "mac-ca" library to load them into Node.JS when Flipper is running in dev mode.
For production version of Flipper we don't need to do this, because production certs are issued by DigiCert which is already trusted by node.js.
Reviewed By: passy
Differential Revision: D21862620
fbshipit-source-id: f7276e255fae1c208cb68af6632a303661af883e
Summary: Load either installed or bundled version of plugin depending on which is newer.
Reviewed By: mweststrate
Differential Revision: D21858965
fbshipit-source-id: aa46eafe0b5137134fadad827749672441f2c9e5
Summary:
See previous diff.
Achieves the same optimization as in the mentioned diff, but this time by only debouncing the messages as they arrive over the socket, and not the state updates caused by Redux directly. This means that plugin rendering won't be debounced anymore until we address this more fundamentally.
With this change there is a double level buffering:
1. A buffer that stores all incoming messages (that are not replies to requests)
2. A buffer that stores messages we are interested in in the plugin queue, unless the plugin is active (this we already had).
This still fixes the issue that too chatty plugins cause to many updates foreground plugin (the problem we tried to fix originally), without debouncing plugin rendering if it is needed to update for any other reason.
Another nice benefit is that previously every received message would trigger a store update in Redux which would cause all connected components to evaluate their subscriptions (and then bail out in the typical case). Now we will only update the redux store every 200 ms.
Changelog: Foreground plugins will burn less CPU when they're very chatty
Reviewed By: jknoxville
Differential Revision: D21858849
fbshipit-source-id: c72352e569a8a803bbedffb71b17b11fcefee043
Summary:
This change kinda reverts D21690494, which broke the layout plugin.
The layout plugin broken because it's implementation assumes that if `this.props.setPersisted` state is called, those changes are immediately reflected in `this.props.persistedState`. For that to work it means that a render needs to be triggered immediately and synchronously by React.
That is a troublesome assumption (React doesn't actually guarantee this) and very likely to break in the future if implementation details change in React or Redux. However, since this is an assumption here, probably more plugins rely on that behavior, so this diff reverts that change. I'll add it the the component library plan to fundamentally address this.
The next diff will re-introduce debouncing, just at a different code point.
Reviewed By: jknoxville
Differential Revision: D21840282
fbshipit-source-id: af69dbded80aa73dfd6558d7cb0268ea0b1c504a
Summary:
I just noticed that the deeplink of the support form didn't select the right group. It got broken after the recent design change of the support form. This diff fixes that issue.
I have also added unit tests.
Reviewed By: passy
Differential Revision: D21817153
fbshipit-source-id: 06298b3b60cfc1bd77bea6c1f902b983474808dc
Summary:
- Add value for null type to use `.value` easier
- Add value to string by directly converting to string if possible; otherwise null
Reviewed By: jknoxville
Differential Revision: D21788242
fbshipit-source-id: f3a9f995de6b4cb1b304981c8adaaba70105c988
Summary:
I've outlined the tasks required to get iOS device support working for open source users [here](https://github.com/facebook/flipper/issues/262).
This is the first step. It publishes the same code we use internally to GitHub, but in a state where it is only "available" for non-public builds. This will not change any behavior, but means that together with the community, we can start adapting it to suit everyone, and then eventually flip "available" to true for everyone.
Reviewed By: passy
Differential Revision: D21740193
fbshipit-source-id: 586c79ad850f67da330c10a007605ff25a187544
Summary:
Update the UX of the mobilebuild download. When one clicks download one can see the the installation in progress in the main screen. Once its downloaded, you can open the finder pointed to the folder of download.
I didn't write the test for InstallSection as I was not able to test it through react-testing library. Seems like the data gets added to the document little late and not instantly.
Next work:
- Search in sidebar
- Persist downloaded app data for a session
- Show download data in the form of progress bar.
Reviewed By: mweststrate
Differential Revision: D21709229
fbshipit-source-id: e67db68ff16155230becf86c913dc6b1ec9d482c
Summary: This diff enables the babel transformer for emotion. It is supposed to be a bit faster, but the most interesting thing is that it will show component names inside the dom tree, which, at least for me, will be a huge performance booster is it will make it much easier to find out to which component style changes need to be applied
Reviewed By: nikoant
Differential Revision: D21722021
fbshipit-source-id: cab1278046b1aa7f8b875c016d43dfafdbaa0a2d
Summary:
Enabled linting rules that help to signal making errors with effect dependencies and such.
Fixed all errors, left any warnings generated by the hooks untouched
Reviewed By: nikoant
Differential Revision: D21721497
fbshipit-source-id: 9548453443fa7b663dc4d4289132f388c6697283
Summary: Previously, rows got highlighted after switching between data for `ManagedTable` even though `highlightableRows` was set to false. This diff forces the highlighting not to happen when the value is set to false
Reviewed By: mweststrate
Differential Revision: D21720266
fbshipit-source-id: 534944fe03ad1561bc2109468ae6c4c5f3fc947d
Summary:
While profiling the high CPU load of the Analytics plugin, I noticed that most of the time is spend in rendering React. This makes sense as the component sends data very frequently, although it is definitely less efficient than it could be.
As shown in the following profile picture, it is clear that all the cpu churns up due to the amounts of re-renderings caused (every new incoming messages causes the plugin to analyse and process all it's data).
With background plugins, we already made sure that non-active plugins don't eat up all the CPU in React components if they process data inefficiently. Before:
{F238020503}
This change debounces how often we give new state to plugins, so that multiple updates get collapsed if the load becomes to high. After (note that not every 'emit' causes in an expensive render anymore, but that the rendering is now in a separate stack, the only remaining renderer is the debouncer component). After:
{F238020481}
Render stack happens now after a bunch of emits:
{F238021694}
This drops ~130% cpu to 70% cpu in the case of the analytics plugin, see below
Reviewed By: passy
Differential Revision: D21690494
fbshipit-source-id: 299c49c95f20af01e6ee3110b0c39478b3135c43
Summary: Trying to add tooltip to some components to promote tooltip itself and make it clearer what they do
Reviewed By: mweststrate
Differential Revision: D21649207
fbshipit-source-id: 4763ae9a99d687e6624c07bb636c5f4e869cafc9
Summary: Change some offset to make it point more direct to an element
Reviewed By: mweststrate
Differential Revision: D21649206
fbshipit-source-id: 64b4a3851e713baa6095d819a16cd207bebdf46f
Summary: Fixed a layout issue in the list items of GraphQL, background style / line didn't tend to continue when scrolling, because flexbox doesn't grow all lines similarly. Tables do.
Reviewed By: jonathoma
Differential Revision: D21662000
fbshipit-source-id: 767d2d7ffd7e5dacf2c49aa67babbb47a331282c
Summary:
We used flexbox to layout rows in the element inspector. The problem with that is that flexbox cannot nicely grow all its childrens to the largest one. Although we could still see contents thanks to the `overflow: visible` hack, this means that the backgrounds didn't continue when scrolling.
In contrast, tables do grow their children width :)
Also fixed an issue where the AX details tree wasn't scrollable
Reviewed By: cekkaewnumchai
Differential Revision: D21661766
fbshipit-source-id: 6b1d16c7aded8beebdd8a50f3e8ab0d9b8633e02
Summary:
in Layout plugin, scrollbars where often not visible, for example to see the vertical scrollbar, one had to scroll to the horizontal end first.
Also introduced the `Scrollable` component to simplify this in the feature and separate the concepts of rendering something large and making it scrollable.
This diff cleans up the layout structure and fixes the problem
changelog: Fixed several minor layout issues in the Layout plugin
Reviewed By: cekkaewnumchai
Differential Revision: D21283157
fbshipit-source-id: 81849151475165796c65001616f038a9d6cbdfb2
Summary:
This diff updates the sidebar to show the recommended and all build types.
Also there is error handling in place along with tests. Right now the download happens by opening browser and the build gets downloaded in the download folder. But later in the diffs I will improve this flow to do that in the Flipper with a UX showing status updates.
Reviewed By: mweststrate
Differential Revision: D21556383
fbshipit-source-id: 6de9a00fe416c22cae7bacf91828a2221644eac7
Summary: FileSelector was added in D19743998, but it was not exported to be used by other. This diff exports it so that developers can use.
Reviewed By: mweststrate
Differential Revision: D21653870
fbshipit-source-id: 062247fa7a14c7ddf87c927205880a695598928d
Summary:
Fixed the layout usage in QPL, the `horizontal` was correct, but the elements where swapped (the table was supposed to take all remaining size, and sidebar it's needed space, rather than the reverse).
Made this more explicit in the Layout component, by splitting it up in `Layout.(Top|Left|Right|Bottom)`, so that one has to make an explicit choice here, making it less error prone.
Reviewed By: passy
Differential Revision: D21572438
fbshipit-source-id: 29aa3462a3c96d048825be3157730e26182cb2fa
Summary:
This allows long text to be seen on the sidebar in database plugin. Also, remove weird padding in the sidebar and separate sidebar component to a new file
Refactoring is in the next diff
Reviewed By: mweststrate
Differential Revision: D21550672
fbshipit-source-id: 3e80be16783719e18392fe3d8f8068caf9283f8f
Summary:
To comply with recent agreement, coverage test for MultipleSelectorSection is added.
Also, add undefined check in `elements.tsx` found while adding the test
Reviewed By: mweststrate
Differential Revision: D21554782
fbshipit-source-id: 7cd868bf16f6105d6f523048f29bdaa052837f45
Summary:
This diff updated the `flipper-out-of-contents` container to render with absolute position, which allows it to cover up all of the content in the plugin. This fixes an issue where content that exists in the plugin can be broken.
For example, the banner in the next diff would look like this:
{F237034745}
Reviewed By: mweststrate
Differential Revision: D21556849
fbshipit-source-id: 95ec4aac24ac995bd1c558123ef5da6087a40d0a
Summary: The effect of opening the screenshot after capturing was removed in D19765926.
Reviewed By: mweststrate
Differential Revision: D21571294
fbshipit-source-id: f3308d80e066cc01786c17323e4ff5f97c092de9
Summary:
Ugh, lockdown brain. This was supposed to be included in the test I added before
to get to 100% coverage. Well, it's here now.
Reviewed By: mweststrate
Differential Revision: D21550904
fbshipit-source-id: 044a11d38e211c6f57cce220adc8c42241a2043a