Commit Graph

8359 Commits

Author SHA1 Message Date
Lorenzo Blasa
883993d2ec Bump SocketRocket 0.7.0
Summary:
About to release React Native 0.72.1. This version of React Native has to depend on SocketRocket 0.7.0, released yesterday.

Cocoapods is failing to install dependencies with the following error:
```
In snapshot (Podfile.lock):
    SocketRocket (= 0.7.0)

  In Podfile:
    FlipperKit/FlipperKitReactPlugin (= 0.182.0) was resolved to 0.182.0, which depends on
      FlipperKit/Core (= 0.182.0) was resolved to 0.182.0, which depends on
        SocketRocket (~> 0.6.0)

    React-Core/RCTWebSocket (from `../react-native/`) was resolved to 1000.0.0, which depends on
      SocketRocket (= 0.7.0)

    React-CoreModules (from `../react-native/React/CoreModules`) was resolved to 1000.0.0, which depends on
      SocketRocket
```

By bumping the SocketRocket dependencies and publishing a new version of FlipperKit, we would be able to release React Native.

Reviewed By: passy, cipolleschi

Differential Revision: D47125059

fbshipit-source-id: d0797880c502c14db9f0261c3e8abf2652e7bba2
2023-06-29 10:21:06 -07:00
Pranav Yadav
5584cf817c docs - Bump actions/checkout@v3.5.3 & JamesIves/github-pages-deploy-action@v4.4.2 (#4873)
Summary:
This diff bumps `actions/checkout@v3.5.3` & `JamesIves/github-pages-deploy-action@v4.4.2`

### Ref.:
- `actions/checkout@v3.5.3` changelog: https://github.com/actions/checkout/releases/tag/v3.5.3
- `JamesIves/github-pages-deploy-action@v4.4.2` changelog: https://github.com/JamesIves/github-pages-deploy-action/releases/tag/v4.4.2

## Changelog:

[GENERAL] [SECURITY] - [Actions] `docs` - Bump `actions/checkout@v3.5.3` & `JamesIves/github-pages-deploy-action@v4.4.2`

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

Test Plan: - Workflow should run and work as usual.

Reviewed By: lblasa

Differential Revision: D47089308

Pulled By: passy

fbshipit-source-id: 5f8342e34a4fdde832e82d530c53e0cbe02c99a1
2023-06-29 04:03:27 -07:00
github-actions[bot]
ae6344d051 Automated: Update Podfile.lock (#4890)
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/4890

Reviewed By: ivanmisuno

Differential Revision: D47091378

Pulled By: passy

fbshipit-source-id: 254b1a6ca737c2ccfa40db3bae147d0db1b1594b
2023-06-29 03:46:55 -07:00
Lorenzo Blasa
e42db220ee Socket connect no longer synchronous and blocking
Summary:
Never really liked this code. Before this change, calls to connect were blocking.

Because of this, we had to make use of promises and a bit of really not that good-looking code.

So, this change makes connect non-blocking meaning that we make full use of our event handler.

These changes contain:
- CSR is not getting generated after each failed attempt.
- Connect is no longer blocking.
- Do not report events via the handler when explicitly disconnecting.

Reviewed By: jknoxville

Differential Revision: D46853228

fbshipit-source-id: 00e6a9c7c039a756175fe14982959e078d92bacb
2023-06-28 12:09:58 -07:00
Pranav Yadav
65e515bdaa js - Bump actions/- setup-node@v3.6.0, checkout@v3.5.3 & nick-fields/retry@v2.8.3 (#4872)
Summary:
This diff bumps `actions/checkout@v3.5.3`, `actions/setup-node@v3.6.0`, and `nick-fields/retry@v2.8.3`

### Ref.:
- `actions/checkout@v3.5.3` changelog: https://github.com/actions/checkout/releases/tag/v3.5.3
- `actions/setup-node@v3.6.0` changelog: https://github.com/actions/setup-node/releases/tag/v3.6.0
- `nick-fields/retry@v2.8.3` changelog: https://github.com/nick-fields/retry/releases/tag/v2.8.3

## Changelog:

[GENERAL] [SECURITY] - [Actions] `js` - Bump `actions/`- `checkout@v3.5.3`, `setup-node@v3.6.0`, & `nick-fields/retry@v2.8.3`

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

Test Plan: - Workflow should run and work as usual.

Reviewed By: ivanmisuno

Differential Revision: D47090375

Pulled By: passy

fbshipit-source-id: 8e3852620dc9439e9d26e26daa87c7cb2cc258d0
2023-06-28 11:12:53 -07:00
Pranav Yadav
985f7d1354 android-sample - Bump actions/- checkout@v3.5.3, setup-java@v3.11.0, cache@v3.3.1 & upload-artifact@v3.1.2 (#4874)
Summary:
This diff bumps `actions/checkout@v3.5.3`, `actions/setup-java@v3.11.0`, `actions/cache@v3.3.1` & `actions/upload-artifact@v3.1.2`

### Ref.:
- `actions/checkout@v3.5.3` changelog: https://github.com/actions/checkout/releases/tag/v3.5.3
- `actions/setup-java@v3.11.0` changelog: https://github.com/actions/setup-java/releases/tag/v3.11.0
- `actions/cache@v3.3.1` changelog: https://github.com/actions/cache/releases/tag/v3.3.1
- `actions/upload-artifact@v3.1.2` changelog: https://github.com/actions/upload-artifact/releases/tag/v3.1.2

## Changelog:

[GENERAL] [SECURITY] - [Actions] `android-sample` - Bump `actions/`- `checkout@v3.5.3`, `setup-java@v3.11.0`, `cache@v3.3.1` & `upload-artifact@v3.1.2`

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

Test Plan: - Workflow should run and work as usual.

Reviewed By: lblasa

Differential Revision: D47089304

Pulled By: passy

fbshipit-source-id: 5c99ab1babed4357daadba97ecc5fd702386c5e4
2023-06-28 11:07:44 -07:00
generatedunixname89002005306973
31cfb01562 Flipper Snapshot Bump: v0.203.1-SNAPSHOT
Summary: Releasing snapshot version 0.203.1-SNAPSHOT

Reviewed By: lblasa

Differential Revision: D47089142

fbshipit-source-id: 25d6ccf750210b76a6b7429f57a19722c87d1bbe
2023-06-28 09:13:46 -07:00
generatedunixname89002005306973
29f873bdcb Flipper Release: v0.203.0
Summary: Releasing version 0.203.0

Reviewed By: lblasa

Differential Revision: D47089143

fbshipit-source-id: e280b3eb0a92246ebca3be30fdb240e065a68b18
2023-06-28 09:13:46 -07:00
Pranav Yadav
a6ab663c32 iOS-pod-lint - Bump actions/checkout@v3.5.3 & nick-fields/retry@v2.8.3 (#4877)
Summary:
This diff bumps `actions/checkout@v3.5.3`, and `nick-fields/retry@v2.8.3`

### Ref.:
- `actions/checkout@v3.5.3` changelog: https://github.com/actions/checkout/releases/tag/v3.5.3
- `nick-fields/retry@v2.8.3` changelog: https://github.com/nick-fields/retry/releases/tag/v2.8.3

## Changelog:

[GENERAL] [SECURITY] - [Actions] `iOS-pod-lint` - Bump `actions/checkout@v3.5.3` & `nick-fields/retry@v2.8.3`

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

Test Plan: - Workflow should run and work as usual.

Reviewed By: lblasa

Differential Revision: D47056989

Pulled By: passy

fbshipit-source-id: cc80115ab0757f028f018c185f724915488e6ea3
2023-06-28 03:07:46 -07:00
generatedunixname89002005306973
484b6e4b37 Flipper Snapshot Bump: v0.202.1-SNAPSHOT
Summary: Releasing snapshot version 0.202.1-SNAPSHOT

Reviewed By: lblasa

Differential Revision: D47059435

fbshipit-source-id: c9af499398857d9caaa1ff9e11255b20f957a550
2023-06-27 10:18:23 -07:00
generatedunixname89002005306973
86b1fd6390 Flipper Release: v0.202.0
Summary: Releasing version 0.202.0

Reviewed By: lblasa

Differential Revision: D47059436

fbshipit-source-id: 42d8525ea1164fb2d48736ad9ff1976b7cfbc221
2023-06-27 10:18:23 -07:00
Alexander Oprisnik
79e3abf6eb Migrate Flipper samples to use Fresco Vito (#4861)
Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/4861

Reviewed By: steelrooter

Differential Revision: D46149846

fbshipit-source-id: 3b2a89da2a4e5ea2ee325e035e793ee18c5ce86d
2023-06-27 09:28:59 -07:00
Pranav Yadav
44925c687e issues - Bump hramos/needs-attention to v2.0.0 & actions/checkout to v3 (#4862)
Summary:
This diff bumps `hramos/needs-attention` to `v2.0.0` & `actions/checkout` to `v3`
- `hramos/needs-attention@v2.0.0` is a `latest` **BREAKING** release with a number of improvements made by Pranav-yadav i.e. ***me*** 😎

### Major Improvements:
`hramos/needs-attention@v2.0.0`:
- Bump `Node.js` to `v16`
- Bump `actions/checkout` to `v3`
- Add **TypeScript**
- Generate and publish **fully compiled** dist (with deps) instead of `node_modules`

### Ref.:
- Full Changelog for `v2.0.0`: https://github.com/hramos/needs-attention/releases/tag/v2.0.0
- Marketplace `v2.0.0`: https://github.com/marketplace/actions/needs-attention?version=v2.0.0

## Changelog:

[GENERAL] [SECURITY] - [Actions] `issues` - Bump `hramos/needs-attention` to `v2.0.0` & `actions/checkout` to `v3`

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

Test Plan: - Workflow should add and remove respective labels as usual.

Reviewed By: lblasa

Differential Revision: D47017048

Pulled By: passy

fbshipit-source-id: ebc70e2c64e1d782977da96863d9b9969a453551
2023-06-27 08:58:14 -07:00
Pranav Yadav
d3861c53a4 packer - Switch to dtolnay/rust-toolchain@stable & bump actions/checkout@v3.5.3 (#4878)
Summary:
This diff switches to `dtolnay/rust-toolchain@stable` since `actions-rs/toolchain` is **NOT maintained** and bumps `actions/checkout@v3.5.3`

> **Note**:
> `uses: dtolnay/rust-toolchain@stable`
> The selection of Rust toolchain is made based on the particular `rev` of this Action being requested. For example `dtolnay/rust-toolchain@nightly` pulls in the `nightly` Rust toolchain, while `dtolnay/rust-toolchain@1.42.0` pulls in `1.42.0`.

### Ref.:
- `actions-rs/toolchain` is **NOT Maintained**, issue:
https://github.com/actions-rs/toolchain/issues/216
- `dtolnay/rust-toolchain@stable` usage note: https://github.com/dtolnay/rust-toolchain#example-workflow
- `actions/checkout@v3.5.3` changelog: https://github.com/actions/checkout/releases/tag/v3.5.3

## Changelog:

[GENERAL] [SECURITY] - [Actions] `packer` - Switch to `dtolnay/rust-toolchain@stable` & bump `actions/checkout@v3.5.3`

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

Test Plan: - Workflow should run and work as usual.

Reviewed By: lblasa

Differential Revision: D47056977

Pulled By: passy

fbshipit-source-id: 68023fcce355831314af2f31d514ed95efb7788c
2023-06-27 08:56:55 -07:00
Lorenzo Blasa
dac8c5b213 Usage track now internal to tracking
Summary:
Usage tracking comes from Electron's `main.tsx`. There's a timer that dispatches an IPC event every 60 seconds.

This is all good for Electron builds.

For non-electron builds, there's no such thing as IPC.

So, react to the IPC event whenever necessary but also handle the interval internally such that usage is tracked independently of explicit callers.

Reviewed By: antonk52

Differential Revision: D47053404

fbshipit-source-id: f17694e65eed18678b45a2e815813bafab69c3f1
2023-06-27 07:17:06 -07:00
Lorenzo Blasa
fe12a908fb Remove debugging comment
Summary: ^

Reviewed By: LukeDefeo

Differential Revision: D47053235

fbshipit-source-id: af17955a333059cce58a68a43ecdcb67a441d7b5
2023-06-27 04:28:04 -07:00
Lorenzo Blasa
cadf5a3656 starred-plugins removal
Summary: A transition period of 2 years should be enough.

Reviewed By: LukeDefeo

Differential Revision: D47053216

fbshipit-source-id: c9f9bfbff82a05942d408b325088095a6069cced
2023-06-27 04:28:04 -07:00
Luke De Feo
05e686dd47 Added state tracking around init and connected events
Summary: Im concerned that we are gettign disconnected without realising, this should help with the logs

Reviewed By: lblasa

Differential Revision: D47053321

fbshipit-source-id: 1014a3e856517e234f0f79f2a4692f18397fc457
2023-06-27 04:06:17 -07:00
Luke De Feo
fcfbc352ba Add more diagnostic info to perf stats page
Summary: This will hopefully be useful for prod debugging where we have users with no data,

Reviewed By: lblasa

Differential Revision: D47053328

fbshipit-source-id: 37ecce885ebd93bf2ffdd67cf49cf33255dda429
2023-06-27 04:06:17 -07:00
Pascal Hartig
3354092adb Merge pull request #4885 from facebook/fixup-T156813884-main
Re-sync with internal repository
2023-06-27 10:07:41 +01:00
Steven Chaitoff
1cbeaf4ebb Add link to Flipper GraphQL plugin
Summary:
This just adds a link next to each request in the Flipper GraphQL plugin to take you to the mobile GraphQL efficiency tool. We want this to be a kind of hub for mobile devs using GraphQL, alongside GraphiQL.

This was a suggestion from a product dev who attended our demo. Later we could also pull down actually efficiency info and show it directly in Flipper.

Reviewed By: ginfung

Differential Revision: D47029548

fbshipit-source-id: 05185e57bfbfaab9169a6b154822ede82d50fd4d
2023-06-26 13:41:54 -07:00
Lorenzo Blasa
b98edc669a Dynamic performance stats
Summary:
PerformanceStatsEvent declares the metrics we track for performance.

DynamicPerformanceStatsEvent is a new type which extends it by allowing arbitraty key/value pairs to be reported and visualised.

Reviewed By: antonk52

Differential Revision: D47023248

fbshipit-source-id: fadfad79561fca9ae48d0668da3cc62f0d0391d8
2023-06-26 12:12:51 -07:00
Facebook Community Bot
23a934a47c Re-sync with internal repository 2023-06-26 10:17:06 -07:00
Pascal Hartig
820cf6a75e Add jetpack compose to sample app
Summary: Add an entry to the sample app to showcase Jetpack compose support. Note that you need to enable View Attribute Debugging in the Android Debug settings for this to work.

Reviewed By: lblasa

Differential Revision: D46933645

fbshipit-source-id: fbe2ddd50ef0e7917ef873959db5b3f35b833cf0
2023-06-23 14:42:14 -07:00
Pascal Hartig
ad25c2468d Set up gradle project
Summary: Build the jetpack compose plugin with gradle and export it to Maven.

Reviewed By: lblasa

Differential Revision: D46932689

fbshipit-source-id: cca0468bae7e6a324430aab548613aa1fdb61bf2
2023-06-23 14:42:14 -07:00
Pascal Hartig
b35cbaae55 Export jetpack-compose code
Summary: Move the jetpack plugin to a location that will get exported to GitHub. It won't get built as part of Gradle just yet.

Reviewed By: lblasa

Differential Revision: D46932691

fbshipit-source-id: 5837bbb2f31aad4221ee745fd145b91b2783d7fe
2023-06-23 14:42:14 -07:00
Pascal Hartig
0d364dc6b6 Upgrade AGP to 8.0.2 (#4850)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/4850

Quick drive-by change to avoid falling that far behind again as we did before the last Sustainathon.

Reviewed By: antonk52

Differential Revision: D46859127

fbshipit-source-id: 91fe675fc16ea66544920eeea070b344fa66340a
2023-06-23 14:42:14 -07:00
Anton Kastritskiy
62f4582f0e Merge device plugins and enabled plugins in the sidebar
Summary:
Currently we surface the difference in plugin type to the user. However, it doesn't make much sence to the user as they primarily care about the plugins being enabled or not. Thus merging device plugins (always enabled) and enabled plugins sections.

I wasn't sure if I should also merge the metro plugins section due to some metro specific hints. So I left it as is.

Reviewed By: lblasa

Differential Revision: D46971125

fbshipit-source-id: 0bb667c3b2f5576e5704dae29b03cfd631c38ad2
2023-06-23 07:19:03 -07:00
Luke De Feo
a24934cad2 Improve open in ide functionality for bloks
Summary:
A few enhancements:
1. we use the component name when using big grep search and looking up in codehub instead of big grep search
2. diffusion renamed to code hub

Differential Revision: D46934805

fbshipit-source-id: c818b2937256cbeaabfdfc0a191706ebdecb716b
2023-06-22 08:24:55 -07:00
Lorenzo Blasa
80673f7832 Rework flipper state step for connect
Summary:
Create the step as an attempt.

Remove conditionally marking it as success or failure as connect will not be done 'synchronously' moving forward.

:::notes:::
Documentation is for personal use and will be removed next.

Reviewed By: passy

Differential Revision: D46850048

fbshipit-source-id: d6dce961d5cbd767f428e58850d24a433d50ba14
2023-06-22 04:01:42 -07:00
Lorenzo Blasa
1b5c9e627a Move reset state to a more appropriate location
Summary: Not really part of the connect process in this case, so is getting moved closer to where the CSR is generated.

Reviewed By: passy

Differential Revision: D46849966

fbshipit-source-id: b91e2925552cd7fcab67b3d1d7af006f4f8c1431
2023-06-21 23:16:34 -07:00
Lorenzo Blasa
3f6424930a Add resetState documentation
Summary:
Add documentation to `ConnectionContextStore::resetState`.

Useful to have, I guess.

Reviewed By: passy

Differential Revision: D46849937

fbshipit-source-id: 7dec76e23b566f460f0b22e0fa14b73e16a142f0
2023-06-21 13:33:10 -07:00
Luke De Feo
5e5b56b684 Handle case where IOS can send active child -1
Summary:
Sometimes iOS can return active child -1,  which is causing some crashes on desktop, (see the tasks) this is a client bug but the desktop shouldnt crash none the less

seems to occur only sometimes only on fboios

Reviewed By: lblasa

Differential Revision: D46894387

fbshipit-source-id: f9c34fe8fb32691486455224f82bed9c3dce6cef
2023-06-21 07:29:49 -07:00
generatedunixname89002005306973
9a01411d2c Flipper Snapshot Bump: v0.201.1-SNAPSHOT
Summary: Releasing snapshot version 0.201.1-SNAPSHOT

Reviewed By: lblasa

Differential Revision: D46892241

fbshipit-source-id: 119a3431f064b167c03d08de1f0358f6ea33e172
2023-06-21 06:40:48 -07:00
generatedunixname89002005306973
ad9d77ee8c Flipper Release: v0.201.0
Summary: Releasing version 0.201.0

Reviewed By: lblasa

Differential Revision: D46892243

fbshipit-source-id: 47e2389e5e5fa276ae4e1738b9691b9f9dfc4bea
2023-06-21 06:40:48 -07:00
Lorenzo Blasa
aa510b3fd0 Remove transient newClient
Summary: This was a temporary variable which is not really needed, so remove.

Reviewed By: passy

Differential Revision: D46849864

fbshipit-source-id: 56fb52f9a80128fb746afcdc4d36225e6d596db2
2023-06-20 13:25:40 -07:00
Lorenzo Blasa
4379317258 Move socket event handler inside FlipperConnectionManagerImpl
Summary:
The event handler is a friend type that was mutating the connection manager state.

Instead, just forward the event handling to it.

Then state mutation is consolidated inside the connection manager.

Reviewed By: passy

Differential Revision: D46849769

fbshipit-source-id: 594ab32c8e891564afa94e1be6b93b1dfeffe26f
2023-06-20 07:55:25 -07:00
Luke De Feo
35e2dd2e17 Use is connected flag to know to wrap bloks
Summary:
we need to wrap the bloks layout in a debug variet in order for flipper to work. See this diff for context D45605120

We are now using wether flipper is connected at all which is much more reliable.

Reviewed By: lblasa

Differential Revision: D46854921

fbshipit-source-id: 1b3baef2681ccce50fd452044cd3f740c256b0a9
2023-06-20 05:25:21 -07:00
Lorenzo Blasa
468b5510a8 New 'isConnected' API
Summary: Expose the newly created `isConnected` API to Android FlipperClient API.

Reviewed By: LukeDefeo

Differential Revision: D46841260

fbshipit-source-id: 1512e54d28779ef62423aa52727fed3a34d00333
2023-06-20 00:46:55 -07:00
Lorenzo Blasa
63f8c47cfa New 'isConnected' API
Summary: Expose the newly created `isConnected` API to iOS FlipperClient API.

Reviewed By: antonk52

Differential Revision: D46841190

fbshipit-source-id: c36eb08427d60c73fad8f92100df5d012149b4a8
2023-06-20 00:46:55 -07:00
Lorenzo Blasa
7cec520729 New 'isConnected' API
Summary:
Expose a new API to be used to check if there's an open connection with Flipper Desktop.

Changelog: new FlipperClient isConnected API

Reviewed By: antonk52

Differential Revision: D46841095

fbshipit-source-id: 82a60f52496fb218cb50c6a28d7ffe7225ae23aa
2023-06-20 00:46:55 -07:00
Lorenzo Blasa
daa3a38ed3 Flipper export file implementation
Summary:
^

Changelog: add export file implementation for browsers

Reviewed By: antonk52

Differential Revision: D46840341

fbshipit-source-id: 8a011f2a7c0ce329286cb8813def8f9c0572d133
2023-06-19 08:33:54 -07:00
generatedunixname89002005306973
f0ccad9bb3 Flipper Snapshot Bump: v0.200.1-SNAPSHOT
Summary: Releasing snapshot version 0.200.1-SNAPSHOT

Reviewed By: lblasa

Differential Revision: D46839330

fbshipit-source-id: ddc682b0429b7eef469354a0d5ee8723b7e27321
2023-06-19 08:18:51 -07:00
generatedunixname89002005306973
2ea745010a Flipper Release: v0.200.0
Summary: Releasing version 0.200.0

Reviewed By: lblasa

Differential Revision: D46839331

fbshipit-source-id: 1f578200c45444757165e41c9c6bc96bd66cc476
2023-06-19 08:18:51 -07:00
Luke De Feo
ae5dd80d67 Allow user to reset ui debugger after fatal error
Summary: Previously there was no way to get of this state

Reviewed By: aigoncharov

Differential Revision: D46803900

fbshipit-source-id: 2eb0eb41b58064659ef1d2cff245a2b8d7e2f261
2023-06-19 05:06:52 -07:00
Luke De Feo
f9bbc967ea Fix visualiser after virtualisation
Summary: There was an issue with cropping introduce by virtualisation and the position of the scroll view in the hierachy. Its a bit fragile but it works now.

Reviewed By: lblasa

Differential Revision: D46761831

fbshipit-source-id: ce001c6f4fe7ddc111edf0098f75a1273c84472d
2023-06-19 05:06:52 -07:00
Luke De Feo
f72514f238 Fix search now that tree is virtualised
Summary: Now the tree is virtualise the dom based scrolling effect doesnt work. Instead have to reimplement the search on the raw data and use the virtualiser to scroll, this isnt idea but it is still very fast and we can use this to later implement the browser style 4/8 results with ability to page through them.

Reviewed By: aigoncharov

Differential Revision: D46760491

fbshipit-source-id: 9c9b9961f084b39f86fd2aa94ab8e33ca476788b
2023-06-19 05:06:52 -07:00
Luke De Feo
43c7dc39c8 Add in / out behaviour to left / right arrow
Summary:
Following feedback from https://fb.workplace.com/groups/443457641253219/permalink/587444816854500/

When pressing left arrow and is already collapse goes to parent, when pressing right arrow and is expanded will go to first child. this mimics behaviours in mac os and other ides.

Also refactored kb scroll to use row virtualiser instead of dom refs

I also fixed the kb scroll hijacking, previously we were using a setTimeout, if you held a key down for a long time then the timeout would fire and the mouse enter event would briefly fire causing the hover position to jump. I now use a more robust approach were we just reserve the focus input for 250ms from the keyboard input, each time the key is held this reservation is extended slightly.

Changelog: UIDebugger, pressing left arrow jumps to parent after collapse. Pressing right arrow enters after expand. Similar to file browsers in IDES

Reviewed By: aigoncharov

Differential Revision: D46760448

fbshipit-source-id: da45d81056aa070be84b2db972400d650b86a172
2023-06-19 05:06:52 -07:00
Luke De Feo
e9d098b9cd Virtualise Tree
Summary:
Removed previous memoization approach as it was causing issues and very inconsistent perf increase due to the indent guides often causing half the tree needed to rerender.

New approach is using react virtual. Its very fast in all cases including initial render  off the wire. It does require 2 hacks.

1) React virtual requires you to explicitly size your parent component. In all the examples they have a height in px. This doesnt really work given we can resize the window. To mitigate this I added a grandparent component that is sized correclty with flexbox, then i use a layout effect to grab the height from the grandparent ref and set it to the scroll parent ref
2) Due to the implementaion of react virtual the width of the items in the tree is not correct. By default all the content overflows the box and the box doesnt grow automatically to fill the content. I think this is due to absolute positioning which breaks all the normal layout engine rules. The fix is to get the scrollWidth of the parent scroll view. (scrollWidth is the width of the element including overflow) and then set it via the refs we have on the tree item elements. This is also done in a layout effect.

changelog: UIDebugger virtualized UI to improve rendering performance

Reviewed By: aigoncharov

Differential Revision: D46724776

fbshipit-source-id: 75a6d35542066bd788aa4536481dedc72f667fc1
2023-06-19 05:06:52 -07:00
Luke De Feo
5ce2c984a9 Bloks, support NT minification map
Summary:
There were a small number of styles / attributes that were missing, this addresses this.

Similar to the bloks minification map there are some special hardcoded reserved ids, if that doesnt work then you can look into a special place for each style

I also refactored the transform metadata method as it was getting very nested and hard to understand.

Reviewed By: aigoncharov

Differential Revision: D46799392

fbshipit-source-id: 8de8a2740f45ddb23a1bc9abb7bb36f969cf1fbb
2023-06-19 05:06:52 -07:00