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
Summary: This change extracts most styles used across the inspector components and puts them in Styles.tsx
Reviewed By: passy
Differential Revision: D41026862
fbshipit-source-id: 461a78fb4a707d9a455281ec020bac95191ddfce
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
Summary:
This change exposes the env variables via the FlipperLib interface used by plugins.
The variables are already white-listed and safe to be used by plugins according to documentation.
Reviewed By: antonk52
Differential Revision: D40852147
fbshipit-source-id: bbb3b052d33bf5cf75c81166af2400fe6a359256
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
Summary: Doing this to get better logging in case we get transient failures again when fetching code snippets
Reviewed By: antonk52
Differential Revision: D41118788
fbshipit-source-id: f6cb9e20a08920f5935b14d765ac4c053ac5c78f
Summary: On older Android devices (API 24) `-printf ` is not available
Reviewed By: lblasa
Differential Revision: D40980640
fbshipit-source-id: d1a1bcadc496deaf3d514c1e45b2e0104a937b18
Summary:
Logging data for this event turnslogs into unreadable mess
{F789339377}
Reviewed By: lblasa
Differential Revision: D40978819
fbshipit-source-id: ac0894b2a490aa902180c50e7712b168211c7013
Summary: FlipperServerClient can use any socket to transfer the data. Since we do not control the socket, we cannot guarantee what comes out of it (hello, Jest E2E tunnel!). We need to handle unexpected messages gracefully.
Reviewed By: passy
Differential Revision: D40891384
fbshipit-source-id: 6f873037aa49bac3fc4c09fa49483cdec537ae40
Summary: Remove `window` reference to use flipper-server-client in NodeJS context (windows is not defined there)
Reviewed By: passy
Differential Revision: D40859805
fbshipit-source-id: 23415f9d504e4dbba4035b942c73add86edf02de
Summary: Re-expose one of the legacy exports we had before. Requested by MSYS
Reviewed By: passy
Differential Revision: D40979328
fbshipit-source-id: 7e8f089a182a62f392f3a720bee9b81698930f9d
Summary:
FlipperServerClient is a useful abstraction for any JS-based client of headless Flipper. No need to bundle it with flipper-frontend-core, as the rest is not useful for external clients.
Currently, I am planning to add it to jest-e2e to send commands to Flipper
Reviewed By: lblasa
Differential Revision: D40765668
fbshipit-source-id: af48710bb15444ac1ecd649fe9a2ab252f3088f3
Summary:
Flipper plugins fail when importing css from third-party dependencies. This diff tries to fix that.
Effectively, the plugin can import the css and export it when is bundled.
When we load the plugin, we check if there's a css file for it. If there's one, we return it and try to use it.
Reviewed By: aigoncharov
Differential Revision: D40758178
fbshipit-source-id: e53afffcc481504905d5eeb1aea1f9114ee2a86b
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/4271
Reviewed By: passy
Differential Revision: D40755392
Pulled By: aigoncharov
fbshipit-source-id: f296fe36535ff8744ddee6b6f9d2575d71c429f9
Summary:
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.65 to 1.0.66.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/dtolnay/anyhow/releases">anyhow's releases</a>.</em></p>
<blockquote>
<h2>1.0.66</h2>
<ul>
<li>Reduce unhelpful backtrace frames in backtraces captured during a <code>context</code> call (<a href="https://github-redirect.dependabot.com/dtolnay/anyhow/issues/279">https://github.com/facebook/flipper/issues/279</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="8de29aafd4"><code>8de29aa</code></a> Release 1.0.66</li>
<li><a href="54fc812209"><code>54fc812</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dtolnay/anyhow/issues/279">https://github.com/facebook/flipper/issues/279</a> from dtolnay/contextbacktrace</li>
<li><a href="131249b11c"><code>131249b</code></a> Remove 2 frames of noise from 'context' backtraces</li>
<li><a href="f2123ab51b"><code>f2123ab</code></a> Ui test changes for trybuild 1.0.66</li>
<li><a href="9bd74a1540"><code>9bd74a1</code></a> Restore pre-nightly-2022-10-05 behavior of test_path PhantomData tests</li>
<li><a href="77c4fa4566"><code>77c4fa4</code></a> Update test suite to nightly-2022-10-05</li>
<li><a href="7b171d651d"><code>7b171d6</code></a> Ignore bool_to_int_with_if clippy lint in test suite</li>
<li><a href="94ae34b0d5"><code>94ae34b</code></a> Raise minimum tested toolchain to rust 1.56</li>
<li><a href="94f6f4df66"><code>94f6f4d</code></a> Remove default package.readme metadata from Cargo.toml</li>
<li>See full diff in <a href="https://github.com/dtolnay/anyhow/compare/1.0.65...1.0.66">compare view</a></li>
</ul>
</details>
<br />
[](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/4244
Reviewed By: aigoncharov
Differential Revision: D40673596
Pulled By: passy
fbshipit-source-id: a4366270d368b88fd7f7019eb8763dde31abbc02
Summary:
Importing CSS from nested node_modules residing inside of the plugins folder breaks publish-static-docs-flipper-diff job. See D40717045.
Reverting it to unblock the release
Reviewed By: lblasa
Differential Revision: D40717654
fbshipit-source-id: ac3f4ce92d69b0e3bed9cd116678785390e26e4e
Summary:
Closes https://github.com/facebook/flipper/issues/4203
CHANGELOG: Stop doing eval to load server add-ons
On Windows `details.path` contains backslashes. When we interpolate it, it loses one of the backslashes and subsequently `require` fails to load it. If we do not interpolate it (by ditching eval) it has the double backslash and work just fine.
Reviewed By: lblasa
Differential Revision: D40715523
fbshipit-source-id: 50c52f2a53690b585a32d3009f1692cf0b0d8428
Summary: When Flipper starts with Flipper Server enabled, on Windows we forgot to attach the WebSocket handler. It led to a white screen on Electron or to connection timeout messages on Flipper Server.
Reviewed By: passy, lblasa
Differential Revision: D40679781
fbshipit-source-id: 1c8df8012efc54077409eb8891b1d82ddaf16689
Summary:
// allow-large-files
Pull Request resolved: https://github.com/facebook/flipper/pull/4265
Related to https://github.com/facebook/flipper/issues/4240
Resolving https://github.com/facebook/flipper/issues/3859 led to breaking changes in react-native-flipper which made it incompatible with react-natvie < 0.69.
In this diff we migrate our example app to react-native 0.69 and add a notice to our readme about the react-native 0.69+ requirement
Reviewed By: lblasa
Differential Revision: D40673740
fbshipit-source-id: 18f4742449d115be7a5100f2bc4d834dcebea80f
Summary:
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.9.13 to 0.9.14.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/dtolnay/serde-yaml/releases">serde_yaml's releases</a>.</em></p>
<blockquote>
<h2>0.9.14</h2>
<ul>
<li>Implement <code>Deserializer</code> for <code>TaggedValue</code> and <code>&TaggedValue</code> (<a href="https://github-redirect.dependabot.com/dtolnay/serde-yaml/issues/339">https://github.com/facebook/flipper/issues/339</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="8948d368c0"><code>8948d36</code></a> Release 0.9.14</li>
<li><a href="8d95125eed"><code>8d95125</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dtolnay/serde-yaml/issues/339">https://github.com/facebook/flipper/issues/339</a> from dtolnay/deserializertaggedvalue</li>
<li><a href="371f764d32"><code>371f764</code></a> Implement Deserializer for TaggedValue and &TaggedValue</li>
<li><a href="c5523fe475"><code>c5523fe</code></a> Replace nonstandard SError name used only in Value Deserialize</li>
<li><a href="516fdff567"><code>516fdff</code></a> Ignore uninlined_format_args pedantic clippy lint</li>
<li><a href="31fa98e396"><code>31fa98e</code></a> Pull in unsafe-libyaml 0.2.4</li>
<li>See full diff in <a href="https://github.com/dtolnay/serde-yaml/compare/0.9.13...0.9.14">compare view</a></li>
</ul>
</details>
<br />
[](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/4246
Reviewed By: aigoncharov
Differential Revision: D40673599
Pulled By: passy
fbshipit-source-id: 2222937777ededf46d0ce49f791a44b0e84db6ad
Summary:
Old hover state is now selection state
New hover state is a slightly thicker border
Reviewed By: lblasa
Differential Revision: D40637724
fbshipit-source-id: 7b13bc864bc1f626cf0982517befcb80615e7cc0
Summary:
Upgraded from ant tree library to the much more capable React complex tree. Added the following:
1. Ability to expand / collapse nodes while automatically expanding / collapsing active/inactive children when they change
2. Keyboard controls of tree all the time
3. Basic search functionality
4. Selecting node in tree focuses and scrolls in the tree
5. Hover state for tree
Reviewed By: lblasa
Differential Revision: D40633876
fbshipit-source-id: 8dcef5ec2c277e476a3eb3cdaef62b15c25323c0
Summary:
Clicking on a node a second time will unselect which was impossible before.
The behaviour of the on click handler doesnt always line up what is currently hovered, this is a temporary work around. There are deeper issues with this in that on exit we hover the parent, but in some situations the parent is too small to propagate. In future we will use the mouse position and do a hit test and drive selection / hover from that
Reviewed By: lblasa
Differential Revision: D40637356
fbshipit-source-id: 9df19dbf619845891bb46624730d7cf74f73cf25
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
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
Summary: For view pager we just want to draw the content in the center
Reviewed By: lblasa
Differential Revision: D40478266
fbshipit-source-id: 4fac7e897a0569fed59ef5810ba15300ebe87b5d
Summary:
Android does not set the top/left of the child of view pager. I attempted to solve this by grabbing the offset from the scrollview and passing it down via offset child. The issue is offsetchild has a lot of problems with the partial layout traversal. If the child of the scroll view is an observer root then the layout traversal with short circuit and setup a new observer for the child but we lose the offset child in the process.
This solution is a little dirty but it is functional for now
Reviewed By: lblasa
Differential Revision: D40430778
fbshipit-source-id: 7ad53b2a4818b55515e7662272548e2ce17e6b44
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
Summary:
Design doc: https://docs.google.com/document/d/1HLCFl46RfqG0o1mSt8SWrwf_HMfOCRg_oENioc1rkvQ/ed
It does not make too much sense to have 2 different entry points to export Flipper debug data and to create a support request. It only creates ambiguity for our users. We could open the support request form automatically for them every time. In those rare cases when they try to attach new data to an existing support request, they can always not submit the form.
Reviewed By: passy
Differential Revision: D40632145
fbshipit-source-id: 6ca454d6e885493b32ac3aad008482045dccf51d