Commit Graph

105 Commits

Author SHA1 Message Date
Luke De Feo
cffe42a93a Litho state support
Reviewed By: lblasa

Differential Revision: D41581347

fbshipit-source-id: 262670053c586676be4f9465854ec79f95699d33
2022-11-29 08:54:58 -08:00
Lorenzo Blasa
76b1673d15 Basic array support
Summary:
Attributes Inspector didn't have support for inspectable arrays.

This change addresses an issue with the inspectable itself and adds basic support to it in the visualiser.

Reviewed By: LukeDefeo

Differential Revision: D41522879

fbshipit-source-id: f9cad42470541039c8157477b0fe9bc58f18f1ba
2022-11-28 10:19:20 -08:00
Luke De Feo
7ec09b4f95 Shift fetching litho attributes to background thread
Summary: Due to litho component instances being immutable we are able to process them later if we hold on to the instance. We have added a Maybe deferred type which sort of resembles a Monad. It wraps a value which may or may not be calculated later.

Reviewed By: lblasa

Differential Revision: D41474251

fbshipit-source-id: 2ba6e688518dba55cf4aa5ba53f390a92cf0921f
2022-11-23 03:45:26 -08:00
Lorenzo Blasa
5b3e110821 Remove Enumeration type
Summary:
Enumeration used to be a type containing a single property value of type string.

The InspectableEnum is a type that had an Enumeration value and possible values.

As we removed possible values from the enum value, this structure no longer serves its purpose.

Reviewed By: antonk52

Differential Revision: D41400874

fbshipit-source-id: e5c2d1e15ee9b3074ddd69f75ee9b8150d44379f
2022-11-21 05:30:18 -08:00
Lorenzo Blasa
6268c7b455 Litho margins
Summary:
Litho margins/padding/borders have the following attributes:

- left, top, right, bottom
- horizontal, vertical
- all
- start, end

This change processes these attributes and creates a SpaceBox inspectable which enables the margin visualiser in Flipper Desktop.

Reviewed By: LukeDefeo

Differential Revision: D41375299

fbshipit-source-id: be8bac1819f2b17c2fd1b1b86678aa0559278609
2022-11-18 02:34:33 -08:00
Lorenzo Blasa
0ac8c2a6b3 Migrate enum possible values to metadata
Summary:
Before this change, possible values for an enumeration were embedded within the attribute value itself.

After this change, possible values are located within the attribute metadata.

Reviewed By: LukeDefeo

Differential Revision: D41337003

fbshipit-source-id: cef5654a679e9b961e82993abb201b518fcbcd00
2022-11-17 04:42:22 -08:00
Luke De Feo
0ebedc9c49 Add Id to node descriptor interface
Summary:
There were 2 situations where the UI hadn't changed but we were sending a nodes with a different Id accross traversals which confuses things on the desktop

1. By removing the litho observer we are repeatidly scanning the entire hierachy on scroll or when a video plays. The debug component that represents litho views are not stable, they are generated each time even if the underlying component is the same
2. Offset child is generated by us each time and the old id refered to the generated offset child not the underlying object

This diff addresses these 2 cases by allowing a descriptor to choose the ID.

The nodeId convience method was used in a lot of places. For the places where the id ended up in the protocol we have migrated to the descriptors getID. In some other places it is only used internally or for logging.  In this case I have renamed the method and changed the return type from Id to int so it cant be accidently used in the protocol

Reviewed By: lblasa

Differential Revision: D41307239

fbshipit-source-id: 655b230180a6d02d66888e86b2293eead3385455
2022-11-16 10:38:23 -08:00
Luke De Feo
53c15b2e59 Remove litho observer
Summary:
There seem to be a number of issues with registering to all changes properly for litho observer.

Removing it and allowing the decor view to do a full traversal fixes a number of problems. The performance with hardware rendering seems to be fine. This should be  stopgap untill we tackle time travel properly

Reviewed By: lblasa

Differential Revision: D41304501

fbshipit-source-id: 5b7cdbd0dac04ba0dbf8dd5e449c99f0db4d0863
2022-11-16 10:38:23 -08:00
Luke De Feo
1398e2aa8a Make node bounds mandatory in protocol
Summary: This makes life on the desktop easier as 99% of the time bounds were there but we were dealing with non sensical non null branches.

Reviewed By: lblasa

Differential Revision: D41218325

fbshipit-source-id: e490d3775720c1c55dcb8f4a2a85520294f5e2a9
2022-11-14 07:05:58 -08:00
Lorenzo Blasa
7ae0eac13a Litho Props
Summary:
This diff adds support for layout and component props from Litho.

Notes:
- Each component could register a descriptor for itself.

Reviewed By: LukeDefeo

Differential Revision: D40680095

fbshipit-source-id: 57c78a199db58e05dd6dac4ed32ff6a869a73b0a
2022-11-11 04:49:02 -08:00
Lorenzo Blasa
f33e3fc78b Add qualified name to Node
Summary:
Our descriptors currently have a method to return the name as it will be displayed on the elements hierarchy.

However, it doesn't provide enough context if the name is to be used to discover the type in our code base.

This change adds a qualified name method that can provide a more complete name which can indeed be used by the Open In IDE functionality, for example.

Reviewed By: passy

Differential Revision: D40936785

fbshipit-source-id: 790ae02b9ebf37501765c52a24307fcaaaf9c14d
2022-11-11 03:22:39 -08:00
Lorenzo Blasa
01dc22b1ab Attributes Metadata
Summary:
Before this change, attributes and attribute metadata were intermingled and sent as one unit via subtree update event.

This represented a few issues:
- Repetitiveness. For each declared and dynamic attribute, metadata was included on each value unit.
- Metadata can vary in size and thus can have a negative impact on payload size.
- The attribute name which is part of metadata is a string which always overhead on processing.
- Metadata instantiation is not cheap thus this also incurs in processing overhead i.e. even instantiating a single string can have an impact.

The proposal is to separate metadata of attributes from the actual node reported attributes. This solves the problems mentioned above.

Reviewed By: LukeDefeo

Differential Revision: D40674156

fbshipit-source-id: 0788551849fbce53065f819ba503e7e4afc03cc0
2022-11-10 11:52:28 -08:00
Lorenzo Blasa
3598fb2cde Use correct bounds for litho debug components
Summary:
This change is a follow-up on Litho release:
https://central.sonatype.dev/artifact/com.facebook.litho/litho-widget-kotlin/0.44.0

This change ensures DebugComponent returns the correct Bounds.

Reviewed By: aigoncharov

Differential Revision: D40678191

fbshipit-source-id: 1d587efa114a9cd5c0b8162d219e93e3cbad282e
2022-10-28 04:58:52 -07:00
Luke De Feo
b1bee28f08 Coordinate update event when litho scrolls or is shifted
Summary: See doc comment for explanation

Reviewed By: lblasa

Differential Revision: D40587610

fbshipit-source-id: f0909440c4e6e3cc9f5c7b557198a93ba8809bd9
2022-10-25 07:10:38 -07:00
Luke De Feo
a447712865 Change Litho observer from on scroll changed listener to on draw listener
Summary:
There are some situatuins where a litho view can move  without a mount occuring in that view. One situation is a litho view in a recycler view. If a neighbouring view is deleted or changes its width/height this will shift the whole recycler view. Since each view in the recycler view is typically a separate comonent tree. The children of the recycler view are not aware of their siblings changes through mount. And these situations do not count as a scroll which was the previous method of detecting change.

This is a work around to listen to on draw which seems to be fired in all situations.

Reviewed By: lblasa

Differential Revision: D40430777

fbshipit-source-id: a9c8196f31a6bdfd4a2fed398cfcaed190972959
2022-10-25 07:10:38 -07:00
Luke De Feo
1aacc51d12 Use mount extension for litho integration
Summary:
Initial implementation of Litho extensions using mount extension. After mount is called on the main thread and we traverse the hierachy. In future we can use mount extensions to construct a sparse tree rather  than sending everything every time.

Scroll is handled with a native UI scroll listener for each litho view. This may break if the litho view is not a direct child of the scroll view.

Reviewed By: mihaelao

Differential Revision: D40021840

fbshipit-source-id: b09086a7a16660225885620609009dddf5b90d3b
2022-10-25 07:10:38 -07:00
Luke De Feo
a0d1013b94 Dont emit mounted drawables for litho
Summary: Getting the boxes to line up is quite hard to do right and has undetermined value

Reviewed By: mihaelao

Differential Revision: D40430776

fbshipit-source-id: 6093c4874f39ecf0c673407da2bd03ef06ca017e
2022-10-25 07:10:38 -07:00
Lorenzo Blasa
0572808f1a Add additional inspectables
Summary:
This change adds support for more inspectables and also introduces more complex types to be used as a value.

This become specially useful for more complex yet primitive types like coordinate, size, bounds, etc.

Reviewed By: LukeDefeo

Differential Revision: D40307885

fbshipit-source-id: 125e832f06d6b31f56eb5405182d1c0d61388930
2022-10-18 04:30:51 -07:00
Luke De Feo
b911c49667 Additional Litho descriptors
Summary: Moved to separate directory. These additional descriptors are useful for debugging the implementation but might not be useful for the end users so could potentially be removed down the road

Reviewed By: lblasa

Differential Revision: D40021834

fbshipit-source-id: f88c1186dd65cdabc816d5cd8256bb81c404a80c
2022-10-10 04:13:06 -07:00
Luke De Feo
221f7ac1e5 Generalised mounted object and descriptor into offset child
Summary: There are other situations where we want to overide the offset than for litho mounted views

Reviewed By: lblasa

Differential Revision: D40021833

fbshipit-source-id: 1411a4a67e88f6893bb38e36fb6a81eead3edd1a
2022-10-10 04:13:06 -07:00
Lorenzo Blasa
76d6350662 Set jvm flags and kotlin dependencies (#4177)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/4177

^

In an attempt to fix Github actions, may or may not work.

Reviewed By: aigoncharov

Differential Revision: D40074397

fbshipit-source-id: e88039c56876ca21657db4a6d872c46294a4f8c3
2022-10-05 04:30:17 -07:00
Lorenzo Blasa
433061d377 Take snapshot on subtree update
Summary:
DecorView owns a BitmapPool to take snapshots of the view. These snapshots are later on serialised by the manager.

There's a couple of unrelated changes in this diff but that were already in place making it hard to split.

(1) Renamed 'traverseAndSend' to 'processUpdate'. Why?

The observers as a whole shouldn't necessary know that their 'observation' is being sent to any place. Future changes should move the send logic altogether from the observer too. But that can be made within the scope of a different diff.

(2) There was a bug for nodes that were being observed but then unsubscribed from. If the nodes were being marked for observation and observer was already into place, these were not being told to subscribe again for changes.

Reviewed By: LukeDefeo

Differential Revision: D39812943

fbshipit-source-id: af98c5caf54e1c69f97043bae95049395a2e4545
2022-09-27 13:00:04 -07:00
Lorenzo Blasa
6f65517933 getSnapshot
Summary:
This change introduces a new Descriptor method to obtain snapshots of an item in the layout hierarchy.

Only implemented by the ViewDescritor but it can be potentially extended to Windows, Fragments, Activities, ...

Reviewed By: LukeDefeo

Differential Revision: D39690548

fbshipit-source-id: cf3a1ccd63eb28c1de328310e8635829a40964dd
2022-09-26 06:03:49 -07:00
Jacy
5b794dc28f Fix: [Android] Flipper Leakcanary plugin's OnHeapAnalyzedListener has been deprecated (#3923)
Summary:
Flipper Leakcanary plugin's OnHeapAnalyzedListener has been deprecated.

Flipper Leakcanary plugin's OnHeapAnalyzedListener has been deprecated change to EventListener implement.

## Changelog

1. add FlipperLeakEventListener.kt to implement EventListener.
2. update doc

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

Test Plan:
Setup the  Leakcanary plugin use FlipperLeakEventListener, test if it works.

**Static Docs Preview: flipper**
|[Full Site](https://our.intern.facebook.com/intern/staticdocs/eph/D39652084/V4/flipper/)|

|**Modified Pages**|

Reviewed By: antonk52

Differential Revision: D39652084

Pulled By: antonk52

fbshipit-source-id: 0afeb52dce6c1749a894a15dbb7921580c094ae6
2022-09-22 05:57:28 -07:00
Luke De Feo
9bc2f6fec5 Remove node Id from descriptor
Summary: It was always the system hash code and in many places it was inconvient to get the descriptor to just end up calling the same function

Reviewed By: lblasa

Differential Revision: D39700215

fbshipit-source-id: b1439d56cd8f39ba8735f933662ad79b87ffbdbe
2022-09-22 04:26:18 -07:00
Luke De Feo
ed662d2468 Fixed bounds for native views mounted by litho
Summary: We had an issue where the offset for a native view was effectively caclculated twice and summed, once by litho and once by android. Given the UI debugger expects a nodes bounds to be w.r.t its parent the android systems x,y offset is 'wrong' from ui debuggers perspective, we set it to 0,0 and rely on the calculated offsets by the litho component hierachy

Reviewed By: lblasa

Differential Revision: D39695663

fbshipit-source-id: d9c2be950fc68bc2286359a62746356e89299cfd
2022-09-22 04:26:18 -07:00
Luke De Feo
80b05092ac Add bounds and tags to descriptor
Summary: This is to support a future diff where we will draw a basic wireframe for debugging

Reviewed By: lblasa

Differential Revision: D39509407

fbshipit-source-id: d99fd6fe39404996a0ed944c10905331262fd0c6
2022-09-21 07:02:48 -07:00
Lorenzo Blasa
86364cbd40 Addresses fragments tracking and different bugs/warnings
Summary:
^

After this change lands, it is safe to remove most of the Stetho fragment support types.

Reviewed By: LukeDefeo

Differential Revision: D39460121

fbshipit-source-id: 0e7d4ce71e828ee7bc9c6e945b8fe27dbd6f08f8
2022-09-20 05:15:50 -07:00
Luke De Feo
2090120cda Descriptor clean up
Summary:
1. The base class descriptor was removed, this was given that we have chained descriptor there is no need for this anymore
2. The Base interface node descriptor no longer has a mutable list based api. You simply return a list. The mutable list based api was specifically to allow chaining and this quirk is isoltated to the chained descriptor
3. AbstractChainedDescriptor and ChainedDescriptor were merged

Reviewed By: lblasa

Differential Revision: D39496073

fbshipit-source-id: fb3ec629ec3b27f587bdbd0b323624a4bc4ebea3
2022-09-14 05:07:51 -07:00
Luke De Feo
4341cbdf3d Factor out common traversal code in observers
Summary: Each observer was doing a similar job of traversing, and setting up child observers and its easy to not clean up child observers in some cases. This provides a helper utility for the common use case

Reviewed By: lblasa

Differential Revision: D39466930

fbshipit-source-id: e74ae5c3709297b73c020cd148a0485ac9fc0f8f
2022-09-13 11:05:42 -07:00
Luke De Feo
0562178739 Basic Litho support
Summary: Added an initial litho Tree observer and descriptors, its quiet naive and will be improved in a future diff

Reviewed By: lblasa

Differential Revision: D39466931

fbshipit-source-id: 66a462882af2e585b9719ee2f61595449f99c5e5
2022-09-13 11:05:42 -07:00
Harshit Bangar
c88e769013 Prototype: Added support for multiple host in mock (#3762)
Summary:
Apps usually communicate with multiple hosts to support pops and data centres. The problem currently is that for each host we need a different config in the mock tab in flipper. If the host change due to failover then the mocking stops working. Added support to enter the URL without a host in the flipper. We then check if the Url from the actual network request contains the mock URL without a host.

We can change the hint on flipper UI to suggest either entering the complete URL or without the host to allow matching across multiple hosts.

Resolve:[3751](https://github.com/facebook/flipper/issues/3751)

Let me know if the approach looks good.

## Changelog

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

Reviewed By: lblasa

Differential Revision: D36780307

Pulled By: passy

fbshipit-source-id: 744898fa24d13343132e9a2165750241861245bd
2022-06-06 12:40:55 -07:00
Alexander Oprisnik
6960196d8e Don't report an error when Fresco is not initialized yet and Flipper queries data
Summary:
We shouldn't report an error when Flipper is querying data before Fresco is initialized.
This will be especially useful when we move to lazy Fresco initialization later this year.

Reviewed By: passy

Differential Revision: D33978177

fbshipit-source-id: dfb6cb1b73737adbb557ecb141b043d088b5a574
2022-02-03 08:48:32 -08:00
Harold Martin
cdb72db5a9 Fix LeakCanary plugin UI, Upgrade LC dependency and make it compile only (#3367)
Summary:
**Currently, the Leak Canary plugins is broken, see this screenshot (unable to expand):**
<img width="1359" alt="Screen Shot 2022-01-29 at 2 06 33 PM" src="https://user-images.githubusercontent.com/745166/151679662-9d8e8eb6-c19c-4008-9821-1c2c1af92351.png">

**This fix repairs and improves the UI:**
<img width="1350" alt="Screen Shot 2022-01-29 at 2 06 03 PM" src="https://user-images.githubusercontent.com/745166/151679677-7965604c-dd04-4ee5-bc8e-d53a82da1bd7.png">

## Changelog

- Fixes UI to enable showing leak trace
- Upgrades LackCanary dependency from 2.6 to 2.8.1
- Makes Kotlin and LC `compileOnly` dependencies in order to prevent conflict for the users
- Updates documentation

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

Test Plan:
See demo at https://github.com/hbmartin/leakcanary/tree/flipper-demo/leakcanary-android-sample

**Static Docs Preview: flipper**
|[Full Site](https://our.intern.facebook.com/intern/staticdocs/eph/D33915179/V3/flipper/)|

|**Modified Pages**|

Reviewed By: passy

Differential Revision: D33915179

Pulled By: cekkaewnumchai

fbshipit-source-id: 9698dba23ab475c8cd84e4c222dfc41712b05a1e
2022-02-03 01:37:28 -08:00
Andres Suarez
79023ee190 Update copyright headers from Facebook to Meta
Reviewed By: bhamodi

Differential Revision: D33331422

fbshipit-source-id: 016e8dcc0c0c7f1fc353a348b54fda0d5e2ddc01
2021-12-27 14:31:45 -08:00
Artem Kholodnyi
72b652fb87 Fix the observer effect in Images Flipper plugin (encoded cache)
Reviewed By: oprisnik

Differential Revision: D31897870

fbshipit-source-id: bdd70d1679029931339ee589c98114f51646cb68
2021-10-25 10:11:48 -07:00
Artem Kholodnyi
11e7bbf9cf Fix the observer effect in Images Flipper plugin
Reviewed By: oprisnik, wizh

Differential Revision: D31379424

fbshipit-source-id: 96040dd0d37442d80a660814bd356571d075aa2c
2021-10-12 09:15:53 -07:00
Omer Strulovich
1db39b8171 Enable and apply Ktfmt to xplat/simplesql, xplat/sonar, and xplat/spectrum
Summary: As title.

Reviewed By: zertosh

Differential Revision: D30425160

fbshipit-source-id: c72d270d7cd3f30990aac55e33e8f72d60ed5fe2
2021-08-19 07:29:30 -07:00
Pascal Hartig
fc73e0d4ec Revert "Improve protobuf support (#2513)" (#2665)
Summary:
This reverts commit efd75ea435.

Sorry hbmartin! We're running into Kotlin compatibility problems. Your latest library release isn't compatible with Kotlin 1.3 and we can't upgrade just yet because Litho hasn't been able to release in a while. :(

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

Test Plan: _eyes

Differential Revision: D30189360

Pulled By: passy

fbshipit-source-id: c1edbbc496742938579f4e2032a78debe08fcc26
2021-08-09 04:15:49 -07:00
Harold Martin
efd75ea435 Improve protobuf support (#2513)
Summary:
* Update protobuf library to support map types
* Improved usage messaging in UI
* Always attempt to decode requests with a protobuf definition
## Changelog
Improved protobuf support

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

Reviewed By: mweststrate

Differential Revision: D30162379

Pulled By: passy

fbshipit-source-id: 201fb06045822641be5840b121da180a201be974
2021-08-09 02:42:35 -07:00
Omar Busto Santos
98f56a30ed Removed bolts-applinks dependency not in use (#2580)
Summary:
As explained in this [Issue](https://github.com/facebook/flipper/issues/1919) when running checks to see if Jetifier is needed to compile any given app using Flipper, it complain due to the dependency on `com.parse.bolts:bolts-applinks:1.4.0`.

```
Scanning com.parse.bolts:bolts-applinks:1.4.0
 Absoulute path: /....../bolts-applinks-1.4.0.jar
 Graphs to this dependency:
 +---com.facebook.flipper:flipper:0.74.0
     +---com.parse.bolts:bolts-applinks:1.4.0

> Task :canISayByeByeJetifier FAILED
```

Bolts has already fixed the AndroidX migration in version `1.5.0` but it has never been published ([Issue](https://github.com/BoltsFramework/Bolts-Android/issues/157))

After checking the code i realized flipper is only using `bolts-tasks` in `FrescoFlipperPlugin` ([code](7bd4f80c25/android/plugins/fresco/src/main/java/com/facebook/flipper/plugins/fresco/FrescoFlipperPlugin.java (L14))).

`bolts-applinks` depends on `bolts-tasks` but **not the other way around**, so we can safely remove this dependency.

## Changelog

- Removed dependency on bolts-applinks not in use

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

Test Plan:
### Tests
- [ ] Run unit tests `./gradlew :android:test` and make sure they pass

### Smoke test `fresco-plugin`
- [ ] Make sure `android/sample` compiles and runs
- In the Flipper desktop app enable `Images` plugin
- In the Android sample app tap on `Load Fresco Image`
- [ ] Verify in desktop app that the image shows correctly and the plugin works

Reviewed By: muraziz

Differential Revision: D29849669

Pulled By: jknoxville

fbshipit-source-id: 0cec730de3b94272985fec4a432ca244822f336f
2021-07-23 05:26:58 -07:00
Harold Martin
62967314c1 Update Protobuf support (#2381)
Summary:
**Update protobuf library with new support for `enum` and `oneof` types**

## Changelog

- Update plugin code for library API changes and other cleanup
- Add instructions to readme

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

Test Plan: see demo app at https://github.com/hbmartin/protobuf_java_to_protobufjs

Reviewed By: priteshrnandgaonkar

Differential Revision: D28831035

Pulled By: passy

fbshipit-source-id: 46e196293330b615394606bd3486ea47ad6a0630
2021-06-02 12:04:24 -07:00
Pascal Hartig
d1dfc395d1 Revert D28795384: Bump protobuf_java_to_protobufjs from 0.0.1 to 0.1.0
Differential Revision:
D28795384 (09951d505e)

Original commit changeset: 56e791ff245c

fbshipit-source-id: 05c98ff21a789fbd363e707869d5ef7e7b6d6b12
2021-06-01 09:24:57 -07:00
dependabot[bot]
09951d505e Bump protobuf_java_to_protobufjs from 0.0.1 to 0.1.0 (#2391)
Summary:
Bumps [protobuf_java_to_protobufjs](https://github.com/hbmartin/protobuf_java_to_protobufjs) from 0.0.1 to 0.1.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/hbmartin/protobuf_java_to_protobufjs/releases">protobuf_java_to_protobufjs's releases</a>.</em></p>
<blockquote>
<h2>v0.1.0</h2>
<ul>
<li>Added support for <code>oneof</code></li>
<li>Added support for enums</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/hbmartin/protobuf_java_to_protobufjs/commits/v0.1.0">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.github.hbmartin:protobuf_java_to_protobufjs&package-manager=gradle&previous-version=0.0.1&new-version=0.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

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

Reviewed By: nikoant

Differential Revision: D28795384

Pulled By: passy

fbshipit-source-id: 56e791ff245cdc096e9ef11eb2b436e42e611659
2021-06-01 09:08:44 -07:00
Pascal Hartig
6279cc68b1 Upgrade to Gradle 7 (#2279)
Summary:
Depends on https://github.com/facebook/flipper/issues/2277. Fixes https://github.com/facebook/flipper/issues/2221.

The maven plugin is no longer exposed and implied by https://developer.android.com/studio/build/maven-publish-plugin.

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

Test Plan: ./gradlew uploadArchives -PdryRun=true

Reviewed By: priteshrnandgaonkar

Differential Revision: D28473692

Pulled By: passy

fbshipit-source-id: 3d95122fecebfeac8bfa5173c5c633eee3f13311
2021-05-17 07:29:49 -07:00
Harold Martin
4d262c0da4 Add protobuf support to network inspector (#2080)
Summary:
Protobuf based APIs are becoming more common (i.e. gRPC) but are difficult to inspect. Unlike plain text data formats (JSON), Protobuf calls transmit binary data requiring the format to be known ahead of time, making ad-hoc inspection impossible. This PR allows for those format definitions (messages in protobuf terminology) to be transmitted from the client to the network inspector plugin. These definitions are then imported into ProtobufJS which enables the binary data transmitted to be inspected as easily as JSON data.

See Retrofit PR in https://github.com/facebook/flipper/pull/2084

## Changelog

* Add ProtobufJS library to network plugin
* New `ProtobufFormatter` UI in `RequestDetails`
* `ProtobufDefinitionsRepository` to cache and load protobuf defintions
* `addProtobufDefinitions` call in the Android network plugin

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

Test Plan: ![screenshot](https://user-images.githubusercontent.com/745166/111652068-001a5e80-87c4-11eb-8c94-e19b46dd074c.png)

Reviewed By: mweststrate

Differential Revision: D27507451

Pulled By: passy

fbshipit-source-id: 586d891b74f2b17d28fe7a2a99074da755851f38
2021-04-20 05:10:39 -07:00
Harold Martin
b0cbf39a1a Export protobuf definitions from Retrofit (#2084)
Summary:
https://github.com/facebook/flipper/pull/2080 enables storing protobuf definitions and displaying payloads in the network inspector plugin. However, describing those definitions in ProtobufJS format can be time consuming and error prone. This PR enables sending definitions from an entire Retrofit service with a single line.

## Changelog
* Adds a retrofit2-protobuf plugin

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

Test Plan:
Used as a single line per service, ie:
`SendProtobufToFlipperFromRetrofit(baseUrl, PersonService::class.java)`

For more details see demo app in https://github.com/hbmartin/protobuf_java_to_protobufjs

Reviewed By: mweststrate

Differential Revision: D27507872

Pulled By: passy

fbshipit-source-id: 859d7636c9512de0abde0aa1dcb2e023851369cf
2021-04-07 13:31:23 -07:00
Pascal Hartig
3d3724ac8b Fix copyright headers
Summary: OSS violation: P242776146

Reviewed By: jknoxville

Differential Revision: D26756475

fbshipit-source-id: bc36fe083101af89f80da293ebafa8a02fd4a052
2021-03-02 12:15:00 -08:00
Harold Martin
4d8be35d1a Add plugin for LeakCanary 2 (#1959)
Summary:
Add plugin for LeakCanary 2 as requested various times: https://github.com/facebook/flipper/issues/1379 https://github.com/facebook/flipper/issues/832  https://github.com/square/leakcanary/issues/1777

## Changelog

* Adds a leakcanary2 plugin for Android
* Adds support for leakcanary2 to existing desktop plugin

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

Test Plan:
* Docs updated to show new implementation
* Should old leakcanary plugin in sample be replaced?

Reviewed By: mweststrate

Differential Revision: D26691637

Pulled By: passy

fbshipit-source-id: 5e236fa6cc124f0720a6b21b5ee7c117ccf96fbf
2021-03-01 09:11:37 -08:00
Pascal Hartig
b25de27b8a Move bolts dependencies to Fresco plugin (#1937)
Summary:
Fixes https://github.com/facebook/flipper/issues/1919

Somehow the diff author put the dependencies in the root `build.gradle`, which is unnecessary as this is only used by Fresco.

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

Test Plan:
Built the sample app, checked that the Fresco stuff continues to work.
![Screenshot_1613565381](https://user-images.githubusercontent.com/9906/108205459-0366ef80-711d-11eb-8b3b-f804f02622af.png)

Reviewed By: mweststrate

Differential Revision: D26483701

Pulled By: passy

fbshipit-source-id: 88f056ed0897f2c00844e02721eb45d5b85c6908
2021-02-18 09:31:04 -08:00