Summary:
This diff adds the Java classes that serialize to the data expected by the new timeline widget. See D23865369 for the JS counterpart.
Currently the Flipper plugin uses `toString` to get the wire values. I'm not feeling like using a json library or dealing with JSONObject's nonsense, so these are rolled manually for now.
Reviewed By: astreet
Differential Revision: D24254377
fbshipit-source-id: b2fc00400c40b47ac29c9b83c0b66621c3677974
Summary:
The current ownership and release model prevents cleanly releasing new versions of the plugin while the code is split between two repos.
This diff moves the flipper-litho plugin to the Litho repository. You'll find new releases as `litho-editor-flipper` that'll be reexported via gradle's `api` to the old artifact.
Reviewed By: colriot
Differential Revision: D23962234
fbshipit-source-id: 7884423342904219ae9b41632c6df90cda870798
Summary: FlipperEditor has migrated to `litho-editor-flipper`, so this diff fixes the dependency tree and deletes the file.
Reviewed By: muraziz
Differential Revision: D23380023
fbshipit-source-id: 75f5f037dc392194212fc156499f090c381999bd
Summary: jknoxville helped me debug this. The underlying problem was that we didn't include a dependency which is transitive in gradle land. We swallowed the exception and just returned an empty list. I left an error log in there to make future debugging easier. For reference, this was the error:
Reviewed By: cekkaewnumchai
Differential Revision: D23759727
fbshipit-source-id: 244510d2765913bf4c89458e336889c3c6838fc4
Summary:
Adds a link to the Yoga playground atop all properties of Yoga-based views.
We could make the playground match the properties below if I figure out the hashing mechanism the website uses. This is a start.
Reviewed By: muraziz
Differential Revision: D23758538
fbshipit-source-id: 6a3f206914aa9962e55852df548f8026783506e9
Summary: This broke DB opening in FB apps. Will try to fix and reland this, but need to unblock people first.
Reviewed By: cekkaewnumchai
Differential Revision: D23705962
fbshipit-source-id: 3c9ff3a74e5a6d34e6cb2c75e7e2cec749b5a60e
Summary:
This change will allow to use various SQLiteDatabase implementations: standard Android implementation, [requery/sqlite-android](https://github.com/requery/sqlite-android) and so on. See issue https://github.com/facebook/flipper/issues/1183
## Changelog
Android Databases Plugin: `SqliteDatabaseConnectionProvider` returns `SupportSQLiteDatabase` instead of `SQLiteDatabase`.
Pull Request resolved: https://github.com/facebook/flipper/pull/1196
Test Plan: Check that Databases Plugin shows correct data on the sample Android application.
Reviewed By: mweststrate
Differential Revision: D23294272
Pulled By: passy
fbshipit-source-id: c07ebeb869ab01d41281f75541cbb3411f0ebae0
Summary:
The function `setLayoutParams` expects the values to be set to be at array position 0+, and they were on position 1+ instead.
This effectively prevented users from setting LayoutParameters.
Reviewed By: muraziz
Differential Revision: D23538531
fbshipit-source-id: cc828363ee8d7408d1df29d98c37b09893826bb1
Summary: This diff uses the new picker defined in EnumMapping for regular Android View properties.
Reviewed By: muraziz
Differential Revision: D23538532
fbshipit-source-id: be5b776453e7322fb13a5f9e6a66a1f8d1243e79
Summary: This diff makes EnumMapping compatible with the new Layout widget "picker"
Reviewed By: muraziz
Differential Revision: D23538548
fbshipit-source-id: 7bdb01648c1ad5e2d0d7594c98df5ed89d893702
Summary: Detect if resolved path is properly computed and accordingly display a success or error notification within InAppErrorReporter.
Reviewed By: arpitratan
Differential Revision: D23425001
fbshipit-source-id: 4ca903a8b9e83dc0e11bb823537f56678dd85b76
Summary: This change removes the dependency of FlipperEditor from AndroidX, which prevents it from moving to the Litho repository
Reviewed By: Andrey-Mishanin
Differential Revision: D23475867
fbshipit-source-id: a330c676859ed9ce9a0ab186dd206310d2eccca5
Summary:
The default max body size for the OkHttpInterceptor that is reported to Flipper seems unreasonably small, as most images, graphql responses etc are bigger. Increased it to 1MB
Since the network plugin doesn't do any work if it is not explicitly enabled in Flipper, this should not lead to further performance regression / starvation.
Reviewed By: jknoxville
Differential Revision: D23375720
fbshipit-source-id: e901105209aec7108d61fc20295a149c5582f22d
Summary:
Images in the network plugin are rarely displayed in the network plugin, as it tries to use the public url to preview it. However, that won't if the endpoint is behind authentication, idempotent, etc. This diff changes the behavior to instead send the network body to flipper and use that to preview.
Changelog: [Network] Fixed image preview
Reviewed By: jknoxville, passy
Differential Revision: D23370743
fbshipit-source-id: 0070e9e38c10a5761b9f7190467e26f01a7b2471
Summary:
Related diff [CK]: D23243009
This diff adds support for a protocol for layout messages where the type is recursively encoded as:
```
{
kind: "type",
data: ???
}
```
The meat of the diff is on FlipperEditor.java, SetDataOperations.java and InspectorFlipperPlugin.java. The others are there just for a change on an interface.
We check if the message adheres to the new encoding, otherwise we fall back to the old behavior. If it's the new encoding, the message is traversed recursively flattening the types to EditorValue using the type hints provided.
Reviewed By: muraziz
Differential Revision: D23243009
fbshipit-source-id: 0f313455885930f3beaaadb66f3bf394f109ea23
Summary: Adds support in Flipper for the picker widget. The way it reaches Flipper is a bit nasty, using `toString` to produce a JSON value.
Reviewed By: passy
Differential Revision: D23294091
fbshipit-source-id: e3398e6fb474e46bdaac1960aeaf57e201946413
Summary:
Just released a new version.
Pull Request resolved: https://github.com/facebook/flipper/pull/1428
Test Plan:
`./gradlew :android:installDebug`
However, I'm tethering right now and this is taking ages so I haven't
been able to complete this.
Reviewed By: mweststrate
Differential Revision: D23295098
Pulled By: passy
fbshipit-source-id: aa53fa1c47f0b02d2c8b9f12d66b1c600a37075b
Summary: See linked task, data larger than 5KB would always be reported as blob. Increased this limit to 100KB, since if the user is looking at this data, it is proactively requested so it is fine if it is larger
Reviewed By: jknoxville
Differential Revision: D23317197
fbshipit-source-id: f563a980fa9567ac7e2f950b83c1888a7b295d77
Summary: Useful for next diffs: enables to detect whether we have LithoComponent or CKComponent
Reviewed By: adityasharat
Differential Revision: D23128972
fbshipit-source-id: b9aef358c1426df4f05213c42e43402e8cae984f
Summary:
It's common for responses to be completely missing in the network inspector. This is because they are larger than can be serialized in one go on some devices, so we drop all messages larger than 1MB.
This changes the android client to send large responses in individually serialized batches. This way we avoid running out of memory and can still send arbitrarily large payloads.
Changelog: Android network inspector can now handle responses large than 1MB.
Reviewed By: passy
Differential Revision: D22999905
fbshipit-source-id: ff4eb8fa72a7e42ea90d12ffe0f20c6d1e58b7e5
Summary:
Populate class name for Litho Sections.
See D22922106 (86cafb9e80) for reference
Reviewed By: adityasharat
Differential Revision: D22949896
fbshipit-source-id: d804971708cf8c8466dd74eda3e750957dc95fc9
Summary: Populate class name for Litho Components.
Reviewed By: adityasharat
Differential Revision: D22922106
fbshipit-source-id: e18b748e0e0bd6f511558124a28b4b58d217ded7
Summary:
Added IDE menu functionalities.
Changed minor UX detail - for classes that cannot be opened user will always see 'Can't open' prompt.
Design: https://www.figma.com/file/M0l6qhQqzllIcefVE4tQvG/Error-Reporter-IDE-Selector?node-id=82%3A0
Reviewed By: arpitratan, adityasharat
Differential Revision: D22790328
fbshipit-source-id: 8dfbcf7408c53947909bcf3fa700dee7ae47e14a
Summary: Adds a toggle switch to show/hide disk cache images defaulting to inactive. The image data is only sent on the adb connection when the toggle is activated.
Reviewed By: defHLT
Differential Revision: D20002059
fbshipit-source-id: 05c9e515ffe09441e5cfb6f66eb14559ac4a322c
Summary:
This diff implements the integration between a Litho Editor and Flipper. It does so by converting the Editor format to FlipperObject, and then converting it back from FlipperDynamic.
This conversion works for both `State` and `Prop`. We already provide default implementations for primitive + wrapped types and String, so the functionality should match the existing one.
Reviewed By: passy, Katalune
Differential Revision: D22455220
fbshipit-source-id: f7f633765f3d997ce6de09d2c1277019e72c0802
Summary: Created buttons which enable opening in IDE for classes which are valid.
Reviewed By: adityasharat
Differential Revision: D22724496
fbshipit-source-id: 3532213ab7730aae5e61877ccfecd0558b329d57
Summary:
Created functionality which allows user to open clicked file from inAppErrorReporter.
Created "iface" interface for openInIDE API and created default implementation which indicates that openInIDE is not supported.
Created "impl" implementation specifically for fb4a.
Reviewed By: arpitratan
Differential Revision: D22642497
fbshipit-source-id: 7b3011c128a479e556b869fcc8c4147e153caf71
Summary: Created a communication between Layout Plugin and Flipper Desktop. The API allows users to open given file in a selected IDE. The openInIDE function returns true if the connection with Flipper is established, otherwise returns false.
Reviewed By: adityasharat
Differential Revision: D22625829
fbshipit-source-id: feaf186c107d62b1a75dfc6bbe2c1d66ffd7fd78
Summary:
I think it's somewhat common to have large containers that can hold future views, especially fragments. The problem is the presence of these containers can block the layout inspector's "target" mode.
I found out from cekkaewnumchai that Flipper does in fact return multiple results from the pick, but I think it could still be helpful to have this new tag since it is more convenient than having to do the secondary drill down each time.
Reviewed By: jknoxville
Differential Revision: D22284972
fbshipit-source-id: 1a2826ec746e4f31690db33ed72815ae168bffab
Summary:
Before this diff, `TouchOverlayView` would be an inner non-static class,so it'd be difficult to track memory ownership for it.
It also made `InspectorFlipperPlugin` longer and harder to read.
Reviewed By: cekkaewnumchai
Differential Revision: D22285744
fbshipit-source-id: 6fdd8c33a07be6ab900ebb28a8c3ebf3761fb598
Summary:
Fix for https://github.com/facebook/flipper/issues/1300
The weak refs were not being cleared in two cases:
- On config changes, isFinishing() would be false in onPause()
- When calling finish() from Activity.onCreate(), onPause() isn't guaranteed to be called.
## Changelog
Pull Request resolved: https://github.com/facebook/flipper/pull/1301
Reviewed By: mweststrate
Differential Revision: D22286182
Pulled By: passy
fbshipit-source-id: 948d1d9b2145b6526c0030cf537330409ff7f8c4
Summary: - add another activity where there are two component overlapping each other
Reviewed By: mweststrate
Differential Revision: D21040425
fbshipit-source-id: 5514b59140bbf6b726e6777191e1808be5ac5b6f
Summary: Similar to previous diff but for Litho component
Reviewed By: mweststrate
Differential Revision: D21040426
fbshipit-source-id: 32e997269bbda472917c8ff6f176d05cf502b9dc
Summary: Previously, descriptor stopped iteration (searching) as soon as it finds hit element. This diff changes so that it will always do complete search
Reviewed By: mweststrate
Differential Revision: D21040424
fbshipit-source-id: 9123c6382dcdfefd6df17a95d283f5123906df11
Summary:
- Add return parameter to `createTouch` method: stack of node. This reference will be used to retrieve the final tree structure to be sent back to desktop app.
- `Touch` now keeps every step in component tree (I have concerned for app performance here)
- Edit test to reflect changes
Note:
- `path` will also be returned to keep backward compatibility with older server (desktop) side
Reviewed By: adityasharat
Differential Revision: D21040429
fbshipit-source-id: 6c2b9792378bf08b19fbbda1d2381df8c357170c
Summary: This adds ability to iterate over FlipperObject before sending it to be processed on Flipper desktop
Reviewed By: mweststrate
Differential Revision: D21214901
fbshipit-source-id: a6186a42004f1afb70889a395b1df037447f9881
Summary: 512 is a pretty small blob length. Increasing it to 5120 and changing it to attempt to stringify UTF-8 if not ascii.
Reviewed By: jknoxville
Differential Revision: D21253132
fbshipit-source-id: 1cc9226b86a9b9ddfd73e29c8b0c04ac54b5b4b2
Summary:
Previously, requests were passed to process first in an interceptor, and it is responsibility of an interceptor to process requests for responses. In FlipperOkhttpInterceptor, we did read data from request body before processing it. This caused a bug when the network process itself wants to also read that data, but the stream has been closed because the interceptor has just read. The fix is to report request body after we have triggered network call so that we can just drop request body if we cannot read.
This diff tries to bring back the same functionality while not cause the bug to occur by cloning the content to be read by Flipper and using the same one for the request.
Reviewed By: jknoxville
Differential Revision: D21279679
fbshipit-source-id: 47f8b29a1896705d8d2d601661cd485db572d251
Summary: There's no existing API on the Flipper objects to get an arbitrary Java object, which we need in an inspector plugin we're building (`getDynamic` requires you to know what you want in the end).
Reviewed By: jknoxville
Differential Revision: D21223329
fbshipit-source-id: 29e9f8788be404cec44c6ddeb6b56b939b97b766
Summary:
This enables the feature which showed the theme information in the layout plugin. It was disabled due to the OOM which occurred while exporting flipper trace. The OOM happened when we tried to serialise the whole layout hierarchy and the amount of info added per node by the theme info was quite heavy. Thus removing it solved the OOM problem at that point, but its not the correct solution.
The problem is that each node has too much information and sending it at one stretch is very heavy and causes OOM. So instead of sending it at one stretch, I have broken it into multiple calls at each level of the tree. This no longer causes OOM and we will be able to show theme information too.
Also for iOS we don't have AXNodes call or AXRoot feature implemented, so anyway I had to put a check to not make those calls, so instead I have kept the feature of fetching all nodes on the iOS instead, as there has been no problem on the iOS side with regards to the OOM. But I am indifferent, the same logic will work for iOS too, it might increase the time to export.
issue discussed [here](https://fb.workplace.com/groups/flippersupport/permalink/854729375007722/)
Reviewed By: jknoxville
Differential Revision: D21136057
fbshipit-source-id: becd237a6d53c50af082597f2e8ed790c25cb966
Summary:
Original Issue: https://github.com/facebook/flipper/issues/993
The exception occurs when OkHttp and we try to read request body twice, while it can be only read once.
Hence, we will read request body after it is processed by OkHttp.
Tradeoff for this is requests on Flipper will not appear immediately after fired, but they will appear together with their responses.
There are ways we can get rid of the tradeoff. For example, as demonstrated in D21167308, OkHttp ^3.14.0 contains method `isOneShot`, which can be used to check if we can read request body more than once. Another example is to change server side to accept nullable variable so that we can send request body and others separately.
Reviewed By: passy
Differential Revision: D21175341
fbshipit-source-id: 053789a2c2f28cd8149ea1bb36fd0cfe1c668df7