Commit Graph

1150 Commits

Author SHA1 Message Date
Daniel Büchele
f30ff068a7 Show offline devices in dropdown
Summary:
This diff aims to make the selected device a little clearer, the button now shows different icons depending on the selected devices: physical, emulators and archived devices.

The dropdown now is grouped in these sections, depending on their availability:
- Connected Devices
- Running Emulators
- Imported Devices
- Launch Android emulators
- Open File...

"Open File..." allows to import a file the same way as File -> Open File...

Reviewed By: jknoxville

Differential Revision: D14460789

fbshipit-source-id: 8d6edff0d90d5e02e4ef5976af5680ab8eaf77b4
2019-03-15 11:30:38 -07:00
Pritesh Nandgaonkar
51139500f4 Add revision information in the exported file
Summary: Adds revision information which is used to build the flipper app. for more context follow the [discussion](https://fb.workplace.com/groups/1489943347777350/permalink/2046366362135043/)

Reviewed By: danielbuechele

Differential Revision: D14458169

fbshipit-source-id: 71860f1e78c042f76d0e220dd3be96f2adaf609e
2019-03-15 09:57:12 -07:00
Pritesh Nandgaonkar
e184af7f2a fix the parsing error
Summary:
The headless version used to use `JSON.stringify` to serialize the output of `serializeStore` which basically transformed the store to a specific format which is serializable.  But we have written the custom serialize function which cateres to the non serializable object types. Headless didn't use it, so thats why it exported Flipper trace in an unrecognizable format for the flipper.

I have also renamed `serializeStore` to `prepareToSerializeStore` so that the confusion doesn't occur in future. I have used an `exportStore` function in headless which exports the store to the `Promise<String>`

Reviewed By: jknoxville

Differential Revision: D14480096

fbshipit-source-id: f312d7637aa082d96c3bc1dfd00eefb19182e97f
2019-03-15 09:49:31 -07:00
Pascal Hartig
2813b584f6 Flipper Bump: v0.18.1-SNAPSHOT
Summary: Reenable snapshots.

Reviewed By: jknoxville

Differential Revision: D14477604

fbshipit-source-id: a71d49f2228b8f91b22ac5f8f1afc0444b77b32b
2019-03-15 08:51:09 -07:00
Pascal Hartig
c7633cb585 Flipper Release: v0.18.0
Summary:
= Highlights

This is a bit of a boring release, to be frank. Most of the stuff happened behind the scenes, but a lot of preparation for interesting stuff happened behind the scenes, so stay tuned!

= Fixes

- Upgraded to Electron 4.0.8 (e0127b8438)
- Fixes to node expansion in the layout inspector.
- Connectivity improvements.

See https://github.com/facebook/flipper/compare/v0.17.1...v0.18.0 for reference.

Reviewed By: jknoxville

Differential Revision: D14477605

fbshipit-source-id: 0d927ba08fa5fab9d95c76ec763f5b9dd5bc104d
2019-03-15 08:51:09 -07:00
Pascal Hartig
3141b954bf Run prettier fix
Summary: Should also fix the build.

Reviewed By: jknoxville

Differential Revision: D14477777

fbshipit-source-id: 01fcfb2321c9b7a12acdf079473d91b6805d4dda
2019-03-15 05:13:30 -07:00
Pascal Hartig
b354a82066 Bump Litho back to stable
Summary: Unblocking the release.

Reviewed By: muraziz

Differential Revision: D14477571

fbshipit-source-id: 06674e5c714f67f71f541c36b866ad3b403c960e
2019-03-15 03:50:13 -07:00
Pascal Hartig
69dd6e4fc1 Add non-interactive mode to sample app
Summary:
This can be used in integration tests/headless to create
some data to match against.

Ideally, headless also will need some mechanism to be
told to exit, but that's a separate issue.

Reviewed By: jknoxville

Differential Revision: D14387494

fbshipit-source-id: 88d7c27e342fb0b26251e6edf12e7b922d5144c0
2019-03-14 11:16:40 -07:00
John Knox
b675d1c6b5 Add test:debug target
Summary:
To run a test with the chrome debugger attached:
* Add `debugger` statement in the code
* Open 'chrome://inspect' and then "Open dedicated DevTools for Node"
* run `yarn test:debug $TEST_FILE` where $TEST_FILE is the file containing the tests to debug

I haven't done this for test-electron and test-with-device because the debugger didn't hit the breakpoint for some reason. Shipping this because some is better than all.

Reviewed By: danielbuechele

Differential Revision: D14457843

fbshipit-source-id: 3ce7ba7a95f4623bd87b5feeae0c26a65f4b7eb8
2019-03-14 11:04:51 -07:00
Peter van der Zee
f8b86362d7 Bump Prettier to 1.16.4
Summary:
@public
This bumps Prettier to v1.16.4
Only format source files were updated.

Reviewed By: mjesun

Differential Revision: D14454893

fbshipit-source-id: 72f9872fe764a79dbf0d9fab9bebb1456b039f2f
2019-03-14 07:00:52 -07:00
Pascal Hartig
e97dddfda6 Add readCurrentRevision helper
Summary: To read the current revision written into the manifest at build-time.

Reviewed By: danielbuechele

Differential Revision: D14454983

fbshipit-source-id: adad7d85dbf410701d2f8601bfccbcfbc0f30dff
2019-03-14 04:48:01 -07:00
Daniel Büchele
aad970defd UI for sharable URLs
Summary:
Uploading the Flipper data could take some while. With the current implementation the user didn't know what was happening. This is why this diff immediately shows a sheet with a spinner, until the upload is finished.

The URL is still copied to the clipboard and a notifications is displayed. Additionally the user can copy the URL from the sheet.

Reviewed By: priteshrnandgaonkar

Differential Revision: D14441759

fbshipit-source-id: c853526a7da76e2dea5e1aaf6b6eff21e4268789
2019-03-14 04:22:15 -07:00
Mihaela Ogrezeanu
50a1fa64d8 Use SoftReference in ObjectTracker
Summary:
if we use WeakReferences, DebugSection nodes are released very fast and highlighting doesn't work because the node is removed from the ObjectTracker.
passy do you know who else I can add as reviewer?

Reviewed By: passy

Differential Revision: D14385872

fbshipit-source-id: ecc63190a84a7186296ed9c4c82ff6ab2aca8ad2
2019-03-13 08:29:57 -07:00
Pritesh Nandgaonkar
2f3678d6e3 Solve the bug when default state was not added
Summary:
Due to faulty condition default state was not being added in the persistedState, which casued the following bug.

{F153286217}

Reviewed By: danielbuechele

Differential Revision: D14425166

fbshipit-source-id: 557dc3717b650dae90dc44ad12970a684cecbf24
2019-03-13 05:28:36 -07:00
Pascal Hartig
c2b6df7c3b Use prefixed temp folder
Summary:
I'm accumulating a lot of those in my tmpfs and
it would be great to immediately identify the
ones coming from Flipper.

Reviewed By: danielbuechele

Differential Revision: D14406809

fbshipit-source-id: 6b74e8260a841d5db76ac34643ee0226abba735a
2019-03-13 03:40:06 -07:00
Pascal Hartig
1b1d349dba Add revision to build manifest
Summary:
Package up the current repository's revision when building
a release.

This will then be used to write it into exported traces
so we can find a compatible version when opening it up
again.

Reviewed By: danielbuechele

Differential Revision: D14406684

fbshipit-source-id: 761a51e69adbcab1d541c2daa78c9827ea299e79
2019-03-13 03:40:06 -07:00
Pritesh Nandgaonkar
f2627dbc8b Hide target and alignment mode for archived device
Summary: As per title. Target mode and Alignment mode doesn't make sense for archived devices.

Reviewed By: danielbuechele

Differential Revision: D14407780

fbshipit-source-id: cf6f56456674ad8fec422d6f84d58c6d5b211c25
2019-03-12 07:08:24 -07:00
Pritesh Nandgaonkar
145addf1c9 Fix search for accessibility view
Summary:
Bug: On search, the accessibility views didn't used to expand.Look at the following video to understand the bug

{F153135892}

Reviewed By: danielbuechele

Differential Revision: D14407511

fbshipit-source-id: 011bf31b5bd10f5a7dad3d5d30703ec3bdeaf9c1
2019-03-12 07:08:24 -07:00
Pritesh Nandgaonkar
1c8fffa20b Enable import all the nodes for android
Summary: Enables Import and Export for all the nodes for android. Also search and Accessibility feature works

Reviewed By: danielbuechele

Differential Revision: D14406016

fbshipit-source-id: 8976db66d1ca91e98c52983a31ea584764bde0f6
2019-03-12 07:08:24 -07:00
Pascal Hartig
063d8aa416 Remove FlowFixMes
Summary: Flow tells me these too are unnecessary now. Yay!

Reviewed By: danielbuechele

Differential Revision: D14406869

fbshipit-source-id: c09c11fd548798a3fe97c74d23d3b2e9637e5f3a
2019-03-12 03:37:00 -07:00
Daniel Büchele
e0127b8438 Electron 4.0.8
Summary:
Upgrading to electron 4.0.8 to fix CVE-2019-5786

Learn more: https://electronjs.org/blog/filereader-fix

Reviewed By: passy

Differential Revision: D14403928

fbshipit-source-id: 47bd198196de789958c93cfecd2e5e01e24ea7ef
2019-03-11 12:13:09 -07:00
Pasquale Anatriello
a0ddb92cd2 Remove Reference API
Summary: Reference has been deprecated for a while. This diff completely removes it in favor of using ComparableDrawable everywhere.

Reviewed By: astreet

Differential Revision: D14241428

fbshipit-source-id: a986f34fda3a05c85d3d57b1e806c5e48c3f485e
2019-03-08 11:19:49 -08:00
Pritesh Nandgaonkar
b65581262a Enable search on layout2 for archived devices
Summary:
Enables search on the imported layout data. The way search is implemented is that the Flipper app asks for the search results from the mobile clients. Since mobile client will not exist in the archived case, the search won't work. To solve this problem I added a proxy client which will get all the messages fired by the Layout Inspector and it will accordingly revert back with the responses. In the case of search, it will give back the search result tree for a particular query.

Also added extensive tests for the proxy client

Reviewed By: danielbuechele

Differential Revision: D14281856

fbshipit-source-id: 651436084ebacd57f86e4fe9bb2036e7f666880c
2019-03-08 10:19:14 -08:00
Pascal Hartig
44b7d4c6c3 Flipper Bump: v0.17.2-SNAPSHOT
Summary: Back to snapshot releases.

Reviewed By: danielbuechele

Differential Revision: D14384824

fbshipit-source-id: 7447732d299a2f85081ef1eec27f14416d88a3bc
2019-03-08 04:55:40 -08:00
Pascal Hartig
d025bbd0bf Flipper Release: v0.17.1
Summary:
== Bugfix Release ==

Fixes #394 in which using the network inspector can cause the plugin view to crash. Also fixes an issue where native background plugins can fail to connect (d720b20870).

Reviewed By: danielbuechele

Differential Revision: D14384823

fbshipit-source-id: 7cee49d22ec2ed8f076cf3aeb980d4ba3a273a3f
2019-03-08 04:55:40 -08:00
Pritesh Nandgaonkar
d720b20870 Solved the bug, where it didn't used to connect to Flipper
Summary:
The graphql plugin gets injected after the client is connected. In this case, earlier we didn't use to call `didconnect` assuming that it will be called when the plugin gets clicked by the user in the UI. But that is not true anymore as GraphQL plugin is a background plugin, And we don't call `didConnect` for the background plugins on the user click in the UI, as we assume that background plugins should have already received the call before.

This diff fixes the issue by calling didConnect on the background plugin which gets added after the `FlipperClient` is initialised.
{F152780726}

Look at the bug:

Reviewed By: danielbuechele

Differential Revision: D14369587

fbshipit-source-id: f75bf4e4463a31fa4735e90245c46632858a32b7
2019-03-07 14:41:28 -08:00
Daniel Büchele
2c05fdf347 correctly handle gzipped unicode fixes 394
Summary:
For gzipped requests, the decoding of unicode characters was failing, because it was was done, before decompressing the response payload.

In this diff, the payload is first decompressed and decoded afterwards. For the calculation of the response size, this is removed, because it doesn't matter for the calculation of the size to correctly decode unicode characters. However, there might be a problem with displaying the correct size. This is tracked in T41427687.

Reviewed By: jknoxville

Differential Revision: D14366841

fbshipit-source-id: e375df1ec44505f6315dedbe71b3b62eac0f281a
2019-03-07 10:08:29 -08:00
Pascal Hartig
83c9d3399f Add missing title attributes
Summary:
Extended the linter to check for the title attribute, too, and fixed
all violations. Linter will follow in next diff.

Reviewed By: jknoxville

Differential Revision: D14366410

fbshipit-source-id: b4de3592f2537e2bb16d4c2af231e5bee45346e4
2019-03-07 09:44:25 -08:00
Pascal Hartig
31c240ba00 Blacklist dist/ from devserver
Summary:
Having previously run `yarn build` can otherwise
cause your devserver to stop working.

Caveat: If you have a Flipper checkout and it's called neither `sonar` nor `flipper`, you're still screwed.

Reviewed By: danielbuechele

Differential Revision: D14364984

fbshipit-source-id: 1652c94a95b1dcb6d34bb9040a9cd4cd70c6df55
2019-03-07 05:47:32 -08:00
Pascal Hartig
e2eab5b0dc Update communicating.md (#392)
Summary:
Fix quotes
Pull Request resolved: https://github.com/facebook/flipper/pull/392

Reviewed By: danielbuechele

Differential Revision: D14342217

Pulled By: passy

fbshipit-source-id: 8e6fa9580ef42a69e709802edbbe85a163388425
2019-03-07 03:17:05 -08:00
Pascal Hartig
817c488220 Pin merge 1.2.1 (#393)
Summary:
This addresses [CVE-2018-16469](https://nvd.nist.gov/vuln/detail/CVE-2018-16469).
Pull Request resolved: https://github.com/facebook/flipper/pull/393

Reviewed By: danielbuechele

Differential Revision: D14342214

Pulled By: passy

fbshipit-source-id: fc5c7a552f413f54f31f3c2cfb12fd511ecbd35e
2019-03-07 03:17:05 -08:00
Pascal Hartig
83aee0cd75 Update create-plugin.md (#391)
Summary:
Remove a broken link and some outdated information
Pull Request resolved: https://github.com/facebook/flipper/pull/391

Reviewed By: danielbuechele

Differential Revision: D14342219

Pulled By: passy

fbshipit-source-id: ab915618fe2ad3f955c465c091a636f9ea19ba33
2019-03-07 03:12:09 -08:00
Pascal Hartig
c2cc17833e Typos and corrections for troubleshooting docs
Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/390

Reviewed By: danielbuechele

Differential Revision: D14342222

Pulled By: passy

fbshipit-source-id: 10509d3738a02136b378f6694c721fc72f0aeef0
2019-03-07 03:00:17 -08:00
Pritesh Nandgaonkar
04d2880b25 Bug fix when the selectedPlugin is Layout, and trace is imported
Summary:
Fixes a bug which happened when the selected plugin was layout and the flipper trace was imported. While importing the trace in the mentioned scenario, the redux store didn't used to get updated in the first render but got updated in the second render. Due to which the persisted state passed in the props was undefined. Look at the attached video to understand the bug.

BUG:

{F152642401}

Reviewed By: passy

Differential Revision: D14343465

fbshipit-source-id: 59110fd6ee5839f2e3944792e1c288d2388d3340
2019-03-06 09:30:23 -08:00
Mihaela Ogrezeanu
410b6a6043 Update Section hierarchy when child views change
Summary:
we only include in the inspector hierarchy the sections which are visible on screen. If as a result of a UI change the hierarchy of visible sections changes (for example when scrolling to a section that wasn't previously visible) this forces the section hierarchy to be recreated.
passy not sure if there's an easier way of making the children of a node invalidate, let me know if you have any suggestions
Depends on D14300298

Reviewed By: passy

Differential Revision: D14301404

fbshipit-source-id: 551e1910d0a80238027e32417aab8d42ed1c00b3
2019-03-06 07:51:52 -08:00
Mihaela Ogrezeanu
de43fd29c6 Enable searching for sections in flipper
Summary:
as title, enables section name matching in the flipper search bar
Depends on D14300283

Reviewed By: passy

Differential Revision: D14300298

fbshipit-source-id: 33caefccf04b833c8606a083a13f3bffea6c419d
2019-03-06 07:51:52 -08:00
Mihaela Ogrezeanu
a665a12aec DebugSectionDescriptor non-null data and attributes
Summary:
these are not nullable. returning a non-null value
Depends on D14300226

Reviewed By: passy

Differential Revision: D14300283

fbshipit-source-id: bbc37161d2e01d94998cb287377742d8c5952bd1
2019-03-06 07:51:52 -08:00
Nicolas Hauseux
54d51cc30a small typo correction in android import
Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/388

Differential Revision: D14341908

Pulled By: passy

fbshipit-source-id: dd5329c537311b37c4c39cf1dec4886f543a08d5
2019-03-06 07:30:24 -08:00
Daniel Büchele
b304126af3 Share Flipper file
Reviewed By: jknoxville

Differential Revision: D14340965

fbshipit-source-id: 9145ae8d409e9d4f8becfd1a19a8a9b3739af3fb
2019-03-06 05:54:21 -08:00
Daniel Büchele
c0a30380dc fix sidebar scrollbars
Summary: Only show scrollbars in sidebar when necessary.

Reviewed By: jknoxville, passy

Differential Revision: D14341446

fbshipit-source-id: e75f02b9de7796fc9ed8a42618ade3be015a1889
2019-03-06 05:50:14 -08:00
John Knox
fac138ded3 Use full emulator path when running it
Summary: This is required on linux or it isn't found. It's already done elsewhere this way.

Reviewed By: passy

Differential Revision: D14303606

fbshipit-source-id: 8b3fca776d43076cdc2f814de19b0b381350dcc9
2019-03-05 10:26:49 -08:00
Pritesh Nandgaonkar
d8a1a80338 Flipper Bump: v0.17.1-SNAPSHOT
Summary: As per the title

Reviewed By: danielbuechele

Differential Revision: D14269566

fbshipit-source-id: 94bf552aa654199efddc49d4077da30915c9d387
2019-03-05 06:28:26 -08:00
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