Commit Graph

2877 Commits

Author SHA1 Message Date
Luke De Feo
a89f6960dc Added tool tips to sidebar tabs and removed documentation tab
Reviewed By: lblasa

Differential Revision: D41554191

fbshipit-source-id: d14c042f3def75e33e7a2b9d5ad0a27b3303e0d4
2022-11-29 01:43:49 -08:00
Lorenzo Blasa
a8f8e081c5 Feedback request banner
Summary:
This change adds a small feedback alert banner. It will have a link to our workplace feedback group.

Additionally, it asks engineers to record their sessions.

Reviewed By: LukeDefeo

Differential Revision: D41531851

fbshipit-source-id: 7ec8ca79350e7a84ab0532065bc57187ef0055ba
2022-11-28 11:21:24 -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
f34b6f52ed The ui debugger grows up
Reviewed By: lblasa

Differential Revision: D41549291

fbshipit-source-id: d3c72c01f6b7bd2a3be8a35d5f54270b64191e21
2022-11-28 05:09:20 -08:00
Luke De Feo
b214806325 Add padding and refactor our controls component
Summary: also made the controls component full width to push down the visualiser

Reviewed By: lblasa

Differential Revision: D41548665

fbshipit-source-id: 2bca527e70c92bc0ded120e51a0880f76f7cca87
2022-11-28 05:09:20 -08:00
Luke De Feo
a93d571dc0 Unhover on mouse exit of tree
Summary: This was causing the hover state to linger which is now quite noticable in the tree

Reviewed By: lblasa

Differential Revision: D41548249

fbshipit-source-id: cdf8ed434aa064dba05ebf31773bedaef18ba007
2022-11-28 05:09:20 -08:00
Luke De Feo
6183671a5d Improve presentation of node name in hover state for visualizer
Summary: With the previous approach it was hard to read the name of the node, this should be a lot clearer. The tool top comes in a after a delay, the reason for this is because when i tried without a delay when you moved the mouse fast a ton of tooltips would appear and disappear when you passed over diffferent nodes and it was very distracting. 200ms seems to be about the sweet spot

Reviewed By: lblasa

Differential Revision: D41548248

fbshipit-source-id: 76460347730d5b1d2e968984e845be0c65255456
2022-11-28 05:09:20 -08:00
Luke De Feo
d9314c3b73 Fix Focus mode bug when is the decendant of an inactive node.
Summary: If you focus a node and then move activity then the focused nodes will no longer be active. this means that they are automatically collapsed in the tree and the visualizer wont be display it. Previously we didnt spot this and the focus state was wrong. Now we check that all parents are active whenever an update comes from client, if the focused node is no longer active after an update then we remove the focus

Reviewed By: lblasa

Differential Revision: D41548250

fbshipit-source-id: d536e0c466d9002fc53bcb43b9b29c7c7fa23ad2
2022-11-28 05:09:20 -08:00
Luke De Feo
8eb0866760 Add parent reference to desktop node
Summary: There are some situations where we are doing a traversal of the entire node hierachy looking for something. In some situtations this linear search can be replaced with a walk up the anchestory path making the code easier to understand and more efficient

Reviewed By: lblasa

Differential Revision: D41548253

fbshipit-source-id: 4fb2141282f1f9663835c3b7812d30dcc59b707e
2022-11-28 05:09:20 -08:00
Luke De Feo
57dcf72763 Added ability to pause the incoming updates from the client
Summary: There were a few subtleties around what to the auto expanding / collapsing for active children but otherwise this is quite straightforward

Reviewed By: lblasa

Differential Revision: D41548252

fbshipit-source-id: c153d00210d859463a51753dadf2e5aabeb7ea35
2022-11-28 05:09:20 -08:00
Lorenzo Blasa
56b717c197 Track performance
Summary: Track performance for subtree updates

Reviewed By: antonk52

Differential Revision: D41531057

fbshipit-source-id: b9cfd04e5d22796f026c56d2fc66c7dea8accb78
2022-11-28 02:54:42 -08:00
Lorenzo Blasa
7f5592a68b Suggest ui-debugger from layout
Summary: Increase awareness of ui-debugger by displaying a notification.

Reviewed By: LukeDefeo

Differential Revision: D41530681

fbshipit-source-id: bf0aaeb8bb5fdc88e2425371fb04155cec739ba4
2022-11-28 02:40:38 -08:00
Lorenzo Blasa
3044ddc5c1 Remove checkbox as boolean value
Summary:
Remove checkbox as we currently don't support editing values.

Instead replace with a simple 'TRUE', 'FALSE' text.

Reviewed By: antonk52

Differential Revision: D41532898

fbshipit-source-id: d4af37e30eb21ab761c39cb4ae45337247c80c9d
2022-11-25 08:14:08 -08:00
dependabot[bot]
aea6f84172 Bump @babel/generator from 7.17.10 to 7.20.4 in /desktop (#4328)
Summary:
Bumps [babel/generator](https://github.com/babel/babel/tree/HEAD/packages/babel-generator) from 7.17.10 to 7.20.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/babel/babel/releases"><code>@​babel/generator</code>'s releases</a>.</em></p>
<blockquote>
<h2>v7.20.4 (2022-11-08)</h2>
<h4>🐛 Bug Fix</h4>
<ul>
<li><code>babel-generator</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15160">#15160</a> Fix printing of comments before <code>=&gt;</code> (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li><code>babel-generator</code>, <code>babel-plugin-transform-typescript</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15144">#15144</a> Falback to printing inner comments as trailing (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
</ul>
<h4>Committers: 1</h4>
<ul>
<li>Nicolò Ribaudo (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
<h2>v7.20.2 (2022-11-04)</h2>
<h4>🐛 Bug Fix</h4>
<ul>
<li><code>babel-core</code>, <code>babel-helper-create-class-features-plugin</code>, <code>babel-helper-module-transforms</code>, <code>babel-helper-plugin-utils</code>, <code>babel-helper-simple-access</code>, <code>babel-node</code>, <code>babel-plugin-transform-block-scoping</code>, <code>babel-plugin-transform-classes</code>, <code>babel-plugin-transform-react-constant-elements</code>, <code>babel-preset-env</code>, <code>babel-standalone</code>, <code>babel-types</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15124">#15124</a> fix: <code>babel/node</code> repl and enable <code>no-use-before-define</code> rule (<a href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
<li><code>babel-plugin-transform-typescript</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15121">#15121</a> fix: <code>tsSatisfiesExpression</code> check with different duplicated <code>babel/types</code> versions (<a href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
<li><code>babel-parser</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15094">#15094</a> fix: <code>parser</code> typings for plugins (<a href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
<li><code>babel-generator</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15118">#15118</a> Improve printing of [no LineTerminator here] with comments (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li><code>babel-plugin-proposal-decorators</code>, <code>babel-plugin-proposal-object-rest-spread</code>, <code>babel-plugin-transform-jscript</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15113">#15113</a> fix: wrap anonymous class expression within statement (<a href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
<li><code>babel-plugin-transform-destructuring</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15104">#15104</a> fix: Destructuring exceptions <code>for ( let { } = 0 ; 0 ; ) </code> (<a href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
</ul>
<h4>Committers: 3</h4>
<ul>
<li>Huáng Jùnliàng (<a href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
<li>Nicolò Ribaudo (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
<li><a href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a></li>
</ul>
<h2>v7.20.1 (2022-11-01)</h2>
<p>Thanks <a href="https://github.com/ptomato"><code>@​ptomato</code></a> for your first pull request!</p>
<h4>🐛 Bug Fix</h4>
<ul>
<li><code>babel-plugin-proposal-async-generator-functions</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15103">#15103</a> fix: Compile re-declare var in <code>init</code> and <code>body</code> of <code>for await</code> (<a href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
<li><code>babel-plugin-proposal-class-properties</code>, <code>babel-traverse</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15106">#15106</a> Do not mark <code>in</code> and <code>instanceof</code> as constant expressions (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li><code>babel-helpers</code>, <code>babel-plugin-proposal-duplicate-named-capturing-groups-regex</code>, <code>babel-plugin-transform-named-capturing-groups-regex</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15092">#15092</a> Support <code>indices.groups</code> when compiling named groups in regexps (<a href="https://github.com/ptomato"><code>@​ptomato</code></a>)</li>
</ul>
</li>
<li><code>babel-parser</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15102">#15102</a> fix: Parse re-declare var in class static body  (<a href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15096">#15096</a> fix: <code>a satisfies b</code> as lval (<a href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
<li><code>babel-helpers</code>, <code>babel-plugin-proposal-duplicate-named-capturing-groups-regex</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15090">#15090</a> Handle multiple named groups in wrapRegExp replace() (<a href="https://github.com/ptomato"><code>@​ptomato</code></a>)</li>
</ul>
</li>
<li><code>babel-plugin-transform-async-to-generator</code>, <code>babel-plugin-transform-parameters</code>, <code>babel-preset-env</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15081">#15081</a> Move the generator body to a gen IIFE when compiling its params (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/babel/babel/blob/main/CHANGELOG.md"><code>@​babel/generator</code>'s changelog</a>.</em></p>
<blockquote>
<h2>v7.20.4 (2022-11-08)</h2>
<h4>🐛 Bug Fix</h4>
<ul>
<li><code>babel-generator</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15160">#15160</a> Fix printing of comments before <code>=&gt;</code> (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li><code>babel-generator</code>, <code>babel-plugin-transform-typescript</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15144">#15144</a> Falback to printing inner comments as trailing (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
</ul>
<h2>v7.20.3 (2022-11-07)</h2>
<h4>🐛 Bug Fix</h4>
<ul>
<li><code>babel-generator</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15135">#15135</a> Don't convert line comments containing <code>*/</code> to block comments (<a href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
<li><code>babel-plugin-transform-parameters</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15146">#15146</a> Fix compilation of parameters in async generators (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li><code>babel-parser</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15134">#15134</a> fix: support await as for-of-lhs (<a href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
</ul>
<h2>v7.20.2 (2022-11-04)</h2>
<h4>🐛 Bug Fix</h4>
<ul>
<li><code>babel-core</code>, <code>babel-helper-create-class-features-plugin</code>, <code>babel-helper-module-transforms</code>, <code>babel-helper-plugin-utils</code>, <code>babel-helper-simple-access</code>, <code>babel-node</code>, <code>babel-plugin-transform-block-scoping</code>, <code>babel-plugin-transform-classes</code>, <code>babel-plugin-transform-react-constant-elements</code>, <code>babel-preset-env</code>, <code>babel-standalone</code>, <code>babel-types</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15124">#15124</a> fix: <code>babel/node</code> repl and enable <code>no-use-before-define</code> rule (<a href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
<li><code>babel-plugin-transform-typescript</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15121">#15121</a> fix: <code>tsSatisfiesExpression</code> check with different duplicated <code>babel/types</code> versions (<a href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
<li><code>babel-parser</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15094">#15094</a> fix: <code>parser</code> typings for plugins (<a href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
<li><code>babel-generator</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15118">#15118</a> Improve printing of [no LineTerminator here] with comments (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li><code>babel-plugin-proposal-decorators</code>, <code>babel-plugin-proposal-object-rest-spread</code>, <code>babel-plugin-transform-jscript</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15113">#15113</a> fix: wrap anonymous class expression within statement (<a href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
<li><code>babel-plugin-transform-destructuring</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15104">#15104</a> fix: Destructuring exceptions <code>for ( let { } = 0 ; 0 ; ) </code> (<a href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
</ul>
<h2>v7.20.1 (2022-11-01)</h2>
<h4>🐛 Bug Fix</h4>
<ul>
<li><code>babel-plugin-proposal-async-generator-functions</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15103">#15103</a> fix: Compile re-declare var in <code>init</code> and <code>body</code> of <code>for await</code> (<a href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
<li><code>babel-plugin-proposal-class-properties</code>, <code>babel-traverse</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15106">#15106</a> Do not mark <code>in</code> and <code>instanceof</code> as constant expressions (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li><code>babel-helpers</code>, <code>babel-plugin-proposal-duplicate-named-capturing-groups-regex</code>, <code>babel-plugin-transform-named-capturing-groups-regex</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15092">#15092</a> Support <code>indices.groups</code> when compiling named groups in regexps (<a href="https://github.com/ptomato"><code>@​ptomato</code></a>)</li>
</ul>
</li>
<li><code>babel-parser</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15102">#15102</a> fix: Parse re-declare var in class static body  (<a href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15096">#15096</a> fix: <code>a satisfies b</code> as lval (<a href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
<li><code>babel-helpers</code>, <code>babel-plugin-proposal-duplicate-named-capturing-groups-regex</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15090">#15090</a> Handle multiple named groups in wrapRegExp replace() (<a href="https://github.com/ptomato"><code>@​ptomato</code></a>)</li>
</ul>
</li>
<li><code>babel-plugin-transform-async-to-generator</code>, <code>babel-plugin-transform-parameters</code>, <code>babel-preset-env</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/15081">#15081</a> Move the generator body to a gen IIFE when compiling its params (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
</ul>
<h4>🏠 Internal</h4>
<ul>
<li><code>babel-generator</code></li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="f971ad3b31"><code>f971ad3</code></a> v7.20.4</li>
<li><a href="4285d5fad8"><code>4285d5f</code></a> Fix printing of comments before <code>=&gt;</code> (<a href="https://github.com/babel/babel/tree/HEAD/packages/babel-generator/issues/15160">#15160</a>)</li>
<li><a href="156b608d48"><code>156b608</code></a> Falback to printing inner comments as trailing (<a href="https://github.com/babel/babel/tree/HEAD/packages/babel-generator/issues/15144">#15144</a>)</li>
<li><a href="7c9a8015fe"><code>7c9a801</code></a> v7.20.3</li>
<li><a href="9b8fbcd182"><code>9b8fbcd</code></a> Don't convert line comments containing <code>*/</code> to block comments (<a href="https://github.com/babel/babel/tree/HEAD/packages/babel-generator/issues/15135">#15135</a>)</li>
<li><a href="1cf9358e26"><code>1cf9358</code></a> Correct code comment typo (<a href="https://github.com/babel/babel/tree/HEAD/packages/babel-generator/issues/15149">#15149</a>)</li>
<li><a href="12a58cb58c"><code>12a58cb</code></a> v7.20.2</li>
<li><a href="1081fdc819"><code>1081fdc</code></a> Improve printing of [no LineTerminator here] with comments (<a href="https://github.com/babel/babel/tree/HEAD/packages/babel-generator/issues/15118">#15118</a>)</li>
<li><a href="1893249b67"><code>1893249</code></a> v7.20.1</li>
<li><a href="bea7a43ae3"><code>bea7a43</code></a> Automatically print inner comments (<a href="https://github.com/babel/babel/tree/HEAD/packages/babel-generator/issues/15080">#15080</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/babel/babel/commits/v7.20.4/packages/babel-generator">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@babel/generator&package-manager=npm_and_yarn&previous-version=7.17.10&new-version=7.20.4)](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/4328

Reviewed By: antonk52

Differential Revision: D41472371

Pulled By: passy

fbshipit-source-id: 51318f0317b49b16b9f3fc480122903526887bbd
2022-11-24 09:27:54 -08:00
Luke De Feo
6bb541a33f Group app wide ui state into one object
Summary: Should be a bit easier to see what UI state we are holding at the plugin instance level

Reviewed By: lblasa

Differential Revision: D41498272

fbshipit-source-id: 6d88086766efd9c39f71be7e2ce32c5058494c96
2022-11-24 09:23:16 -08:00
Luke De Feo
7fc64adfd4 Refactor out UI debugger menu item
Summary: We have to do a couple of odd things to get the context menu items to behave. The code was duplicated between tree and visualizer. This custom component removes duplication and makes the approach a bit clearer (via js doc)

Reviewed By: antonk52

Differential Revision: D41495718

fbshipit-source-id: ec98d5101e636a2c9034c656d29991d4fe348762
2022-11-24 09:23:16 -08:00
Luke De Feo
ca67bfd916 Add context menu to visualizer
Summary: Added context menu to visualizer similar to what we have on the tree

Reviewed By: lblasa

Differential Revision: D41494948

fbshipit-source-id: 0cfa4c98b7a68462a7103ed1ce9eaaff8c99aeee
2022-11-24 09:23:16 -08:00
Luke De Feo
f78899b69f Store context menu open in app wide state to disable all hover effects which cause rerenders and mess up the context menu
Summary: Mouse over event still fires for the dom nodes behind the context menu modal. This will cause state changes and rerenders. Some of the state the context menu depends on can change so it would cause the context menu items to change while its stil open. Now we dont fire those hover state changes while context menu active

Reviewed By: lblasa

Differential Revision: D41494947

fbshipit-source-id: 17918f15d74230d9c7070a4de7a0a0ce10a08001
2022-11-24 09:23:16 -08:00
Luke De Feo
32fe3948d9 Fix issue with visualizer hovering offscreen nodes
Summary: If a node has a global negative offset (e.g from a view pager) its position will be outside of the visualizors bounds and could potentially be where the tree is. The user doesnt see the wireframes since overflow hidden is on the parent node. A situation can arise where when the mouse is over the tree the hit test returns an offscreen node and causes us to hover a random node rather than the tree node hover effect taking place. We are just adding a guard to say if the mouse is outside the dom rect for the root visualization node than dont run the hit test

Reviewed By: lblasa

Differential Revision: D41493001

fbshipit-source-id: ea7974de7f2b80126d52490526a21e2a3b487d3d
2022-11-24 09:23:16 -08:00
Luke De Feo
8ae367dbf6 Added focus mode to vizualizer
Summary: Introduced an outer div which is the size of the real root node so that focusing doesnt shift the UI.

Reviewed By: antonk52

Differential Revision: D41492999

fbshipit-source-id: 336104e5d18d773953e0a58a699acc7660c4045f
2022-11-24 09:23:16 -08:00
Luke De Feo
4b566dbe03 Add ability to focus on a node to tree
Summary: Added context menu to tree nodes that 'focuses' a node. This will make the node the root of the tree. Focus state can be removed again via context menu but we could add a permanent button in the future

Reviewed By: lblasa

Differential Revision: D41493002

fbshipit-source-id: 43ec7a25aeea0b169cbcbb1ac20ac22ea893fee2
2022-11-24 09:23:16 -08:00
Luke De Feo
01f7fa34e5 Remove per node snapshot in favour of single top level snapshot
Summary: In order to support focus mode we need to have only 1 snapshot. In practice this is the case but we are making this more apparant in this diff.

Reviewed By: lblasa

Differential Revision: D41493003

fbshipit-source-id: 19ed7213d15adaea4732f4ec60309efa8dae6f94
2022-11-24 09:23:16 -08:00
Luke De Feo
b576060339 Pretty loading spinner
Reviewed By: antonk52

Differential Revision: D41343098

fbshipit-source-id: 69b75e7a93344d2a05fa6fac9f466126feaf8cad
2022-11-24 09:23:16 -08:00
Luke De Feo
3722ac1fea Permanent search bar
Summary: Out of the box the library search has some issues. when search matches it steals focus from the input. Eventually we want to customise the rendering of the tree items anyway so this lays the foundation for taht

Reviewed By: antonk52

Differential Revision: D41336524

fbshipit-source-id: 194f67023edd0675cd9bd8d6134260439c6b2785
2022-11-24 09:23:16 -08:00
Lorenzo Blasa
43f44652f4 Change snapshots format to png
Summary:
There was an issue whereas snapshots were not properly rendered on retina devices.

After running a few tests, the issue seems to be solved by changing the snapshot format from jpeg to png.

Reviewed By: antonk52

Differential Revision: D41520939

fbshipit-source-id: 1563fe89162e41f71418357a7e58caaf46581f04
2022-11-24 07:14:55 -08:00
Kevin Strider
89740f7e0a Features
Summary: This diff includes minor changes to the pages within the Features section of Flipper Docs.

Reviewed By: passy

Differential Revision: D41471000

fbshipit-source-id: 0a414d1e5e0cff5d874d3fe6eab647c3877b9caf
2022-11-24 06:18:38 -08:00
Kevin Strider
98d2f37f10 Setup - Part 2
Summary: This diff includes minor changes to the pages within the Setup section of Flipper Docs.

Reviewed By: mweststrate

Differential Revision: D41496698

fbshipit-source-id: a338931bd08e474ee348e25798463647f9a0be29
2022-11-24 06:18:36 -08:00
Lorenzo Blasa
c23f62219b Rename raw attributes flag to rawEnabled
Summary:
^

IMHO, this is a better name.

... and secretly make it enabled by default

Reviewed By: LukeDefeo

Differential Revision: D41495973

fbshipit-source-id: f287a4beadb70587ff43ac896213a20746dd8c22
2022-11-23 08:31:13 -08:00
Lorenzo Blasa
ef64abb495 Improve color inspector
Summary:
Before this change, color inspector used a color picker that showed: color, rgba, hex.

The problem is that engineers have to click on it to see these values.

This change leaves the picker as is, but presents both hex and rgba inlined within the inspector thus avoiding extra interactions.

Reviewed By: antonk52

Differential Revision: D41495740

fbshipit-source-id: c8af01e3060d2e6725295418293b1e30679c1b1f
2022-11-23 08:31:13 -08:00
Hamdullah Shah
dbf3108c36 Fix Sidebar Size
Summary: Set width of sidebar for `main` position in `MasterDetail`.

Reviewed By: mweststrate

Differential Revision: D41493698

fbshipit-source-id: a9f4804256a7ee46ed32f367e8b21ff57dd484e0
2022-11-23 05:25:48 -08:00
Lorenzo Blasa
ae5eeb137d Add unknown type support in visualiser
Summary:
^

In this case, the unknown value, which is a text will be displayed as sent by the client.

Reviewed By: antonk52

Differential Revision: D41494094

fbshipit-source-id: 9295e3f7e055a8ce9b430137600108a4cdf32c90
2022-11-23 05:14:00 -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
c92a9ae03e Enrich raw data with metadata
Summary:
As metadata got split from attributes, raw data became harder to read.

This change annotates raw data with attribute names to ease readability and thus usability.

Reviewed By: antonk52

Differential Revision: D41400622

fbshipit-source-id: 8bebb2bd368490b9d7a2b4435749cdf0570b7571
2022-11-21 04:51:23 -08:00
Pascal Hartig
85fe53a9e2 Run date formatter test on unix only
Summary:
The test added in D41342194 (f1cbe7ed79) fails on Windows: https://github.com/facebook/flipper/actions/runs/3489945702/jobs/5840723948

Turns out this is a known issue: 1adcf2bc68/desktop/flipper-plugin-core/src/utils/__tests__/shallowSerialization.node.tsx (L228)

So, following the advice there and running it on unix only.

Reviewed By: lawrencelomax

Differential Revision: D41403510

fbshipit-source-id: e08ce4be58adf0547bffec50850c7c259b4e33d5
2022-11-21 03:39:40 -08:00
Lorenzo Blasa
1adcf2bc68 No data available
Summary: If there are no attributes for a given section, display a 'No data available' message rather than having an empty panel.

Reviewed By: antonk52

Differential Revision: D41400252

fbshipit-source-id: 0337702f638b9b917e6b3be5962838d2eb15c20d
2022-11-18 05:21:56 -08:00
Pascal Hartig
f1cbe7ed79 Fix millisecond display for date formatting
Summary: If we have a milliseconds portion of a date that's <100, we'd fill in zeroes in a symmetrical way (around the value) rather than filling in at the front, which led to some confusion.

Reviewed By: mweststrate

Differential Revision: D41342194

fbshipit-source-id: a8f60110dcad8bfa77b81abed88df0b0643c780e
2022-11-17 05:32:02 -08:00
Luke De Feo
1d920efe10 Change hit test to explore all nodes
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
2022-11-16 10:38:23 -08:00
Ranesh Saha
7a28ed1fe5 Pipe through --updater/--no-updater flag for flipper.exe (#4277)
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
2022-11-15 03:23:55 -08:00
Luke De Feo
477eae1993 Hit test can produce multiple nodes
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
2022-11-14 07:05:58 -08:00
Luke De Feo
062e87f50f Use mouse position for hit test for 2D vizualizer
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
2022-11-14 07:05:58 -08:00
Luke De Feo
bfe098485f Nested node structure for vizualiser
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
2022-11-14 07:05:58 -08:00
Michel Weststrate
7626453f55 Fall back to memory password storage if keytar is not available
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
2022-11-11 08:28:25 -08:00
Shreesh Ayachit
79bf56e72c Add export and import to Shared Preferences plugin
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
2022-11-11 07:09:09 -08:00
Lorenzo Blasa
612bd69605 Styles refactoring
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
2022-11-11 03:22:39 -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
51ca3a6cd7 Expose env via flipperLib
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
2022-11-10 12:40:27 -08:00
Lorenzo Blasa
caaded026b Big Grep Search
Summary: Add Big Grep Search for Android elements.

Reviewed By: antonk52

Differential Revision: D40634183

fbshipit-source-id: faecfc8900211478655ddff6499ff797e3136f91
2022-11-10 11:52:28 -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
generatedunixname89002005306973
019bcaeb9e Flipper Release: v0.174.0
Summary: Releasing version 0.174.0

Reviewed By: mweststrate

Differential Revision: D41154768

fbshipit-source-id: bc9dbccae2ae413024a6573ec7ba57f4933f1741
2022-11-10 06:52:13 -08:00