Commit Graph

461 Commits

Author SHA1 Message Date
John Knox
d73551a440 Add artificial crash button to sample app
Summary: Lets you test the crash reporter more easily

Reviewed By: passy

Differential Revision: D18830402

fbshipit-source-id: fca57a05f121ca4219aaaf4e2b8bfeca9b46a4a9
2019-12-05 06:45:33 -08:00
Rong Tang
83641ff05c Show Encoded Cache in Flipper Image plugins.
Summary: load encoded cache and pass to flipper to show.

Reviewed By: oprisnik, passy

Differential Revision: D18643671

fbshipit-source-id: 2df34e0f67ccc585834f02760a1e28079bcf4a6f
2019-11-28 04:30:02 -08:00
John Knox
91b1ebf2b8 Back out "Fix initHybrid app-crashing bug"
Summary: This was a failed attempt to fix invalid initialization, but just means it fails elsewhere, so undoing this change.

Reviewed By: passy

Differential Revision: D18685054

fbshipit-source-id: fc460ee7cacc8cb89ee2a22243f9738383cbba43
2019-11-26 05:30:33 -08:00
John Knox
554037d444 Don't allow initialization when not in supported build
Summary:
If something calls FlipperClient.getInstance(), it will start a new thread and try to start the client. If this is in a context that will fail, like a process that hasn't loaded the .so, then it will fail, but we don't know who started the thread. This adds logging before spawning a new thread so we can see the stack trace of the culprit.

It might want to throw an error instead, that will help track down the culprit of such initializations, but this is a less intrusive change to just stop the failures from happening, to start with.

Reviewed By: cekkaewnumchai

Differential Revision: D18658972

fbshipit-source-id: 2433d4d6ef411d4fb28f31e27bcef702c5a8f4db
2019-11-23 18:21:21 -08:00
John Knox
4faac01448 Fix initHybrid app-crashing bug
Summary: We're seeing some cases of initHybrid failing when the C++ class hasn't been registered. I don't think we should be attempting to init in these cases, so gating it by the same logic as when we load the static library.

Reviewed By: priteshrnandgaonkar

Differential Revision: D18658101

fbshipit-source-id: b29592135dcf637a8c0d40aee30e383f4f35e527
2019-11-22 10:52:02 -08:00
Pascal Hartig
2854b57c74 Fix release build
Summary:
Well, now I feel dumb. That should have definitely been caught earlier.
I'll set up a CI job to verify this.

Fixes https://github.com/facebook/flipper/issues/648

Reviewed By: jknoxville

Differential Revision: D18657185

fbshipit-source-id: 5fea08103f5a4292159b519d62d84800c0444e41
2019-11-22 07:02:49 -08:00
Pascal Hartig
3b04d44bd3 Add missing license header
Summary: Failing OSS check because of this right now.

Reviewed By: cekkaewnumchai

Differential Revision: D18638744

fbshipit-source-id: 1e5076f69a40f7dea87078c346e85f1797de42aa
2019-11-21 08:41:33 -08:00
Mihaela Ogrezeanu
4d324075e9 Show caller stack trace
Summary: On Android, the stack trace looks different so we don't need to use the Regex we use on iOS. We can simply display all the lines in the trace.

Reviewed By: pasqualeanatriello

Differential Revision: D17181400

fbshipit-source-id: e471da17b89806a161edc7edcf05ac6faed44bf0
2019-11-19 10:28:18 -08:00
Sara Valderrama
353cfeafc8 update accessibility hierarchy to treat lithoViews and LithoRecyclerViews as ViewGroups
Summary: This will correctly show all view children instead of reverting to the non-ax default behavior. Fixes bug where recycler views showed no children.

Reviewed By: jknoxville

Differential Revision: D18574220

fbshipit-source-id: f22606fb582e0bfd1a171dc4497e1d1613e800d1
2019-11-19 10:04:10 -08:00
Sara Valderrama
19df98e525 update accessibility hierarchy to show class names
Summary: Show the simple name instead of the node info class since this is taken into account for the attributes.

Reviewed By: jknoxville

Differential Revision: D18574219

fbshipit-source-id: 4b134e8be18c313e08df423dcdbe286d96c80b56
2019-11-19 10:04:10 -08:00
John Knox
f0de600492 Fix wording of network request buttons
Summary: I don't know why we left this for so long, it doesn't make a good first impression.

Reviewed By: mweststrate

Differential Revision: D18348908

fbshipit-source-id: b8b0e5fe8f6ab81281d6ea1a1299ebdaaf0b9c43
2019-11-06 08:04:12 -08:00
Pascal Hartig
2446e82dc6 Bump AndroidX
Summary: It's not just JS dependencies!

Reviewed By: jknoxville

Differential Revision: D18346576

fbshipit-source-id: b2c383424335c74c68a48f3d93614168ef26a0c4
2019-11-06 03:43:49 -08:00
Zhang Qichuan
7e8dc28b2f Added margins to the texts on the demo app (#621)
Summary:
![screencap-2019-10-31T060952 432Z](https://user-images.githubusercontent.com/410850/67923337-842c7000-fbe8-11e9-86f4-92b183d11d9c.png)

There is no spacing between the texts on the demo app and I found them difficult to click. So I decided to add some margins to make them more thumb-friendly :)

## Changelog

Make demo app more thumb-friendly
Pull Request resolved: https://github.com/facebook/flipper/pull/621

Test Plan: N/A

Reviewed By: jknoxville

Differential Revision: D18245979

Pulled By: priteshrnandgaonkar

fbshipit-source-id: 9c99a477c4100323144518f56369a42085589f77
2019-10-31 09:44:47 -07:00
Pascal Hartig
ef4defe56f Fix android sample buck build
Summary:
This was removed because it's implicitly required by the library now.
However, Buck doesn't pick this up by default and requires further
configuration. It's easiest just to declare this twice now.

Reviewed By: jknoxville

Differential Revision: D18202459

fbshipit-source-id: 48c6a91c2fca0d932950a81c092b78b90a24c27b
2019-10-29 10:23:05 -07:00
Michael Evans
cc19cc75ee Move declaration of required permissions into core lib (#593)
Summary:
If we move the permissions into the library itself, the manifest
merger will take care of adding them to consuming applications,
making setup instructions easier.

## Changelog

Move required permission declarations into flipper-core
Pull Request resolved: https://github.com/facebook/flipper/pull/593

Test Plan:
Using aapt we can dump the permissions of a sample app.
`$ANDROID_HOME/build-tools/29.0.2/aapt d permissions sample-debug.apk `
```
package: com.facebook.flipper.sample
uses-permission: name='android.permission.WRITE_EXTERNAL_STORAGE'
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.ACCESS_WIFI_STATE'
uses-permission: name='android.permission.READ_EXTERNAL_STORAGE'
uses-permission: name='android.permission.FOREGROUND_SERVICE
```

Reviewed By: priteshrnandgaonkar

Differential Revision: D18006323

Pulled By: passy

fbshipit-source-id: c4cf28ee698faa3e2b631462f2953976135b299c
2019-10-18 06:43:35 -07:00
Pascal Hartig
182b4e1b1f Set stricter limit for body payloads
Summary:
Base64 encoding can easily cause OOMs for large payloads.

In the long-term, it would be great to have a way of streaming these
responses so we don't allocate 50MB chunks of memory at once.

Reviewed By: jknoxville

Differential Revision: D17951353

fbshipit-source-id: a5d7b8242892518590ac95c1d9751f24d20dc40e
2019-10-16 09:29:52 -07:00
Pascal Hartig
9e96f0c7c2 Remove closed task references
Summary: No longer relevant.

Reviewed By: jknoxville

Differential Revision: D17951216

fbshipit-source-id: 2ef2a97c594af7cf9c134555779765872cfa0eb4
2019-10-16 08:08:23 -07:00
Andres Suarez
54ebb44dda Tidy up Flipper license headers [2/2]
Reviewed By: passy

Differential Revision: D17863710

fbshipit-source-id: 5b249bdd1c06d3a526b250b035b797d0c8e796eb
2019-10-11 13:46:45 -07:00
Andres Suarez
0675dd924d Tidy up Flipper license headers [1/2]
Reviewed By: passy

Differential Revision: D17863711

fbshipit-source-id: 259dc77826fb803ff1b88c88529d7f679d3b74d8
2019-10-11 13:46:45 -07:00
s1rius
86eb24b02c Work with custom SharedPreferences implementation (#571)
Summary:
see https://github.com/facebook/flipper/issues/450
If we want to control a custom SharedPreferences, we can create a Class as SharedPreferencesDescriptor's Subclass, override the getSharedPreferences() function to return a custom SharedPreferences instance.

## Changelog
add getSharedPreferences() function in SharedPreferencesDescriptor Class
Pull Request resolved: https://github.com/facebook/flipper/pull/571

Test Plan: No

Reviewed By: jknoxville

Differential Revision: D17738675

Pulled By: passy

fbshipit-source-id: d227e7d6461194f7a01ae7b2ba53434dd71fc0d2
2019-10-08 01:51:21 -07:00
Pascal Hartig
975b52d26b Build with static libc++
Summary:
This avoids having to perform gymnastics like in
https://github.com/facebook/react-native/pull/26697

Reviewed By: jknoxville

Differential Revision: D17735954

fbshipit-source-id: 507548aab89309beeb228b104a24af8acd10ce9a
2019-10-03 04:39:20 -07:00
Chaiwat Ekkaewnumchai
053cfc09f3 Make LeakCanary a Separate Plugin
Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/559

Reviewed By: passy

Differential Revision: D17546936

fbshipit-source-id: dce128a771b73e8b18dfc2b78ee99502c3f1ce86
2019-09-25 03:05:56 -07:00
Pascal Hartig
8c519abc7e Upgrade to fbjni 0.2.0 (#557)
Summary:
This is now published to Maven Central and doesn't require a
separate repository.
Pull Request resolved: https://github.com/facebook/flipper/pull/557

Test Plan: CI

Reviewed By: danielbuechele

Differential Revision: D17526448

Pulled By: passy

fbshipit-source-id: 169b5bc5f6568d40697e5e48a9873f8a64bd5e00
2019-09-23 08:14:08 -07:00
Pascal Hartig
b041da6d61 Move litho plugin tests
Summary:
I missed these. :(

Open source CI is unhappy about this - for good reasons.

Reviewed By: jknoxville

Differential Revision: D17500071

fbshipit-source-id: 96106f660dee59985c51e2635321ab4ad00a795a
2019-09-20 10:24:38 -07:00
Pascal Hartig
1ab47f9ca8 Set up Maven distribution for new plugins
Summary:
Setting up the necessary metadata to publish the separate plugins
to Maven/Bintray.

Reviewed By: danielbuechele

Differential Revision: D17480263

fbshipit-source-id: 1772cee5b3744ce52fc6e2510a27cb7f500e72bf
2019-09-20 06:07:42 -07:00
Pascal Hartig
2baadf9867 Make litho/sections a separate plugin
Summary:
Breaking Litho/Sections off. Doesn't really make sense to have
two deps for this especially since they're pretty tightly coupled.

This makes our core already quite slim.

Reviewed By: jknoxville

Differential Revision: D17420118

fbshipit-source-id: 9a03911f4af6410745b9aefd0e6a75bdf106660f
2019-09-19 03:02:51 -07:00
Pascal Hartig
c4a9b603e2 Make network a separate plugin
Summary: Per title.

Reviewed By: jknoxville

Differential Revision: D17419678

fbshipit-source-id: aee00f077b7ed955c60884853dc1128d27366ee8
2019-09-19 03:02:51 -07:00
Pascal Hartig
7ac82bec4e Make fresco a stand-alone gradle project (#548)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/548

First project to pull out of the "fat distribution" we currently have.
Still needs setup for Maven and registration in Bintray.

Reviewed By: jknoxville

Differential Revision: D17395660

fbshipit-source-id: 6244495a2e25d705dd930ef87c7e5e1f038eb921
2019-09-19 03:02:51 -07:00
Pascal Hartig
0298ae74d0 Disable openssl in libevent by default
Summary: It's getting really tedious to turn these off one by one.

Reviewed By: jknoxville

Differential Revision: D17366198

fbshipit-source-id: 25443d7a18c81cd18edea21d75cfa70e4fbf4171
2019-09-13 08:56:41 -07:00
Pascal Hartig
b3a41bd38d Fix RSocket build.gradle
Summary: This got really badly mauled by a codemod I reckon.

Reviewed By: jknoxville

Differential Revision: D17366199

fbshipit-source-id: 6f1863e5e3d3ed26753723cf666b70655601a8de
2019-09-13 08:56:41 -07:00
Pascal Hartig
23eaa74a85 Disable openssl for folly libevent builds too
Summary:
This has been tripping up the release builds, luckily caught by
Circle: https://circleci.com/gh/facebook/flipper/1480

Reviewed By: jknoxville

Differential Revision: D17282130

fbshipit-source-id: a17adb18bc75e4fa5d645a062343622167785fa6
2019-09-10 07:33:36 -07:00
Mihaela Ogrezeanu
fc2b8db8cf Show full event name in sidebar
Summary: Show info about the event which triggered a new changeset generation; in case of a state update, also show the name of the method which triggered the state update.

Reviewed By: pasqualeanatriello

Differential Revision: D17162202

fbshipit-source-id: ebf218f8ce71799e4dd452f54b1621af7f83cc51
2019-09-10 06:56:41 -07:00
Mihaela Ogrezeanu
0c307b7c27 Use state update attribution
Summary: Use the string sent from the client to show which section triggered a state update.

Reviewed By: pasqualeanatriello

Differential Revision: D17162190

fbshipit-source-id: a72eea1c6fc0fba851028aa050f0c6772a590e8d
2019-09-10 06:56:41 -07:00
Mihaela Ogrezeanu
e05a3bdeca Add state update attribution
Summary:
Show the section which triggered the state update in the tree hierarchy.
We can't use the attribution param that was being passed from SectionTree because it contains the key of the section, not the global key.

Reviewed By: pasqualeanatriello

Differential Revision: D17161730

fbshipit-source-id: bae5e509c378ffdf210acac6564212c873c5855b
2019-09-10 06:56:40 -07:00
Benjamin Elo
a90422bf2f Added additional parameters for logging
Summary:
The navigation plugin supports logging of a date and the class name. This addition adds that support.

I have kept the previoius method which I will remove once  I update the fb4a navigation plugin integration.

Reviewed By: danielbuechele

Differential Revision: D17202996

fbshipit-source-id: eac95328a6e2278c3a27ca608b9b675c8efe4528
2019-09-05 05:59:55 -07:00
Pascal Hartig
e6e070684c Fix x86_64 / upgrade libevent (#538)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/538

Upgrades libevent to the August release 2.1.11.

Some notable things:

- The CMake file they ship with is actually broken. It contains a reference to an "uninstall.cmake" script that they don't include in the archive.
- There is some git magic in the CMake script which throws very annoying warnings if you're not in a git repository and if you are, it's still super useless because it assumes it's the libevent repo.
- I've removed the uninstall reference and replaced version detection magic with hardcoded values. The result is the "CMakeLists.txt" in the overrides folder. For future upgraders: You'll have to either remove the override or apply similar steps to the next release.
- The `event-config.h` is simply one of the outputs I found under `android/build/libevent/x86/include/event2/event-config.h`. They seem to be stable across architectures so it's easier to just copy it over than to fix the CMake logic that should actually pick it up from the Android build path.
- The cmake target names have changed and have an underscore in them, now.
- Verified with an SDK 28 x86_64 that this does fix https://github.com/facebook/flipper/issues/482.

Fixes GH482.

Reviewed By: jknoxville

Differential Revision: D17164731

fbshipit-source-id: 642744118065bea2674dbb0e1af91a11598066cc
2019-09-04 04:44:50 -07:00
Pascal Hartig
3dfd9a92e4 Upgrade folly (#533)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/533

Bumping to the most recent version.

Reviewed By: jknoxville

Differential Revision: D17161724

fbshipit-source-id: 26bf94d83f5b9d31ef755b4bb0b36c18c4184696
2019-09-04 04:44:49 -07:00
Pascal Hartig
4544c4fff1 Remove vendored copy of fbjni (#530)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/530

Use the pre-release of fbjni instead of our bundled copy. I hope this can be made a little less awkward, but it works for now.

Reviewed By: jknoxville

Differential Revision: D16988077

fbshipit-source-id: 936e414f9b2bf82ccb54b107228d79d01acdbf14
2019-09-03 06:06:15 -07:00
Mihaela Ogrezeanu
f716c34295 Show prev and next data for a SingleComponentSection
Summary: The SingleComponentSection doesn't store anything in the data field unless it's set manually by the dev; this adds custom info about the prev and next data so we can use it for debugging

Reviewed By: pasqualeanatriello

Differential Revision: D17112284

fbshipit-source-id: 55aa49583e3bc7d046661d34841b7c3283972d76
2019-08-30 05:44:58 -07:00
Ron Edelstein
0f503f40ac Apply java formatting
Reviewed By: zertosh

Differential Revision: D17006136

fbshipit-source-id: 356442170cee830f4794bff456a6d2162f45d6b3
2019-08-24 20:33:38 -07:00
Sara Valderrama
8699d62b47 fix isTalkbackFocusable evaluation utils for flipper plugins
Summary: utils used by redblock and layout plugins were incorrectly checking node instead of childNode for listviews that have non-visible children

Reviewed By: nscoding

Differential Revision: D16897804

fbshipit-source-id: 8f62956c57568694db76030377552e43ce3a9216
2019-08-20 10:40:38 -07:00
Benjamin Elo
8f6740bb01 Open source version of Navigation Plugin
Summary:
Here I have an early version of the Navigation Plugin (Android) for Open Source.

A lot of apps will be using there own Navigation framework for handling deep links. In order to keep things as simple as possible, recording navigation events is done through a single function that can be called from anywhere in the app. This will allow users to place this function in there own navigation frameworks and use there own logic with it.

Seperately, I have shown how this can be used with our Android sample app. I use the built in Android intent-filters to provide a demo of how this can potentially be used, and to form the basis of the docs that I will write.

Reviewed By: passy, danielbuechele

Differential Revision: D16828049

fbshipit-source-id: 22765f63ca0c471689d2ec5865fdfc155b92697f
2019-08-16 07:15:56 -07:00
Pascal Hartig
2fac83420b Prepare for Litho annotation removal
Summary:
Without this, our build will break with the next Litho release
because the `DoNotStrip` annotation will no longer be exported
as part of `litho-annotations`.

Reviewed By: jknoxville

Differential Revision: D16828144

fbshipit-source-id: f9a78b331678882025732498f18a3443d148ef4d
2019-08-15 08:50:13 -07:00
Pritesh Nandgaonkar
53c1eee641 Change the implementation of fresco plugin on android
Summary: This updates the implementation of the export of the fresco plugin on the android side. Initially we used to send all the images info in one call, but its not scalable, as the images increase, the payload size of the rsocket can increase which will lead rsocket to drop messages. This diff updates the implementation of android side to match the one on the iOS side.

Reviewed By: passy

Differential Revision: D16627823

fbshipit-source-id: 563bf5fb20595c198b6447bb4e41f04af6e46644
2019-08-08 09:16:41 -07:00
Chun-Ho Ng
fe56c8471c Frontend improvements for Databases plugin
Summary:
Specs here: https://fb.quip.com/aPPOAWMraRMT

Screenshots:
https://pxl.cl/Gngf
https://pxl.cl/Gngg
https://pxl.cl/Gngd
https://pxl.cl/GxQr
https://pxl.cl/Gngh
https://pxl.cl/Gngk
https://pxl.cl/Gngl
https://pxl.cl/Gngm

Reviewed By: quanturium

Differential Revision: D16266093

fbshipit-source-id: a5408b974875dcabcbd6055ccbb2818d0c1b25f6
2019-08-07 21:09:49 -07:00
Sara Valderrama
f591475f85 A few mini-fixes for the accessibility layout inspector
Summary:
- fix mutual selection of elements in ax and non-ax tree (simplifies linkedNode logic as well)
- remove unneeded extraInfo attributes (focused, nonAXwithAXchild, & hasAXNode were not/no longer being used)
- use 50/50 fixed width view for trees when both are visible

Reviewed By: jknoxville

Differential Revision: D16390355

fbshipit-source-id: bbf9ea887f8f1035df8b4b0562ddcc4de291f004
2019-08-01 22:03:26 -07:00
Sara Valderrama
a646c4e2ff Update talkback output in flipper accessibility utils for password fields
Summary: Talkback prepends "password" on focus for password editText outputs. Flipper's AccessibilityUtil should include this case.

Reviewed By: blavalla

Differential Revision: D16427345

fbshipit-source-id: 28afdd196973539618b73824671ef02128a4e9ab
2019-07-23 11:29:22 -07:00
Mihaela Ogrezeanu
11198e003e Display data model in side panel
Summary:
This displays the data models passed to the Sections in the side panel when a data node is clicked. This does not change the collapse behaviour when a Section node is clicked.
To make it easier to associate a section with its changesets, appended the global indexes a Section is responsible for to the node label.

Reviewed By: passy

Differential Revision: D16283820

fbshipit-source-id: f1149f47dff448de05d919f7f8d16a2aba53bbb0
2019-07-17 06:29:22 -07:00
Mihaela Ogrezeanu
9c96545bbd Add Flipper plugin to Litho's sample apps
Summary: Add plugin to sample app.

Reviewed By: marco-cova

Differential Revision: D16181876

fbshipit-source-id: fe60fa9f593c16cb24d6901c98b6392a05c6d837
2019-07-16 10:57:24 -07:00
Mihaela Ogrezeanu
474cc1289e Add data model to tree and colour changeset operation
Summary:
This colours data model nodes in the tree to show how they were part of the current changeset: whether the data model caused an insert, update, remove etc.
This also adds phantom Section nodes for Sections that were completely removed from the tree; this is helpful for debugging cases where a section's key changes without intention, causing items to be completely removed and inserted.

Reviewed By: topwu

Differential Revision: D16165767

fbshipit-source-id: a011666dce33e4d757fb415e71ba163aa334f6e6
2019-07-11 09:56:18 -07:00