Commit Graph

7480 Commits

Author SHA1 Message Date
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
Andrey Goncharov
31fb3dd5be Stop counting disabled and gatekeeped plugins as loaded
Summary: Without this change gatekeeped and disabled plugins are also counted as loaded, which results in plugin duplication in the UI

Reviewed By: lblasa

Differential Revision: D39695335

fbshipit-source-id: 759e2e0eaead1bee0f7d61e4ba3d1b8e4b6c0976
2022-09-22 04:17:24 -07:00
Andrey Goncharov
fd811db12b Rebuild all plugins if a shared lib changed
Summary: Some plugins import from shared directories. These directories are not plugins themselves, therefore the current plugin root searching mechanism does nto work for them. To support plugin reloading for this scenario, we start re-building all plugins if we fail to find a plugin root.

Reviewed By: lblasa

Differential Revision: D39693820

fbshipit-source-id: 33dd7de4121bd5665a39b0ea96adce4603dc7df0
2022-09-22 04:17:24 -07:00
Muescha
6889446bc5 fix link to Layout Inspector Plugin (#4051)
Summary:
fix link to Layout Inspector Plugin

## Question

should be used here the `<Link to={useBaseUrl("` syntax?

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

Test Plan:
Imported from GitHub, without a `Test Plan:` line.

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

|**Modified Pages**|
|[docs/getting-started/ios-native](https://our.intern.facebook.com/intern/staticdocs/eph/D39652045/V4/flipper/docs/getting-started/ios-native/)|

Reviewed By: LukeDefeo

Differential Revision: D39652045

Pulled By: LukeDefeo

fbshipit-source-id: af2f188db63e4fd5daa55df2ce6e0d779ede713a
2022-09-22 03:42:36 -07:00
Lorenzo Blasa
060f8911b1 Add documentation to ActivityTracker initialisation
Summary: ^

Reviewed By: LukeDefeo

Differential Revision: D39652590

fbshipit-source-id: e97a365f56dbecaaebf3a54a1325ad6b65839660
2022-09-21 13:28:17 -07:00
Lorenzo Blasa
cae15276f5 Throttle with wait
Summary: Throttle events whilst keeping track of latest

Reviewed By: LukeDefeo

Differential Revision: D39652348

fbshipit-source-id: 9c8fb5a1bb92872985f46a62d79c6594a37e8340
2022-09-21 13:28:17 -07:00
Ken Yee
fa9ba6f2d0 Adds a notifyAvailableUpdate flag to config.json to disable update (#3992)
Summary:
We would like to version control Flipper and some of our custom plugins that are installed on developers' systems.
Flipper by default prompts users to upgrade so they sometimes do the update and then all our custom plugins break because they were compiled for an older version.
See https://github.com/facebook/flipper/issues/3947 for feature request info.

## Changelog

Adds notifyAvailable flag to config.json to disable prompting for users that "an update is available"

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

Test Plan:
Tested by running locally.
Had to comment out the isProduction() check to confirm this it worked properly because this flag is false on dev versions.
Couldn't figure out how to manually test the handleOpenPluginDeeplink.tsx change but made a similar change there; happy to test that if you can tell me how to exercise that path.

Reviewed By: antonk52

Differential Revision: D39654481

Pulled By: antonk52

fbshipit-source-id: cef6b48d870915c48f620269c42d24b8ef1f4c29
2022-09-21 09:47:44 -07:00
Andrey Goncharov
3314c77ce9 Add exportFileBinary to FlipperLib
Reviewed By: antonk52

Differential Revision: D39692937

fbshipit-source-id: 7b3c78d004a9734cd8ae660d5782be1f02c00009
2022-09-21 09:26:19 -07:00
Luke De Feo
f3b7552338 2D wire frame highlight from tree, select from wireframe
Summary:
Introduced some basic bidirectional link between tree and wireframe, the specific interaction will need some tweaking but this should get us started.

When hovering over the tree we halt the rendering of the wireframe up to that point, this allows us to explore parent views that layout child views.

When clicking a view in the wireframe it is 'seleceted' as if it was clicked in the tree. This set the tree selection so you can identify it in the tree as well as opens the side bar

Reviewed By: lblasa

Differential Revision: D39539277

fbshipit-source-id: 3beb1ad4cb56b398c640ac3e7fac2cc97f3f1a18
2022-09-21 07:02:48 -07:00
Luke De Feo
cf176bb071 Basic 2D wireframe
Summary: Basic visual wireframe for the purposes of verifying that our captured view hierachy is correct, the actual version we ship will hopefully be a lot better :)

Reviewed By: lblasa

Differential Revision: D39539278

fbshipit-source-id: 73d926ff1990f09ca9877430cb227f690d05d1d4
2022-09-21 07:02:48 -07:00
Luke De Feo
c7f24eb469 Refactor UI
Summary: Split our the mega component into separate parts in preparation for the visualizer

Reviewed By: lblasa

Differential Revision: D39509406

fbshipit-source-id: 0f867c1f8a91b7592673ae47ba2b5db4f3500732
2022-09-21 07:02:48 -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
Luke De Feo
c09e185867 Set target SDK version for buck build
Summary: It was building at target sdk 0 before which lead to various checks failing, in future when these checks fail we should send a notification to flipper

Reviewed By: lblasa

Differential Revision: D39652095

fbshipit-source-id: 748bc74f0b5745011e6289e5582405149df8357f
2022-09-21 07:02:48 -07:00
Luke De Feo
7deb374c1c Add initial decor view traversal
Summary: Catch the case when we mis the initial draw

Reviewed By: lblasa

Differential Revision: D39658946

fbshipit-source-id: 00a46226128e28a8753df2161d1edcd6ffa47d67
2022-09-21 07:02:48 -07:00
Luke De Feo
46824f3369 Fix flipper connect / disconnect cycle
Summary: Previously we were cancelling the entire context which meant after reconnect nothing was sent. Additionally we now close / reinitiaze the channel so that any old events are not sent on reconnect

Reviewed By: lblasa

Differential Revision: D39658945

fbshipit-source-id: bb02724434aa820d811b49ab799a4643ab7e785a
2022-09-21 07:02:48 -07:00
facebook-flipper-bot
cb75be7495 Automated: Update Podfile.lock (#4128)
Summary:
This is an automated PR to update the Podfile.lock.
- Make sure that the Podfile.lock contains latest FlipperKit and Flipper pod versions.
- Also make sure that all the dependencies are updated to the latest one.
- This is auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request)

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

Test Plan:
Imported from GitHub, without a `Test Plan:` line.

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

|**Modified Pages**|
|[docs/getting-started/ios-native](https://our.intern.facebook.com/intern/staticdocs/eph/D39687101/V2/flipper/docs/getting-started/ios-native/)|

Reviewed By: antonk52

Differential Revision: D39687101

Pulled By: aigoncharov

fbshipit-source-id: 568a6740033cf37bcc86492eefbcb247c7bf1948
2022-09-21 05:56:35 -07:00
Dominique Rau
7af9654893 Update custom-ports.mdx (#4105)
Summary:
Typo in Docs

Typo in Docs

## Changelog

Fixed typo in docs.

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

Test Plan:
None

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

|**Modified Pages**|
|[docs/custom-ports](https://our.intern.facebook.com/intern/staticdocs/eph/D39652466/V2/flipper/docs/custom-ports/)|

Reviewed By: antonk52

Differential Revision: D39652466

Pulled By: aigoncharov

fbshipit-source-id: 129552ddee449582b441d1c34c40b7e9dad9ce9b
2022-09-20 09:11:45 -07:00
Andrey Goncharov
9d2a37812c Fix fast-refresh
Summary: Changelog: Make yarn start --fast-refreash load dynamic plugins

Reviewed By: lblasa

Differential Revision: D39653965

fbshipit-source-id: f6133ff0315c014e3e1c4c7921318a6d7db70eaf
2022-09-20 06:47:51 -07:00
Lorenzo Blasa
aa801b6715 Fix bug introduced with variable rename
Summary:
^

`mutableClass` should be used instead of `clazz`

Reviewed By: LukeDefeo

Differential Revision: D39652102

fbshipit-source-id: 8ba86d39796beed79ff7cf8b37f3460facc38430
2022-09-20 06:35:48 -07:00
Lorenzo Blasa
1cc71af832 Fix typo for initialiser
Summary: ^

Reviewed By: antonk52

Differential Revision: D39575995

fbshipit-source-id: 2e95d43c37e2341e9e6f723282d829d06f1b1c5d
2022-09-20 05:15:50 -07:00
Lorenzo Blasa
d85e8a0949 TreeObserverFactory, change file name to match type
Summary: ^

Reviewed By: LukeDefeo

Differential Revision: D39575384

fbshipit-source-id: 30ca896d93c4f3641f748123af024354c10de8b8
2022-09-20 05:15:50 -07:00
Lorenzo Blasa
7f103ee293 TreeObserver tidy up
Summary:
Remove usage of '!!', it is generally discourages even though instances are guaranteed to exist.

Adjust comments

Reviewed By: LukeDefeo

Differential Revision: D39575368

fbshipit-source-id: a159a0411a913de3d1ae6236c41ea15255687433
2022-09-20 05:15:50 -07:00
Lorenzo Blasa
83f8a0675c Adjust spaces
Summary: ^

Reviewed By: LukeDefeo

Differential Revision: D39575336

fbshipit-source-id: b9c2cf75d674a3ee86dc26f918fc0d9130bc8dc0
2022-09-20 05:15:50 -07:00
Lorenzo Blasa
1744335ddd View as weak reference
Summary: Keep a weak reference of the view instead of a strong reference.

Reviewed By: LukeDefeo

Differential Revision: D39575312

fbshipit-source-id: ae8df7d089b29ea3b1cf960a6ae020ed5a9c3648
2022-09-20 05:15:50 -07:00
Lorenzo Blasa
2051359490 Unsubscribe from updates and tidy up
Summary: Remove listener on unsubscribe and tidy up comments.

Reviewed By: LukeDefeo

Differential Revision: D39575287

fbshipit-source-id: 2b4ac0bc07cfe86f5ad0e602bbba4b596230cd52
2022-09-20 05:15:50 -07:00
Lorenzo Blasa
ddc5554673 Suppress warnings for RootViewResolver
Summary:
^

There's no way to address these warnings, so suppress.

Reviewed By: LukeDefeo

Differential Revision: D39575262

fbshipit-source-id: 6703476d7637c63aa9a81b26f8cdbd0f53e3991c
2022-09-20 05:15:50 -07:00
Lorenzo Blasa
bba1275377 Traversal tidy up
Summary: This change tidies up the traversal and removes unused LayoutVisitor

Reviewed By: LukeDefeo

Differential Revision: D39575241

fbshipit-source-id: 2ab101f74ae7b2c16ddf7016abc78a03590916b0
2022-09-20 05:15:50 -07:00
Lorenzo Blasa
1fac19facc Address a few warnings and suggestions for Android sample app
Summary: ^

Reviewed By: LukeDefeo

Differential Revision: D39575170

fbshipit-source-id: 8be293fe31521531e634132e4ca454da32aad73f
2022-09-20 05:15:50 -07:00
Lorenzo Blasa
84dc95b27b Rename stetho package to util
Summary:
^

These are the last two types imported from stetho which, if anything, can be integrated as is without having to track back to Stetho

Reviewed By: LukeDefeo

Differential Revision: D39573639

fbshipit-source-id: 8009532116ec7b2fed2751fa966269ad81a7cb00
2022-09-20 05:15:50 -07:00
Lorenzo Blasa
d8e47efb81 Remove warnings
Summary: ^

Reviewed By: LukeDefeo

Differential Revision: D39573417

fbshipit-source-id: 241ecdddaf43020923046b0b5c35656bc8ffad34
2022-09-20 05:15:50 -07:00
Lorenzo Blasa
3a4286b2ba Remove stetho unused types
Summary: ^

Reviewed By: LukeDefeo

Differential Revision: D39572018

fbshipit-source-id: 437b245b7eee06392cda97eb56b4f4d0a5df23fc
2022-09-20 05:15:50 -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
Andrey Goncharov
e8392bdceb Roll out experimental flipper-server to OSS users
Reviewed By: lblasa

Differential Revision: D39651562

fbshipit-source-id: bafcb5a20cc492a58161cd41f484ce7fd33e1eaf
2022-09-20 05:13:16 -07:00
Flipper Bot
00de0f0e9e Flipper Snapshot Bump: v0.166.1-SNAPSHOT
Summary: Releasing snapshot version 0.166.1-SNAPSHOT

Reviewed By: aigoncharov

Differential Revision: D39649276

fbshipit-source-id: aa537a0fc60df6e3fee3cded942524423cec88ad
2022-09-20 04:06:09 -07:00
Flipper Bot
285db3a268 Flipper Release: v0.166.0
Summary: Releasing version 0.166.0

Reviewed By: aigoncharov

Differential Revision: D39649275

fbshipit-source-id: d328cf36fb26e2d69b0e3c76cae6c47760ecd6fa
2022-09-20 04:06:09 -07:00
Andrey Goncharov
8716761cb3 Fix require monkey-patching in electron build
Summary:
In D39311893 (094c5bdfdd) we started monkey-patching `require` to resolve global dependencies in the plugins. Apparently, patching `globalThis.require` did not work in the electron env. On my local machine it kept working because I had the experimental `flipper-server` feature enabled which embeds flipper-server into the electron build. In flipper-server we properly patch `require` via `Module.prototype.require` which affected the global require in electron.
With this fix we now properly patch require in electron via Module.prototype.require all the time

Changelog: Fix plugin loading with experimental flipper-server disabled

Reviewed By: nikoant

Differential Revision: D39633821

fbshipit-source-id: 9554f643c625620d116075ae87f573d8447850f6
2022-09-20 01:36:56 -07:00
Flipper Bot
d600203627 Flipper Snapshot Bump: v0.165.2-SNAPSHOT
Summary: Releasing snapshot version 0.165.2-SNAPSHOT

Reviewed By: aigoncharov

Differential Revision: D39626531

fbshipit-source-id: ff3490c856bdcbc3e075a75a6a537399c25553e6
2022-09-19 12:12:29 -07:00
Flipper Bot
fb51f294f1 Flipper Release: v0.165.1
Summary: Releasing version 0.165.1

Reviewed By: aigoncharov

Differential Revision: D39626532

fbshipit-source-id: 0611201ad42e038f4488ee9f6f8cf8265329a5e2
2022-09-19 12:12:29 -07:00
Andrey Goncharov
1167728b98 Freeze plugin messages
Reviewed By: mweststrate

Differential Revision: D39618330

fbshipit-source-id: 7b982d2307a021e7dea71fd84ca6140998b31366
2022-09-19 05:40:33 -07:00
Andrey Goncharov
202bce31b4 Stop freezing plugin messages
Reviewed By: lblasa

Differential Revision: D39600455

fbshipit-source-id: f829d135d4feb2a8000d094e3dad17b8b9d46cd3
2022-09-18 15:00:34 -07:00
Mohamed Osman
c71d1bd512 Adding basic version of WhatsApp Status Plugin
Summary:
This is mainly an RFC version (happy to land it as a seed for a plugin that can be used to debug and/or control status) the plan is to have the following:
 - One place to track the full life-cycle of status.
 - Control and visualize playback and state.
 - Troubleshoot errors and details of a given status (e.g. media links, evets, latencies .. etc).

Differential Revision: D38123193

fbshipit-source-id: 49229d604434d575d6aaddc818064598e7ccee92
2022-09-16 17:09:40 -07:00
Flipper Bot
f09295e613 Flipper Snapshot Bump: v0.165.1-SNAPSHOT
Summary: Releasing snapshot version 0.165.1-SNAPSHOT

Reviewed By: aigoncharov

Differential Revision: D39579336

fbshipit-source-id: 09bfd12892fffe1ccd12e94bcaa0f7d135b5496a
2022-09-16 10:05:24 -07:00
Flipper Bot
4c61c53a7b Flipper Release: v0.165.0
Summary: Releasing version 0.165.0

Reviewed By: aigoncharov

Differential Revision: D39579337

fbshipit-source-id: 42c3c470718b1e5953ab07afa9a7690b33acfe3f
2022-09-16 10:05:24 -07:00
Andrey Goncharov
d81dac18b5 Work around empty file restirction
Reviewed By: nikoant

Differential Revision: D39578561

fbshipit-source-id: 3a471e7dd06a1e8cee2c7823b1d7f764110ecf80
2022-09-16 09:00:21 -07:00
Andrey Goncharov
2aa3dc9bd8 Remove reference to flipper-server bundle map
Summary: flipper-server is currently shipped unbundled and unminified

Reviewed By: nikoant

Differential Revision: D39577062

fbshipit-source-id: cd78aded878358e9f90792c695b6d1b27863f05a
2022-09-16 08:09:31 -07:00
Andrey Goncharov
7c66a83328 Add source map copying for plugins
Reviewed By: nikoant

Differential Revision: D39576201

fbshipit-source-id: cd6b11bdb0a4c89e2f84d1c4772f08acc4b86418
2022-09-16 07:22:09 -07:00
Andrey Goncharov
9fc9d6f9b5 Remove redundant exports from 'flipper'
Summary: Prevent getRenderHostInstance leaking into 'flipper' types

Reviewed By: lblasa

Differential Revision: D39574678

fbshipit-source-id: 43932d73fed8b37a2a0791a312ee3d5129a4923f
2022-09-16 06:33:18 -07:00
Andrey Goncharov
8dc5f4d3ea Remove stale build options
Summary: Now that we build all plugins at all times and it is super-fast, these options are redundant

Reviewed By: lblasa

Differential Revision: D39542723

fbshipit-source-id: 1b30ba384267ec4fd0c35b4dc14f0223ffe414c9
2022-09-15 10:02:19 -07:00
Andrey Goncharov
ab03140201 Fix list of watch folders for electron dev build
Summary: Restart electron app if we had any server-code changes

Reviewed By: lblasa

Differential Revision: D39542169

fbshipit-source-id: fb8e335f3e3fe0cf34e57a79b96e9cc8377e9fda
2022-09-15 10:02:19 -07:00
Andrey Goncharov
fab4ee8c22 Unload stale modules from electron cache
Summary: `requirePlugin` in electron uses native `require` which has a built-in cache. Without this fix a stale version of the plugin loaded.

Reviewed By: lblasa

Differential Revision: D39542121

fbshipit-source-id: e6c4b65f9ea7b816803baaae537c234914fcb3d7
2022-09-15 10:02:19 -07:00