Summary: Now that we always build the component tree (CKTreeNode) in debug, we can just use the tree node identifier as the component identifier instead of creating a very long string.
Reviewed By: fabiomassimo
Differential Revision: D15046568
fbshipit-source-id: 4d83c1bee3fd7ac85ee4bd6e9f4f47812509e0c3
Summary:
- We cache the layout wrapper, but never used it actually.
- This should make the Layout plugin faster.
Reviewed By: fabiomassimo
Differential Revision: D15046463
fbshipit-source-id: b61f28d9a981e782b76abe78037d37665f7d8ba3
Summary: Makes the API a bit easier to use. Don't have to build an empty sidebar if you don't want one.
Reviewed By: passy
Differential Revision: D15064205
fbshipit-source-id: bd31c1aa97fd6d1c93717c10b268f49e44eb1299
Summary:
Updates CK and Yoga to latest dependencies.
Also removed the code from the post_install script which changed the min ios version of the yoga dependency, its no longer required.
Reviewed By: kfirapps
Differential Revision: D15098129
fbshipit-source-id: d00938db1df59d74253ae412a4bd835a0aa286b7
Summary:
I haven't done this at the platform level (plugin.js) because the persistedStateReducer method signature prevents it unfortunately.
We might want to add a different method type at some point, like this one so you don't need to do this unsafe casting in the plugin itself, but for now, just doing it here.
Reviewed By: danielbuechele
Differential Revision: D15080331
fbshipit-source-id: c51749ac84cd38559d85089557f44ace8ae6e08b
Summary: emulator isn't on the path in CI machines, but we already have ANDROID_HOME set so we can work out where it is.
Reviewed By: danielbuechele
Differential Revision: D15080422
fbshipit-source-id: 2c50a3de27909d2bfc82ea0210d06a0cc32357d7
Summary: Currently, you get an error when you don't have device utils installed. However, when you switch your flipper to a supported device, the error may not be cleared. This handles that case.
Reviewed By: jknoxville
Differential Revision: D15087620
fbshipit-source-id: 6060752b54161c7610656531d053ecbcdd9e978a
Summary: We were missing to log for those cases when we exported through sharable link. Also I changed logging a bit so that we can differentiate between Sharable Link and File exports
Reviewed By: jknoxville
Differential Revision: D15080292
fbshipit-source-id: 063e9f515e4f089ed3715e7b1ca0e66410e46541
Summary:
This diff makes headless flipper accept `metrics` argument. Once this is passed. The headless flipper will terminate to export the metrics of the plugins, the type of the export looks like the following.
```
export type MetricType = {[metricName: string]: number};
type MetricPluginType = {[pluginID: string]: MetricType};
export type ExportMetricType = {[clientID: string]: MetricPluginType};
```
This diff, uses the store to export the metrics. I will modify the logic to accept the data which gets exported through `exportData`
Reviewed By: passy
Differential Revision: D14933499
fbshipit-source-id: dade5b7bc59ea4beb6d16c5ef471737e8597358a
Summary:
`FKUserDefaultsPlugin` is initialized with an `appSuiteName` but doesn't use this to monitor the app suite user defaults. This adds that capability.
In Flipper, "App Suite UserDefaults" defaults will show up in the drop down selector for user defaults.
Reviewed By: priteshrnandgaonkar
Differential Revision: D14922399
fbshipit-source-id: 3876976ccd0968fdec35f7605107202e1f9d7cee
Summary: Separating out the types and utils for work I'm doing on https://github.com/facebook/flipper/pull/415 / D14973754. This will make the request to curl utility function much cleaner
Reviewed By: jknoxville
Differential Revision: D14976747
fbshipit-source-id: cc15c10103ea75945d0a2ebaaa6d32a376192961
Summary:
== Highlights
* Improved UI when exporting Flipper data. (45999a5292)
== Fixes
* The Shared Preference Plugin on Android will search for all shared pref files instead of only the package name by default. (825ecb8e23)
* When restarting Flipper and the previously selected plugin no longer exists, the UI would crash. (c4a8e73543)
Commit log: https://github.com/facebook/flipper/compare/v0.19.0...v0.20.0
Reviewed By: danielbuechele
Differential Revision: D14951753
fbshipit-source-id: dbafc2d41cd25b2ede218b3fe3e99745226939a9
Summary:
We've had a bunch of different options that were all binary
switches with very different ways of displaying them.
This consolidates them all to use ToggleSwitches. I think it
may still make sense to move them all to a sidebar as it's
the case for the Analytics plugin, but that's for another diff.
Reviewed By: danielbuechele
Differential Revision: D14933392
fbshipit-source-id: 7ef286b61142a564a7cde6de875266ac8641704b
Summary:
As seen in https://our.intern.facebook.com/intern/bug/653953588368620/,
the network plugin can crash if content doesn't look like a URI.
Ideally, we'd be more granular in catching this, but for now skipping
that content seems better than crashing the entire plugin page.
Reviewed By: danielbuechele
Differential Revision: D14971610
fbshipit-source-id: 2708e5c0d4d1f584419d24c7dc38438009015565
Summary: the simpliest approach to render this metadata for debugging purpose
Reviewed By: bcuccioli
Differential Revision: D14974129
fbshipit-source-id: d816d1ef8dcd1bc333c4d0cdf70d6d9fb925bc03
Summary:
Currently running the sample app on a pre-21 device produces a runtime error. This is because it includes OkHttp which requires 21+.
So this change just stops the sample app from being installable on pre-21 devices.
```
FATAL EXCEPTION: main
Process: com.facebook.flipper.sample, PID: 19629
java.lang.ExceptionInInitializerError
at okhttp3.OkHttpClient.newSslSocketFactory(OkHttpClient.java:263)
at okhttp3.OkHttpClient.<init>(OkHttpClient.java:229)
at okhttp3.OkHttpClient$Builder.build(OkHttpClient.java:1015)
at com.facebook.flipper.sample.FlipperSampleApplication.onCreate(FlipperSampleApplication.java:54)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4344)
at android.app.ActivityThread.access$1500(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalStateException: Expected Android API level 21+ but was 19
at okhttp3.internal.platform.AndroidPlatform.buildIfSupported(AndroidPlatform.java:238)
at okhttp3.internal.platform.Platform.findPlatform(Platform.java:202)
at okhttp3.internal.platform.Platform.<clinit>(Platform.java:79)
... 16 more
```
Reviewed By: passy
Differential Revision: D14953859
fbshipit-source-id: 8289c19e837f1d3739e120dc5a0f53111b800ca0
Summary:
Updating some deps and starting with the thing
that helps identify outdated things.
Reviewed By: jknoxville
Differential Revision: D14933477
fbshipit-source-id: 3a0f84abf97f9327ecab72388e114a1fb533504b
Summary:
The crash logged from `ErrorReporterRunnable` wasn't detailed. For example look at the following video.
Also for some reason the `FlipperConnection` interface doesn't have an argument for crash name. Thus I changed the js side of the plugin to accept `crash.name` to be undefined.
{F155526537}
Reviewed By: passy
Differential Revision: D14852561
fbshipit-source-id: 6daf9847535b4508fa312b4f940b014911aae2e5
Summary:
Before trying to debug the bugs we found, let's first
get it to the latest version.
Reviewed By: jknoxville
Differential Revision: D14913129
fbshipit-source-id: 255ecf02e495fccb21e413dff166aacfd80207e7
Summary:
I dislike the sprinkled eslint ignores. Let's put this
in one place and just depend on isProduction().
Reviewed By: jknoxville
Differential Revision: D14913057
fbshipit-source-id: 2f5a98b7dba1ac1829eaeab24290d2f66820edf9
Summary:
During client setup, if no device is found with a matching CSR, and any of those devices errored while trying to find that out, surface that error, instead of a generic 'No matching device found'.
This means that the warning about some unusable samsung devices now shows again, instead of a generic message.
Pull Request resolved: https://github.com/facebook/flipper/pull/413
Reviewed By: passy
Differential Revision: D14891185
Pulled By: jknoxville
fbshipit-source-id: 8f4cb4e8e04defb429a4ca915b0dab4725495c87
Summary: I though I already did this, when releasing it. Apparently not.
Reviewed By: jknoxville
Differential Revision: D14854810
fbshipit-source-id: 4da61866925e06a415bfaed0f48e5434e769ec39
Summary:
Adding a `moduleNameMapper` for jest tests, to map the module `flipper` to `src/index.js`. This fixes the electron tests.
While we're at it, upgrading jest and jest-runner/electron to the latest versions.
Reviewed By: jknoxville
Differential Revision: D14870486
fbshipit-source-id: c4c31066ed5ce8a6d5ed4e7e4f47d3c5d2370553
Summary: I'm adding these in the table plugin for now, since it's the only native plugin, but it probably makes sense to have this ability in all native plugins.
Reviewed By: passy
Differential Revision: D14833326
fbshipit-source-id: 906190745091e02daccb9f6e84b95e0e13f2d8bd
Summary: Adds ability to add things above and below the table when using native plugins.
Reviewed By: passy
Differential Revision: D14850839
fbshipit-source-id: cc7fa6d8055900c29f5af6f3460bc280c0a4a675
Summary:
When a plugin was selected the last time Flipper was running, but is not available anymore, Flipper was still trying to load the plugin and failed.
Now, if the selected plugin is not available, we just don't render anything.
Reviewed By: jknoxville
Differential Revision: D14854930
fbshipit-source-id: 9ddec47becce7bffcf93b3f4a092a8fcf2022f4f
Summary: These are full width blocks, and can be put anywhere, so calling them SidebarSections isn't very helpful.
Reviewed By: danielbuechele
Differential Revision: D14833465
fbshipit-source-id: 2433337f78b6bbcb951cd90b6925de1b9a304d42
Summary: Now that it has been inlined into TableNativePlugin, I'm reverting it back to it was before to keep it simple.
Reviewed By: passy
Differential Revision: D14800383
fbshipit-source-id: 81725134b6598c03e3ddfb1eb9269d463815dc82
Summary: Before expanding what a table plugin can do, I'm extracting the createTablePlugin functionality into the native plugin component, so it can evolve independently without lots of forks in the code.
Reviewed By: passy
Differential Revision: D14800313
fbshipit-source-id: dbb34fe974c507663151daeb6631d1911b46f6df
Summary:
The `instanceof Object` check was throwing an "cannnot convert object to primitve value" error, for some reason that I didn't fully understand. Replacing this check with a `typeof` check. However, `null` also returns `object`, so we are explictly checking this as well.
This was the error that happened before, on every POST request:
https://pxl.cl/vc6K
Reviewed By: passy
Differential Revision: D14827145
fbshipit-source-id: 999480db9afb1e0cc0d1bef73fb0cb2223fa0bc4
Summary:
The main change is is changing from the inheritance model:
`FlipperPlugin > NativePlugin > TablePlugin > ConcretePlugin`
to a composition model where:
`NativePlugin > TablePlugin > ConcretePlugin`
And behind the scenes, there's a `FlipperPlugin` that has a `NativePlugin` reference.
Now your native plugin will call methods like (in the table case) `display.updateRows` instead of `super.updateRows()`
The reasons for this are:
* Testability: we can easily mock the display and assert output.
* Encapsulation: Previously, native plugins could call `mConnection.send(...)` and send completely unsupported messages to the desktop. Now they only have access to the display's public api, which is guaranteed to work.
I've also changed it so that on every row update, we send the latest table metadata along with it. This makes sure we can ensure that the right table schema is displayed for the current data.
QueryResponder interface also added, which will come in useful for queryable datasets.
Reviewed By: passy
Differential Revision: D14751885
fbshipit-source-id: ea0bbd25f7eaa60020f8866fe210d8bd1c22e90b
Summary:
There's been an ongoing fight between eslint and prettier.
You win, prettier.
Reviewed By: danielbuechele
Differential Revision: D14799153
fbshipit-source-id: a4f0546a3a468bb21fed47d61bc14bd7e6f0b185
Summary: Eslint doesn't like them and me neither.
Reviewed By: danielbuechele
Differential Revision: D14798690
fbshipit-source-id: 5ee7108b9ecfbb05cf2d54cfce68931d16d69a73
Summary:
When starting Flipper with `--launcher-msg`, it currently shows a red error bar at the bottom. That's not ideal for various reasons including it looking kinda bad and it only supporting a single error (the last one set).
This instead adds an action that shows an indicator next to the version at the top as we had it before with the previous system.
Reviewed By: danielbuechele
Differential Revision: D14778859
fbshipit-source-id: 28591de6262e090a4e59a7f5a8cd86d7b3abf8fe
Summary:
Adding a recommended workflow for those that don't have a good setup after conversation in https://github.com/facebook/flipper/pull/227
Just a starting point but I think it's better than nothing.
Pull Request resolved: https://github.com/facebook/flipper/pull/409
Reviewed By: danielbuechele
Differential Revision: D14798121
Pulled By: jknoxville
fbshipit-source-id: 721a4bc07720709d1c7cc9f2fa7db69984f4c37e
Summary: Its helpful to store all history of sent messages for testing purposes.
Reviewed By: jknoxville
Differential Revision: D14797191
fbshipit-source-id: 0e58166cb4ab79852165f2107b2f6bcd259f1096