Commit Graph

1108 Commits

Author SHA1 Message Date
Pritesh Nandgaonkar
88f976b09b Flipper Release: v0.17.0
Summary:
- The Android library now uses AndroidX instead of the support-library.
- Folly and RSocket dependencies uploaded to cocoapods (f8bd473828).

- Improved Unicode support in the Network Inspector plugin (f4b2ce9a2b).
- Fixed MacOS release creation.
- Several UI fixes regarding in-app search and the toolbar.

Reviewed By: passy

Differential Revision: D14269567

fbshipit-source-id: 2d2f965316bd1ddfb375a2db48fb715095693c43
2019-03-05 06:28:26 -08:00
Pascal Hartig
fbe9e3a086 Prepare for Fresco stable release (#385)
Summary:
This unblocks our open source releases.

Pull Request resolved: https://github.com/facebook/flipper/pull/385

Reviewed By: danielbuechele

Differential Revision: D14299867

Pulled By: passy

fbshipit-source-id: d9ce29d0d0713cd54f6d8bed03e7a919f443f44b
2019-03-04 09:03:10 -08:00
JianyingLi
f4b2ce9a2b Support Chinese characters
Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/377

Reviewed By: passy

Differential Revision: D14299674

Pulled By: danielbuechele

fbshipit-source-id: 6b10370a4a367ae6e58415b8eeb5aef0864354f4
2019-03-04 05:16:00 -08:00
Pritesh Nandgaonkar
c098269533 Added telemetry for import and export
Summary: Adding telemetry for import and export feature

Reviewed By: jknoxville

Differential Revision: D14267533

fbshipit-source-id: 1a5e041d0dc8c59c325e7d80dc83f6135f479161
2019-03-04 05:08:19 -08:00
Daniel Büchele
7d39c33fc4 get children on invalidation
Summary: When a node was invalidated, not only the node itself needs to be refetched, but also its children.

Reviewed By: jknoxville

Differential Revision: D14280318

fbshipit-source-id: a262a2c95347dc9bf72f83b6a9eba9d3f9badb5a
2019-03-04 02:06:05 -08:00
Pritesh Nandgaonkar
b0551bb74e Export Flipper trace along with bug report
Summary:
Exports Flipper trace along with bug report. I was not able to upload `.flipper` file, thus I have uploaded `.json` file. One can download the json file from the portal and then can rename it to `.flipper` inorder to open it into flipper app.

I am looking into downloading `.flipper` directly, instead of `.json`. But that change, if it happens, will be done in other diff. I think having flipper trace on the bug report will be helpful to debug the issues.

Reviewed By: danielbuechele

Differential Revision: D14266218

fbshipit-source-id: fb7cf4c9773fb355f3569ce8d08b83bd736ab1ca
2019-03-01 08:22:46 -08:00
Pritesh Nandgaonkar
9a9c5a229b Cold start filter
Summary:
This diff adds filter for cold start in the Images plugin.

I also moved the Loading indicator as a sibling of filter bar, because it used to show up when the images to display were zero. Earlier zero images case used to happen only at the start, but now with the options to apply filter, this case may happen often, so user should have access to filter bar to change the filters in order to reset it.

Look at the video for more information

Reviewed By: danielbuechele

Differential Revision: D14269064

fbshipit-source-id: cbab5a62fd62c5a98f8728c33c1a0dbfc6f454cc
2019-03-01 04:50:16 -08:00
Pascal Hartig
6a8abb3be6 Prevent release
Summary:
Move the snapshot repository into the SNAPSHOT block.
This will mean that trying to build a release version will now
fail because it can't resolve the dependency like this:

```

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':android:compileReleaseAidl'.
> Could not resolve all task dependencies for configuration ':android:releaseCompileClasspath'.
   > Could not find com.github.facebook:fresco:0ff379c262.
     Searched in the following locations:
       - file:/opt/android-sdk/extras/m2repository/com/github/facebook/fresco/0ff379c262/fresco-0ff379c262.pom
       - file:/opt/android-sdk/extras/m2repository/com/github/facebook/fresco/0ff379c262/fresco-0ff379c262.jar
       - file:/opt/android-sdk/extras/google/m2repository/com/github/facebook/fresco/0ff379c262/fresco-0ff379c262.pom
       - file:/opt/android-sdk/extras/google/m2repository/com/github/facebook/fresco/0ff379c262/fresco-0ff379c262.jar
       - file:/opt/android-sdk/extras/android/m2repository/com/github/facebook/fresco/0ff379c262/fresco-0ff379c262.pom
       - file:/opt/android-sdk/extras/android/m2repository/com/github/facebook/fresco/0ff379c262/fresco-0ff379c262.jar
       - https://dl.google.com/dl/android/maven2/com/github/facebook/fresco/0ff379c262/fresco-0ff379c262.pom
       - https://dl.google.com/dl/android/maven2/com/github/facebook/fresco/0ff379c262/fresco-0ff379c262.jar
       - file:/home/realpassy/.m2/repository/com/github/facebook/fresco/0ff379c262/fresco-0ff379c262.pom
       - file:/home/realpassy/.m2/repository/com/github/facebook/fresco/0ff379c262/fresco-0ff379c262.jar
       - https://repo.maven.apache.org/maven2/com/github/facebook/fresco/0ff379c262/fresco-0ff379c262.pom
       - https://repo.maven.apache.org/maven2/com/github/facebook/fresco/0ff379c262/fresco-0ff379c262.jar
       - https://jcenter.bintray.com/com/github/facebook/fresco/0ff379c262/fresco-0ff379c262.pom
       - https://jcenter.bintray.com/com/github/facebook/fresco/0ff379c262/fresco-0ff379c262.jar
     Required by:
         project :android

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 2s
```

Reviewed By: priteshrnandgaonkar

Differential Revision: D14279359

fbshipit-source-id: 6b86a0232d7a4ded8c94bd3a0e0dd08116f13719
2019-03-01 04:42:34 -08:00
Daniel Büchele
79124891a9 url handler downloads
Summary:
Adding support for downloading archived Flipper data using a URL handler.
A URL looks like `flipper://import/?url=` and will download the file specified in the url param. While downloading the file, a spinner is shown in the app's titlebar.

Reviewed By: jknoxville

Differential Revision: D14262763

fbshipit-source-id: 6538fc78c07a48cef7b71b3f7bdbcb712d054593
2019-03-01 04:30:22 -08:00
John Knox
3e336d2349 Print error when adb client creation fails
Summary:
It looks like the shell method of creating an adb client is failing almost all of the time: https://fburl.com/scuba/6ac2zhxn

Thankfully we have the adbkit fallback, but we don't have the error message to see why it's failing: https://our.intern.facebook.com/intern/logview/details/infinity_javascript/dab8d34562f0cdb835132f8825317942/

Reviewed By: danielbuechele

Differential Revision: D14260406

fbshipit-source-id: 6b21b5d9a4806780daa7ce692770788067364d12
2019-03-01 04:26:46 -08:00
Pritesh Nandgaonkar
be008fa18f Change Coldstart type to boolean
Summary: Updated the coldstart type to boolean, as number is not required, its a boolean value.

Differential Revision: D14260678

fbshipit-source-id: 236a38e04fd31cab4a561f5e0365bc43ad98adea
2019-02-28 13:31:16 -08:00
Pritesh Nandgaonkar
af317eed2b Export and import all the nodes
Summary:
This diff does the following

- Support to export the entire view hierarchy for iOS
- Android is not supported yet
- This diff adds a call `getAllNodes` to the client side of iOS, which returns the entire view hierarchy
- Currently the search doesn't work on the imported layout plugin data. Also the imported layout plugin data doesn't expand the way it does when component is mounted, reason being the client passed to the plugin is not functional for the archived case

I will work on fixing the last points in the next diffs stacked on the current one.

For Android:
- Currently the export function will export whatever is currently displayed on the Flipper app, not the entire view hierarchy

Support for Android will also come up in later diffs.

Reviewed By: jknoxville

Differential Revision: D14209157

fbshipit-source-id: 3ad3e39edfd994913dc19cc239bfbbe011a9757c
2019-02-28 09:40:50 -08:00
Daniel Büchele
99ea11b8e6 createPaste
Reviewed By: jknoxville

Differential Revision: D14224400

fbshipit-source-id: 9a9a8578de00d276d65a7928964eae619f5bc41f
2019-02-28 07:28:25 -08:00
Daniel Büchele
6118dee3e7 adding logged in user to sidebar
Summary: Adding UI that shows when a user is logged in and allows the user to log out.

Reviewed By: jknoxville

Differential Revision: D14224401

fbshipit-source-id: 314a1c2f9a1021258e724e824be7577eb85d4b9e
2019-02-28 07:28:25 -08:00
Daniel Büchele
ff0de8caaa user reducer
Reviewed By: jknoxville

Differential Revision: D14224403

fbshipit-source-id: 8341dd8af03148c4b1f648641bda522804acb22d
2019-02-28 07:28:25 -08:00
Daniel Büchele
ffa586dd49 adding keytar native module
Summary:
`keytar` is developped by the Nuclide team and allows cross-platform access to the system's keychain. As `keytar` has a native dependency, we need to make sure Metro doesn't try to bundle it as part of our JS bundle. We are adding another rule to our electron-transform, to not bundle `.node` files (which are native node modules).

Secondly, we need to make sure, the native module is compiled for the correct version of node.js. Usually native modules are compiled for the node version that is running on the system it is installed on. However, we need to make sure it is compiled with the node version that is bundled with electron. That's exactly what `electron-rebuild` does: It recompiles all native modules with the electron's node version.

More on native modules: https://electronjs.org/docs/tutorial/using-native-node-modules

Reviewed By: jknoxville

Differential Revision: D14224402

fbshipit-source-id: 6414a53391a861a23a5d95bf6f18cd0058d9178f
2019-02-28 07:28:25 -08:00
John Knox
85c041ff8d Change performAndReportError to handle exception pointers
Summary: Since plugins aren't under our control, they might throw exception pointers. We can still extract the useful info in this case.

Reviewed By: passy

Differential Revision: D14244362

fbshipit-source-id: 5f18100c08160e7514b3fd88ec47809cb37e9770
2019-02-28 05:39:52 -08:00
John Knox
e594176401 Handle any exception pointers at top level
Summary: If a plugin thows an exception pointer instead of by value, we should capture it and stop the app from crashing.

Reviewed By: passy

Differential Revision: D14243644

fbshipit-source-id: a2e5dde2b36c430355552e3305634baa5913b703
2019-02-28 05:39:52 -08:00
Pascal Hartig
f0722287be Fix Mac ZIP building
Summary:
The current Mac zip creation in electron-builder is broken and creates corrupt zip builder. Other platforms are still fine. This just zips stuff up manually and ensures that symlinks are preserved.

Thanks a lot to Daniel Büchele for helping me wrap my head around untyped promises.

Reviewed By: jknoxville

Differential Revision: D14243002

fbshipit-source-id: 908d176275e5d22173e587c0eb4d7c4b2b7c2e0f
2019-02-27 15:07:46 -08:00
John Knox
56576a84ce Fix app crash when payload is too large
Summary:
Fixes T40544233

Exceptions should be thrown by value, not as a pointer, or else catching by reference (the recommended practice) won't work.

Reviewed By: priteshrnandgaonkar

Differential Revision: D14243337

fbshipit-source-id: 28677d7f1b3c025b67fb945f30116f3b751a89a8
2019-02-27 10:47:04 -08:00
John Knox
0445a05e5b Add isMethodSupported to client
Summary: Allows plugins to check if extension commands or new features are enabled in the current app, by calling `this.client.supportsMethod('xxx')`.

Reviewed By: passy

Differential Revision: D14225961

fbshipit-source-id: c9f7f5b3091209f0ce9705d9d3a0ec173edf3e25
2019-02-27 10:10:02 -08:00
John Knox
6dc2215753 Reuse adb client in certificate provider
Summary: Avoid making duplicate clients, and this one uses a more reliable creation method.

Reviewed By: passy

Differential Revision: D14241448

fbshipit-source-id: 95846a373335818758c8c4a282ed4db26b62d986
2019-02-27 05:42:24 -08:00
John Knox
99bb43fe32 Move adb client creation into it's own file
Summary: Allows the created client to be reused.

Reviewed By: passy

Differential Revision: D14241449

fbshipit-source-id: 6bbb64eeb708dce9c24e4581e8480d19af998e47
2019-02-27 05:42:24 -08:00
Pascal Hartig
edbe2555fc Clear adb logcat when clearing Flipper logs
Summary: When using "Clear logs" in Flipper, also flush the native Android buffer.

Reviewed By: jknoxville

Differential Revision: D14225722

fbshipit-source-id: f41ff9013b95fc3271d3ae44910da18023708d2d
2019-02-26 16:33:19 -08:00
Pascal Hartig
ea03aa36b7 Add child-process-es6-promise
Summary: Using this in the next diff. If you don't feel like this is a good fit, probably better to comment there.

Reviewed By: jknoxville

Differential Revision: D14225747

fbshipit-source-id: 29cd0b4a37b988b4bd8643f1db64bb3e2610b0e4
2019-02-26 16:33:19 -08:00
Manish Singhal
b8e6298df5 Added support for cold start in image perf plugin
Summary:
This diff adds support for cold start in image perf plugin. Now developer can see which images have been requested as part of cold start.

CC: Diego Sanchez Vivian Wehner Alexander Oprisnik Gaurav Nijhara

Reviewed By: jknoxville

Differential Revision: D14227065

fbshipit-source-id: 3347b460e491b218115d8572cb8b323de909ef1b
2019-02-26 16:01:20 -08:00
John Knox
40ada838d7 Add isMethodSupported handler
Summary: Allows plugin to check if something is supported by that app, for example an extension command or a new feature, before trying to use it.

Reviewed By: passy

Differential Revision: D14225957

fbshipit-source-id: 3c5a29a06b56fe5f1da772824232547447872344
2019-02-26 10:08:21 -08:00
Pascal Hartig
dbb4fa1191 Fix typo
Summary: typo_gnome

Reviewed By: jknoxville

Differential Revision: D14224864

fbshipit-source-id: eab74df8fb7c48782a44b5284483ab67c205387e
2019-02-26 07:37:52 -08:00
Pritesh Nandgaonkar
f8bd473828 Use Folly and RSocket from cocoapods (#379)
Summary:
I have released pods for Folly and RSocket on cocoapods. Thus we won't need to host different versions of these pods on our repository. I haven't removed those pods from `Specs` folder, as the current users of `0.16.2` would still be referring the Specs folder on the master branch. I will remove the specs folder once, all our pods are on cocoapods and we no longer need to host any pods.
Pull Request resolved: https://github.com/facebook/flipper/pull/379

Reviewed By: jknoxville

Differential Revision: D14185931

Pulled By: priteshrnandgaonkar

fbshipit-source-id: ea285024123e41c2d110827e26f79a72ef22c008
2019-02-26 04:18:00 -08:00
John Knox
9c4aa9b9cb Call out SoLoader.init in getting started docs
Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/383

Reviewed By: danielbuechele

Differential Revision: D14208864

Pulled By: jknoxville

fbshipit-source-id: 54a319a4b6a658ae49ed90223463ddf7a07bb9c7
2019-02-26 02:46:49 -08:00
Daniel Büchele
b8cb95ab0c toolbar
Summary: When there wasn't enough space for the text toolbar, the text was wrapped into multiple lines. Now it's truncated.

Reviewed By: jknoxville

Differential Revision: D14209813

fbshipit-source-id: 1971cd791daf345639993ed0632d718374a5f91b
2019-02-26 02:37:17 -08:00
Daniel Büchele
2e8394cb36 fix search
Summary: Layout search was throwing errors before, now it's working. The problem was, the event object used in the `setTimeout`-callback was released, before the timeout fired and therefore was null.

Reviewed By: jknoxville

Differential Revision: D14209811

fbshipit-source-id: 2465241c376d3e709155830e796aa3b991cbd7de
2019-02-26 02:37:17 -08:00
Daniel Büchele
385d74ef30 remove virtualization
Summary:
Removing the virtualization in the elements inspector. This didn't really make sense here, because usually the inspector renders 10-1000 rows, which can be easily done in the browser. Having virtualization here, caused some problems with icons flickering and scrolling being broken.

Let's make it less complex and just remove the virtualization!

Reviewed By: jknoxville

Differential Revision: D14209815

fbshipit-source-id: 115d3ed57a1ccdbc20108636ff4fc7fc68e6c9c0
2019-02-26 02:37:17 -08:00
Daniel Büchele
0d0da3df24 sidebar
Summary: Before, the a11y inspector was in a sidebar. This changes the actual view hierarchy to be in a sidebar on the left side. This doesn't make an actual difference for the user, but helps to fix the scrolling issues in D14209815

Reviewed By: jknoxville

Differential Revision: D14209812

fbshipit-source-id: 414e8fd34c889cdce2dd3776727dd4a3a59efeb5
2019-02-26 02:37:17 -08:00
Daniel Büchele
5f5a38f1fe element expanding
Summary:
Previously nodes were always marked as expanded, when they were loaded. In some cases this caused a node to be marked as expanded, but its children not being loaded.

This changes the behaviour to only mark a node as expanded, once its children are loaded.

Reviewed By: jknoxville

Differential Revision: D14209814

fbshipit-source-id: f825d6a066373be932e42b9612a1bf78877b12aa
2019-02-26 02:37:17 -08:00
John Knox
f12144be38 Fix CRASH: undefined undefined bug
Summary:
Display "crashes" as plugin errors when they don't include the expected crash attributes.

Plugins can respond to a `call()` with success or error. If error, then they can provide an arbitrary json object.
These errors go through the same code as crash reports for the crash reporter plugin, but they don't necessarily contain the expected attributes.

When they don't display them as a plugin error, and stringify the whole object.

It would be better to distinguish these properly and highlight that they aren't crashes, in the crash reporter, but that's a bigger task. This stops them being shown as "undefined undefined".

Reviewed By: xiphirx

Differential Revision: D14207907

fbshipit-source-id: 8ba357fbe681a40cd671510a187073e4cbfa2184
2019-02-25 09:33:01 -08:00
Daniel Büchele
f1d46caa2f remove console.log
Summary: as per title

Reviewed By: jknoxville

Differential Revision: D14207127

fbshipit-source-id: e6608382061f4c4a8aff3076810d7ab32be9e990
2019-02-25 03:01:30 -08:00
Pascal Hartig
2a94da7db3 Best-effort fix for crash
Summary:
The keys in WeakMaps have to be Objects (i.e. can't be primitives) as
they have to be fall under the responsibility of the GC.

Without this check, we may get "TypeError: Invalid value used as weak map key"
as we accept `any` as `data` for the inspector. I'm not entirely
confident if this check is enough, but I also don't have a way of reproducing
the error we got reported.

Reviewed By: jknoxville

Differential Revision: D14182463

fbshipit-source-id: 3397678935f08513e485bf5654377b54053ee32f
2019-02-22 11:07:55 -08:00
Pascal Hartig
156a0c17c6 Load Fresco image on button press only
Summary: Only load the image when clicking on the "button"

Reviewed By: oprisnik

Differential Revision: D14165707

fbshipit-source-id: d07fb76562f8b91fc945713d779319b976e17016
2019-02-22 02:51:33 -08:00
Pascal Hartig
cbfb280783 Set up FrescoFlipperPlugin default constructor
Summary:
Not quite sure about the default as static, but then if it's for
debugging only, does it matter?

Reviewed By: oprisnik

Differential Revision: D14165668

fbshipit-source-id: edd53420a4fc8570de87f02b3e5e65cfe649f810
2019-02-22 02:51:33 -08:00
Pascal Hartig
d371a211a8 Set up Fresco in sample app
Summary:
This looks bad. There are two things I want to follow up on in future
diffs before landing this:

- Make loading the image conditional by adding another button.
- Add a default constructor to the plugin that avoids this crazy bit of boilerplate.

Reviewed By: oprisnik

Differential Revision: D14165569

fbshipit-source-id: 25c5fbaee32e72c6469979cda694cc9f13a92166
2019-02-22 02:51:33 -08:00
Pascal Hartig
2067e5e1fc Upgrade react-dom to fix CVE-2018-6341
Summary:
Better safe than sorry even though we're not directly
working with user-supplied data, plugins or apps might.

Reviewed By: danielbuechele

Differential Revision: D14168566

fbshipit-source-id: 8108a2a592d2e2d6b8b2259e0e4bf943cf9c333e
2019-02-21 10:33:17 -08:00
Pritesh Nandgaonkar
c073aad801 Add an option to crash a sample app to test crash reporter plugin
Summary: As per the title

Reviewed By: jknoxville

Differential Revision: D14168217

fbshipit-source-id: c138a4d5c3258f094436a2b09fd18130539a866c
2019-02-21 10:19:58 -08:00
John Knox
5fff501d26 Don't log cert exchange connection failures
Summary: This info is still available in the diagnostic screen.

Reviewed By: passy

Differential Revision: D14164791

fbshipit-source-id: 1fc91da0b7437d530bddee6cbb5ea8c2d11f7b80
2019-02-21 10:12:04 -08:00
Daniel Büchele
8ff625397b persist search
Summary:
The search query can only be persisted if we have an identifier for the searchable component. For this we already have a property `tableKey` on our `ManagedTable`. However, we don't want to require every plugin to provide a key for their table.

In this diff, a tableKey is auto-generated from the table's column configuration. This should be good enough to uniquely identify a table and persist it's query.

Reviewed By: passy

Differential Revision: D14168577

fbshipit-source-id: 13e928a606c3a05096dfbfb01ae90b15aa085bf2
2019-02-21 10:02:45 -08:00
Pritesh Nandgaonkar
863088e7cf Filter Images by surfaces
Summary:
Adds a capability to filter images by surfaces.

Note: I will allow multi select in the next diff, stacked on the current one.

Reviewed By: passy

Differential Revision: D14158223

fbshipit-source-id: d96d73b94a8a442f3b60f656bc573b328c5500ad
2019-02-21 09:46:55 -08:00
Daniel Büchele
520ffec7c9 removing entry, rootDir from defaultPlugins
Summary:
When bundling default plugins, we create a JSON-file containing information about the plugin and where to require it from. This information contained two filed: `entry` and `rootDir`, which were written while bundling the plugins. Because the plugins are bundled on Sandcastle, this was a path on the Sandcastle machine.

This also happened for the OSS version, see the screenshot from a GitHub issue.
Entry and rootDir are only used during the build process and not needed afterwards, so it is save to remove them from the JSON.

https://pxl.cl/qQSx

Reviewed By: passy

Differential Revision: D14165679

fbshipit-source-id: 4e7c5ac25652758ccfc3a459f4dd197254c6f897
2019-02-21 09:39:54 -08:00
Daniel Büchele
43157f974e Update docs to use package name as ID
Summary: We swtiched from using the name of the package as the ID which is used to identify a client plugin. These changes were not reflected correctly in our docs.

Reviewed By: jknoxville

Differential Revision: D14165439

fbshipit-source-id: 1cbb9c1723911f8fa4b7df19c631e6f260c81bd8
2019-02-21 09:39:54 -08:00
Aziz Murtazaev
0279fc919f Move android module's support lib references to AndroidX
Summary: SupportLib v28 -> AndroidX v1

Reviewed By: passy

Differential Revision: D14150032

fbshipit-source-id: f9c0d15a4f281fea78500e78275eb260e484e674
2019-02-21 09:26:07 -08:00
Pritesh Nandgaonkar
01ee57c601 Move fresco plugin to use redux store
Summary: This diff moves the state to PersistedState

Reviewed By: danielbuechele

Differential Revision: D14126419

fbshipit-source-id: aaf5f035ddc7e64ad2602ae4b80c9901a20df144
2019-02-21 07:16:12 -08:00