Summary: In a previous diff the Bounds was made mandatory and the fragment bounds was set to be the same as the underlying view. this caused the offset to be doubled since the underlying view would also apply that offset. Since fragments dont contribute to layout and are purely for lifecycle we can set it to 0 and handle it on the desktop
Reviewed By: lblasa
Differential Revision: D41304500
fbshipit-source-id: 39591b3ef0c746bd7a4ec8d61fed623cc7c94944
Summary:
Previously we would only consider a node hit if the nouse pos was inside every parents. There are a few reason why this isnt ideal:
1. Fragments are return 0 bounds
2. Many hierachys (particually in litho ) have nonsensical strucutres where your parent may have hieght 0, or children overflow parents bounds. Therefore it was impossible to select many nodes but unclear why
Reviewed By: lblasa
Differential Revision: D41304499
fbshipit-source-id: d75c8060f71fa0b972f136cb11258b62a9c98ebc
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
Summary: Pretty much copy/paste from Pascal's post on data pipelines as it provides a quick overview of things involved
Reviewed By: passy
Differential Revision: D41274753
fbshipit-source-id: 337b034d2460ba448582b9dea70b835898627faa
Summary: This change alphabetically sorts the 'Under the Hood' section and adds a 'Meta' parent category for everything that is internal as to add a visual cue of what is internal and whats not.
Reviewed By: passy
Differential Revision: D41273678
fbshipit-source-id: 1acf8da184762d5924bff90b6691be1e4be92c46
Summary:
In our organization, Flipper is distributed in a version controlled way. As a result, we do not want users to manually update or receive prompts to update when a new version is available. There is already a `--updater` flag in the command line arguments for flipper.exe, but it isn't piped through. This change pipes it through and disables all update related UI when `--no-updater` is passed in.
## Changelog
Support --updater and --no-updater options for flipper.exe
Pull Request resolved: https://github.com/facebook/flipper/pull/4277
Test Plan: Ran `yarn build --win` in flipper/desktop, and launched flipper.exe from flipper/dist/win-unpacked with the `--updater`, `--no-updater` and no flags and ensured the proper behavior was observed (update UI shows by default or when `--updater` is specified, and doesn't show when `--no-updater` is specified).
Reviewed By: passy
Differential Revision: D41298321
Pulled By: mweststrate
fbshipit-source-id: 5ddfede2700954f0fdd6a111b20d0836fab25565
Summary:
There are situations where multiple siblings overlap and they are both hit. Previously we picked the first one in the hierachy. Now we produce a list of hit children. The list will not have 2 nodes in the same ancestor path.
We store the hovered nodes as a list as we may want to present a modal in future to ask user which node they indented to select. That said simply sorting nodes by area seems to give decent results so we can start with this
Reviewed By: lblasa
Differential Revision: D41220271
fbshipit-source-id: 643a369113da28e8c4749725a7aee7aa5d08c401
Summary:
The Dom events for the divs that are very close together were not firing correctly causing the old implementation to not track the hovered node correctly. This was really frustrating trying to select a node amongst many close neighbours.
The new approach uses the mouse x,y position and performs a hit test. Currently we do a dfs looking for the first deepest child that interests the mouse x,y. In a future diff we will extract a list when there are multiple candidates.
Hovered node was removed from react props since both the tree and visualisor depend on it meaning when hover state changes the whole app is rerendered. Instead we have moved hover state to an atom which is subscribed to by each visualsation node. Only if the old or new value matches the particular nodes id do we set state. The viz nodes were memo'd to prevent children renderning. The result is that for a hover change at most 2 nodes out of the 500 or so will rerender.
I attempted to do the same with the tree but it wasnt working with the controlled tree environment + focus state. The perf seems fine as is so will leave it for now
Reviewed By: lblasa
Differential Revision: D41218324
fbshipit-source-id: 7f80bcee256abad2689a88d7e209f92417aab672
Summary: This structure makes sense for the vizualiser which itself is a nested structure. It also saves the awkward branch of there is no key in the map.
Reviewed By: lblasa
Differential Revision: D40670371
fbshipit-source-id: 6c1b960a77749be9e8a193decf6b8d50ce6c7968
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
Summary:
Not in all environments keytar is available, but still it will be useful to be able to login to intern with Flipper, even for temporarily sessions. This solution falls back to in memory storage.
Note that the underlying assuption is that multiple different users are not connected to the same Flipper server, as this would share their session!
https://fb.workplace.com/groups/flippersupport/permalink/1498550730625580/
Reviewed By: passy
Differential Revision: D41218132
fbshipit-source-id: 6e518d742df639bfbdc9a36ed1fa56ecb363a0b0
Summary:
We want to enable backing up and restoring debug settings between app installations.
Currently it is a manual process to click into menu and perform multiple operations.
With this feature, we can export and import shared preferences which will eliminate manual steps on devices.
Reviewed By: mweststrate
Differential Revision: D40987341
fbshipit-source-id: 15dd9600ee5cfd80a085117bdba4d434e4d2198f
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