Commit Graph

2926 Commits

Author SHA1 Message Date
dependabot[bot]
6d70fce96e Bump react-player from 2.10.0 to 2.10.1 in /desktop (#4021)
Summary:
Bumps [react-player](https://github.com/CookPete/react-player) from 2.10.0 to 2.10.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/cookpete/react-player/blob/master/CHANGELOG.md">react-player's changelog</a>.</em></p>
<blockquote>
<h4><a href="https://github.com/cookpete/react-player/compare/v2.10.0...v2.10.1">v2.10.1</a></h4>
<ul>
<li>don't stack event listeners <a href="https://github-redirect.dependabot.com/cookpete/react-player/pull/1186"><code>[https://github.com/facebook/flipper/issues/1186](https://github.com/CookPete/react-player/issues/1186)</code></a></li>
<li>Add flvjs error handling, pass it to props onError method. <a href="https://github-redirect.dependabot.com/cookpete/react-player/pull/1426"><code>[https://github.com/facebook/flipper/issues/1426](https://github.com/CookPete/react-player/issues/1426)</code></a></li>
<li>Allow parameters after entry_id on kaltura <a href="https://github-redirect.dependabot.com/cookpete/react-player/pull/1432"><code>[https://github.com/facebook/flipper/issues/1432](https://github.com/CookPete/react-player/issues/1432)</code></a></li>
<li>adds support for youtube short urls <a href="https://github-redirect.dependabot.com/cookpete/react-player/pull/1438"><code>[https://github.com/facebook/flipper/issues/1438](https://github.com/CookPete/react-player/issues/1438)</code></a></li>
<li>Prevent double load bug in strict mode <a href="https://github-redirect.dependabot.com/cookpete/react-player/issues/1439"><code>[https://github.com/facebook/flipper/issues/1439](https://github.com/CookPete/react-player/issues/1439)</code></a> <a href="https://github-redirect.dependabot.com/cookpete/react-player/pull/1450"><code>[https://github.com/facebook/flipper/issues/1450](https://github.com/CookPete/react-player/issues/1450)</code></a></li>
<li>Use allow rather than allowFullScreen <a href="https://github-redirect.dependabot.com/cookpete/react-player/issues/1444"><code>[https://github.com/facebook/flipper/issues/1444](https://github.com/CookPete/react-player/issues/1444)</code></a></li>
<li>yarn audit fix <a href="9ad5f387e7"><code>9ad5f38</code></a></li>
<li>Fix Player tests <a href="30314c71d6"><code>30314c7</code></a></li>
<li>Remove email from package.json <a href="646e62eb0e"><code>646e62e</code></a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="9d47941374"><code>9d47941</code></a> 2.10.1</li>
<li><a href="80b2da167c"><code>80b2da1</code></a> don't stack event listeners (<a href="https://github-redirect.dependabot.com/CookPete/react-player/issues/1186">https://github.com/facebook/flipper/issues/1186</a>)</li>
<li><a href="bc8fe6bda4"><code>bc8fe6b</code></a> Add flvjs error handling, pass it to props onError method. (<a href="https://github-redirect.dependabot.com/CookPete/react-player/issues/1426">https://github.com/facebook/flipper/issues/1426</a>)</li>
<li><a href="1cfea87c2a"><code>1cfea87</code></a> Allow parameters after entry_id on kaltura (<a href="https://github-redirect.dependabot.com/CookPete/react-player/issues/1432">https://github.com/facebook/flipper/issues/1432</a>)</li>
<li><a href="303f731836"><code>303f731</code></a> adds support for youtube short urls (<a href="https://github-redirect.dependabot.com/CookPete/react-player/issues/1438">https://github.com/facebook/flipper/issues/1438</a>)</li>
<li><a href="30314c71d6"><code>30314c7</code></a> Fix Player tests</li>
<li><a href="d053d4a6ca"><code>d053d4a</code></a> Prevent double load bug in strict mode</li>
<li><a href="9924137ba7"><code>9924137</code></a> Use allow rather than allowFullScreen</li>
<li><a href="646e62eb0e"><code>646e62e</code></a> Remove email from package.json</li>
<li><a href="9ad5f387e7"><code>9ad5f38</code></a> yarn audit fix</li>
<li>Additional commits viewable in <a href="https://github.com/CookPete/react-player/compare/v2.10.0...v2.10.1">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=react-player&package-manager=npm_and_yarn&previous-version=2.10.0&new-version=2.10.1)](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/4021

Reviewed By: aigoncharov

Differential Revision: D40335011

Pulled By: mweststrate

fbshipit-source-id: 5620a1a833ee2dc7f60fccaf42a7adb11fdc65f3
2022-10-14 07:37:57 -07:00
Andrey Goncharov
27fd60b659 Ignore persistToLocalStorage in headless mode
Summary:
In a headless mode we do not have access to local storage. As a result, headless plugins that try to use `persistToLocalStorage` option crash. We should ignore the option for these plugins for now and add a way to persist the plugin state to the disk in a headless mode in the future.

CHANGELOG: Ignore persistToLocalStorage in headless mode

Resolves https://github.com/facebook/flipper/issues/4190

Reviewed By: lblasa

Differential Revision: D40341873

fbshipit-source-id: 40774c0024f79cf1652f24146fd16f6a101ca99e
2022-10-14 02:26:43 -07:00
Andrey Goncharov
1f78da881e Enhance a warning about taking too much time to process plugin messages
Summary:
Without seeing the specific messages it might be hard to debug what is taking so long.

CHANGELOG: Enhance a warning about taking too much time to process plugin messages

Differential Revision: D40340272

fbshipit-source-id: a4dbd639cf389763a3cb00a190216c0e653c08e4
2022-10-13 03:40:51 -07:00
Andrey Goncharov
b5a750935d Populate the initial list of connected devices on startup
Summary:
When we start using Flipper from the CLI for automation, we want to have the list of currently connected devices as soon as flipper server is alive.
Otherwise, we would have to poll flipper server waiting for some magical moment in the future when devices connect.
This way, we can be certain that if flipper server started, but we do not see a device, it is not connected at all.

Reviewed By: mweststrate

Differential Revision: D40184106

fbshipit-source-id: ce4c2b897a2df0081e3a0b6a8c26640599e0f9e8
2022-10-13 03:20:51 -07:00
Andrey Goncharov
fbbd90e9f5 Suggest a quick fix for EADDRINUSE
Summary:
Show users a way to fix Flipper EADDRINUSE on their own without filing a support request

CHANGELOG: Better error message for EADDRINUSE

Reviewed By: mweststrate

Differential Revision: D40338164

fbshipit-source-id: ec0419c78983b55736aa773757775b5302da51e0
2022-10-13 03:14:06 -07:00
generatedunixname89002005306973
af16963251 Flipper Release: v0.170.0
Summary: Releasing version 0.170.0

Reviewed By: mweststrate

Differential Revision: D40295174

fbshipit-source-id: 3a38e99f0e4d0cda25921e0586a9a53e7f7ad4aa
2022-10-12 09:00:41 -07:00
Luke De Feo
941225e3d6 Only show node name when hovered
Summary: This makes the vizualiser a lot less cluttered

Reviewed By: lblasa

Differential Revision: D40021837

fbshipit-source-id: 8901c9bff6f05ee3fa4517e103c770be1fcfa403
2022-10-10 04:13:06 -07:00
generatedunixname89002005306973
dd99fc8e79 Flipper Release: v0.169.0
Summary: Releasing version 0.169.0

Reviewed By: lblasa

Differential Revision: D40173740

fbshipit-source-id: 6009a2621d98a706a94c5bca1121946b9604b7ab
2022-10-07 04:57:44 -07:00
Luke De Feo
71ed2f6e25 Fix deeplinks when flipper desktop is closed
Summary: Previously opening a deep link would always fail with flipper thinking the plugin did not exist.  In this diff we wait for plugins to be initialized

Differential Revision: D40142275

fbshipit-source-id: 7894fc60a6df57e13395e05263b0905847b11ad3
2022-10-07 02:52:43 -07:00
dependabot[bot]
404449d499 Bump yargs from 17.4.1 to 17.6.0 in /desktop (#4165)
Summary:
Bumps [yargs](https://github.com/yargs/yargs) from 17.4.1 to 17.6.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/yargs/yargs/blob/main/CHANGELOG.md">yargs's changelog</a>.</em></p>
<blockquote>
<h2><a href="https://github.com/yargs/yargs/compare/v17.5.1...v17.6.0">17.6.0</a> (2022-10-01)</h2>
<h3>Features</h3>
<ul>
<li><strong>lang:</strong> Czech locale (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2220">https://github.com/facebook/flipper/issues/2220</a>) (<a href="5895cf1ba1">5895cf1</a>)</li>
<li><strong>usage:</strong> add YARGS_DISABLE_WRAP env variable to disable wrap (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2210">https://github.com/facebook/flipper/issues/2210</a>) (<a href="b680ace299">b680ace</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>deno:</strong> use 'globalThis' instead of 'window' (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2186">https://github.com/facebook/flipper/issues/2186</a>) (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2215">https://github.com/facebook/flipper/issues/2215</a>) (<a href="561fc7a787">561fc7a</a>)</li>
<li><strong>deps:</strong> cliui with forced strip-ansi update (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2241">https://github.com/facebook/flipper/issues/2241</a>) (<a href="38e8df10f0">38e8df1</a>)</li>
<li>dont clobber description for multiple option calls (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2171">https://github.com/facebook/flipper/issues/2171</a>) (<a href="f91d9b334a">f91d9b3</a>)</li>
<li><strong>typescript:</strong> address warning with objectKeys (<a href="394f5f86d1">394f5f8</a>)</li>
</ul>
<h3><a href="https://github.com/yargs/yargs/compare/v17.5.0...v17.5.1">17.5.1</a> (2022-05-16)</h3>
<h3>Bug Fixes</h3>
<ul>
<li>add missing entries to published files (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2185">https://github.com/facebook/flipper/issues/2185</a>) (<a href="5685382d18">5685382</a>)</li>
<li>address bug when strict and async middleware used together (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2164">https://github.com/facebook/flipper/issues/2164</a>) (<a href="cbc2eb726e">cbc2eb7</a>)</li>
<li><strong>completion:</strong> correct zsh installation instructions (<a href="22e9af28bb">22e9af2</a>)</li>
<li>handle multiple node_modules folders determining mainFilename for ESM (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2123">https://github.com/facebook/flipper/issues/2123</a>) (<a href="e0823dd7e6">e0823dd</a>)</li>
<li><strong>lang:</strong> add missing terms to Russian translation (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2181">https://github.com/facebook/flipper/issues/2181</a>) (<a href="1c331f22c7">1c331f2</a>)</li>
<li>prevent infinite loop with empty locale (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2179">https://github.com/facebook/flipper/issues/2179</a>) (<a href="b672e709e4">b672e70</a>)</li>
<li>veriadic arguments override array provided in config (the same as multiple dash arguments). (<a href="4dac5b8c2f">4dac5b8</a>)</li>
</ul>
<h2><a href="https://github.com/yargs/yargs/compare/v17.4.1...v17.5.0">17.5.0</a> (2022-05-11)</h2>
<h3>Features</h3>
<ul>
<li>add browser.d.ts and check for existence of Error.captureStackTrace() (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2144">https://github.com/facebook/flipper/issues/2144</a>) (<a href="6192990509">6192990</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>completion:</strong> support for default flags (<a href="db35423270">db35423</a>)</li>
<li>import yargs/yargs in esm projects (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2151">https://github.com/facebook/flipper/issues/2151</a>) (<a href="95aed1c175">95aed1c</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="6cd8e2d6a4"><code>6cd8e2d</code></a> chore(main): release 17.6.0 (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2213">https://github.com/facebook/flipper/issues/2213</a>)</li>
<li><a href="38e8df10f0"><code>38e8df1</code></a> fix(deps): cliui with forced strip-ansi update (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2241">https://github.com/facebook/flipper/issues/2241</a>)</li>
<li><a href="394f5f86d1"><code>394f5f8</code></a> fix(typescript): address warning with objectKeys</li>
<li><a href="561fc7a787"><code>561fc7a</code></a> fix(deno): use 'globalThis' instead of 'window' (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2186">https://github.com/facebook/flipper/issues/2186</a>) (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2215">https://github.com/facebook/flipper/issues/2215</a>)</li>
<li><a href="5895cf1ba1"><code>5895cf1</code></a> feat(lang): Czech locale (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2220">https://github.com/facebook/flipper/issues/2220</a>)</li>
<li><a href="f91d9b334a"><code>f91d9b3</code></a> fix: dont clobber description for multiple option calls (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2171">https://github.com/facebook/flipper/issues/2171</a>)</li>
<li><a href="b680ace299"><code>b680ace</code></a> feat(usage): add YARGS_DISABLE_WRAP env variable to disable wrap (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2210">https://github.com/facebook/flipper/issues/2210</a>)</li>
<li><a href="659dbbb4a4"><code>659dbbb</code></a> docs: update links to main branch</li>
<li><a href="02515116f8"><code>0251511</code></a> chore(main): release 17.5.1 (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2187">https://github.com/facebook/flipper/issues/2187</a>)</li>
<li><a href="22e9af28bb"><code>22e9af2</code></a> fix(completion): correct zsh installation instructions</li>
<li>Additional commits viewable in <a href="https://github.com/yargs/yargs/compare/v17.4.1...v17.6.0">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=yargs&package-manager=npm_and_yarn&previous-version=17.4.1&new-version=17.6.0)](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/4165

Reviewed By: aigoncharov

Differential Revision: D40022361

Pulled By: aigoncharov

fbshipit-source-id: 5408257376334746865b27b27461ec29dea8e78a
2022-10-05 02:27:07 -07:00
generatedunixname89002005306973
84a5d8e184 Flipper Release: v0.168.0
Summary: Releasing version 0.168.0

Reviewed By: aigoncharov

Differential Revision: D40059591

fbshipit-source-id: b5ea55b6afd813cafff72b5264768bb60c7350e0
2022-10-04 08:44:13 -07:00
Andrey Goncharov
9597e672a1 Provide @emotion/css to plugins
Summary: Changelog: Provide `emotion/css` to plugins

Reviewed By: antonk52

Differential Revision: D40057817

fbshipit-source-id: 1e931eb8527d62dd4312556a6d493fdf3e17b45a
2022-10-04 05:07:36 -07:00
Aero Wang
b596c9c797 Fix electron error during build for desktop plugins (#4145)
Summary:
Related GH issue: https://github.com/facebook/flipper/issues/4139

Context:
The current direction is that all plugins should be able to run in browser envs. Opening external windows, deeplinks and etc. should be abstracted away in getFlipperLib().
For plugin developers, it could be challenging to upgrade the existing plugins that rely on electron being present. We should not failing the build process for them because their plugins depend on electron.

Allow desktop plugin to build

Relevant ticket: https://github.com/facebook/flipper/issues/4139

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

Reviewed By: mweststrate

Differential Revision: D39887902

Pulled By: mweststrate

fbshipit-source-id: 4132912b5a2b598c7897d434647cffed6980de19
2022-09-29 09:09:44 -07:00
Luke De Feo
7ae2c35476 Remove redundant native scan event
Summary: It didnt need to exist and can be seen as a subtree update of type full scan

Reviewed By: lblasa

Differential Revision: D39731552

fbshipit-source-id: e351413d9480e118fc000c5e55eae0e7980233f2
2022-09-29 05:31:18 -07:00
Luke De Feo
78e84a0cc3 added metrics for snapshot
Reviewed By: lblasa

Differential Revision: D39886448

fbshipit-source-id: b229f6947d199026c6e4bdc89def6ac0a0fa9d0a
2022-09-29 05:31:18 -07:00
generatedunixname89002005306973
dcf2380fd4 Flipper Release: v0.167.0
Summary: Releasing version 0.167.0

Reviewed By: LukeDefeo

Differential Revision: D39924111

fbshipit-source-id: 30e26a9551eb3350ba4b526dc6ca014d868dd1ea
2022-09-29 04:38:46 -07:00
Luke De Feo
9101603cf2 New nested hover implementation optimization
Summary:
A side affect of the new tree implementation was unecessary renders. For very large trees this was noticable to the user.

A condition is added to the props are equal function for the memoized component to consider if this nodes path is a prefix to the new or previous hover path. This indicates whether it needs to rerender or wether the change in hover state is unconsequential to this component.

changelog: Fixed a bug in the nested highlighting of the data inspector, previously it could remain highlighted while moving the mouse away quickly and multiple highlights could be visible at the same time

Reviewed By: mweststrate

Differential Revision: D39883905

fbshipit-source-id: abdac71574695000addb4ba6477503b7d44a4faf
2022-09-28 06:51:13 -07:00
Luke De Feo
8f9ac0d087 New implementation of nested hover
Summary:
There were 2 issues with the previous implementation of the nested hover.
1. If you moved the mouse out of the inspector quickly we would miss the event and we would have a hover state of the root element when we shouldnt
2. The hover state was stored per node, it was possible to have mulitple children hovered at the same time if you moved the mouse fast enough in a very complex tree

The new implementation has the hovered id stored in the Datainspector root. This solves the multiple state issue since there can only be one.  Finally There is an onMouseLeave hook added to the parent div which seems to reliably fire no mouse how erractic my mouse movements :) Also the new implementation is a lot easier to understand

Reviewed By: mweststrate

Differential Revision: D39855733

fbshipit-source-id: 96b43f216deef72b81cd52001f8de26df55ea693
2022-09-28 06:51:13 -07:00
Lorenzo Blasa
ee9415a8d4 Be able to handle different snapshots for different roots
Summary:
^

This change allows to take different snapshots for different nodes and render them each on the visualiser.

At the moment, more than likely, this is not really used. At the same time, it fixes an issue whereas any subtree update can override and set the only visible snapshot.

Reviewed By: LukeDefeo, antonk52

Differential Revision: D39821920

fbshipit-source-id: ab8f6a4a2a5e96801c951a4e3009cc571a617f22
2022-09-27 13:00:04 -07:00
Lorenzo Blasa
945e26d0f1 Snapshots on Visualiser
Summary:
^

TODO: the snapshot corresponds to the referring subtree update. However, the snapshot is getting applied as if it was the current top view of the running app. This is true in most cases but it doesn't for some. To solve this, we need to use the rootId for the subtree and apply the snapshot only if appropriate.

Having said that, is good enough for the current submission as we keep iterating on it.

Reviewed By: LukeDefeo

Differential Revision: D39813307

fbshipit-source-id: 33b6aff6e9dd085934150ebd2f247062447a59ff
2022-09-27 13:00:04 -07:00
Yehor Mykhaylov
f59df93378 (1/2) Hero Prefetcher Flipper Plugin
Summary: Created new/empty plugin following using scarf: https://www.internalfb.com/intern/staticdocs/flipper/docs/tutorial/intro/#scaffolding-a-new-plugin

Differential Revision: D38415194

fbshipit-source-id: 6e89f4ec59c1ec3e229766044dfcf76f0ce6c9e9
2022-09-26 18:11:46 -07:00
Andrey Goncharov
d1158e2d02 Configure eslint to prevent imports from nested paths of externally provided modules
Summary: We have a list of modules that we do not bundle with the plugins, but provide externally to them from Flipper. For the mechanism to work correctly, we have to stop importing from nested paths of these modules.

Reviewed By: mweststrate

Differential Revision: D39776237

fbshipit-source-id: 06eae9bf9d5b11b48d2720bf592bfea749773847
2022-09-26 09:42:33 -07:00
Andrey Goncharov
982193df48 Fix plugin source maps in dev mode
Summary:
Start bundling source maps together with the source code itself in the dev mode. Therefore it is no longer required to add a link to the external source map file in dev mode.
In prod mode we still ship them separately.

Reviewed By: mweststrate

Differential Revision: D39775064

fbshipit-source-id: 6c56df7a3fce084c07a8618a63dbd8ae4741348c
2022-09-26 06:54:03 -07:00
Lorenzo Blasa
dfdeffbc09 Use event handlers instead of listeners for error handing
Summary:
^

Adding listeners was correctly intercepting events but the event object often lacked the information necessary to correctly triage and fix an issue.

I discovered that by subscribing to these events directly, the event object did have the required information.

Changelog: Use global window event handlers instead of listeners

Reviewed By: antonk52

Differential Revision: D39809292

fbshipit-source-id: 8a0fc7b7cd86ea16e40f2dc383bc30364f6fc16c
2022-09-26 04:24:33 -07:00
Tianyu Yao
2bf5410316 Upgrade React DevTools deps to 4.26.0
Summary:
Changelog:
[General][Changed] - Upgraded react-devtools-core dependency to 4.26.0

Reviewed By: lunaruan

Differential Revision: D39587418

fbshipit-source-id: 1b1841b72329fd3ef4ae8a08095a30a26a0b6455
2022-09-23 12:46:33 -07:00
Andrey Goncharov
2437aeb3e9 Fix AutoResizer flickering
Summary: https://github.com/bvaughn/react-virtualized/issues/773

Differential Revision: D39772453

fbshipit-source-id: 613b809201d7dca34a0322c0cc65468f2fba2b08
2022-09-23 12:08:09 -07:00
Andrey Goncharov
228de6c542 Add custom timeout to Device.installApp
Reviewed By: lblasa

Differential Revision: D39728545

fbshipit-source-id: be77a2e7ddac4071c9cafc88e67b793ee8c7631c
2022-09-23 10:20:53 -07:00
Andrey Goncharov
dd7ba2d6fc Fix fb-stubs replacement for plugin bundling
Reviewed By: nikoant

Differential Revision: D39765543

fbshipit-source-id: 14cbf8a9bdf35031e636bbbde3dbc955faedb66b
2022-09-23 05:50:28 -07:00
Andrey Goncharov
61a8fe09e9 Stop failing the entire plugin compatibility check if a shared plugin lib fails it
Summary: Currently, if we publish a new shared plugin lib in a separate diff, the compatibility check fails for it while it should exit with a warning only

Reviewed By: antonk52

Differential Revision: D39731259

fbshipit-source-id: 7651642ebfb5e18ace047d36b52907bca65c4462
2022-09-23 04:52:42 -07:00
Jacy
5b794dc28f Fix: [Android] Flipper Leakcanary plugin's OnHeapAnalyzedListener has been deprecated (#3923)
Summary:
Flipper Leakcanary plugin's OnHeapAnalyzedListener has been deprecated.

Flipper Leakcanary plugin's OnHeapAnalyzedListener has been deprecated change to EventListener implement.

## Changelog

1. add FlipperLeakEventListener.kt to implement EventListener.
2. update doc

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

Test Plan:
Setup the  Leakcanary plugin use FlipperLeakEventListener, test if it works.

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

|**Modified Pages**|

Reviewed By: antonk52

Differential Revision: D39652084

Pulled By: antonk52

fbshipit-source-id: 0afeb52dce6c1749a894a15dbb7921580c094ae6
2022-09-22 05:57:28 -07:00
Luke De Feo
67ff09563c Improved interaction between tree and visualizer
Summary:
Improved the 2 way relationship between tree and vizualiser. There are 3 states.
1. Select, this is when you click on either tree node or view. View is highlighted darker colour, sidebar shows up for that node and select is persisted when you mouse away
2. Hover, this is when you hover over a tree node or in the vizualizer, the node is highlighted a lighter colur
3. Hover while holding control - same as hover but we dont draw any children, this lets you see how parent nodes appear without their children

Reviewed By: lblasa

Differential Revision: D39695661

fbshipit-source-id: 623e479fb03567e9f15a4a4f9201b2c7884cabe4
2022-09-22 04:26:18 -07:00
Andrey Goncharov
31fb3dd5be Stop counting disabled and gatekeeped plugins as loaded
Summary: Without this change gatekeeped and disabled plugins are also counted as loaded, which results in plugin duplication in the UI

Reviewed By: lblasa

Differential Revision: D39695335

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

Reviewed By: lblasa

Differential Revision: D39693820

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

## Changelog

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

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

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

Reviewed By: antonk52

Differential Revision: D39654481

Pulled By: antonk52

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

Differential Revision: D39692937

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

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

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

Reviewed By: lblasa

Differential Revision: D39539277

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

Reviewed By: lblasa

Differential Revision: D39539278

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

Reviewed By: lblasa

Differential Revision: D39509406

fbshipit-source-id: 0f867c1f8a91b7592673ae47ba2b5db4f3500732
2022-09-21 07:02:48 -07:00
Andrey Goncharov
9d2a37812c Fix fast-refresh
Summary: Changelog: Make yarn start --fast-refreash load dynamic plugins

Reviewed By: lblasa

Differential Revision: D39653965

fbshipit-source-id: f6133ff0315c014e3e1c4c7921318a6d7db70eaf
2022-09-20 06:47:51 -07:00
Andrey Goncharov
e8392bdceb Roll out experimental flipper-server to OSS users
Reviewed By: lblasa

Differential Revision: D39651562

fbshipit-source-id: bafcb5a20cc492a58161cd41f484ce7fd33e1eaf
2022-09-20 05:13:16 -07:00
Flipper Bot
285db3a268 Flipper Release: v0.166.0
Summary: Releasing version 0.166.0

Reviewed By: aigoncharov

Differential Revision: D39649275

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

Changelog: Fix plugin loading with experimental flipper-server disabled

Reviewed By: nikoant

Differential Revision: D39633821

fbshipit-source-id: 9554f643c625620d116075ae87f573d8447850f6
2022-09-20 01:36:56 -07:00
Flipper Bot
fb51f294f1 Flipper Release: v0.165.1
Summary: Releasing version 0.165.1

Reviewed By: aigoncharov

Differential Revision: D39626532

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

Differential Revision: D39618330

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

Differential Revision: D39600455

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

Differential Revision: D38123193

fbshipit-source-id: 49229d604434d575d6aaddc818064598e7ccee92
2022-09-16 17:09:40 -07:00
Flipper Bot
4c61c53a7b Flipper Release: v0.165.0
Summary: Releasing version 0.165.0

Reviewed By: aigoncharov

Differential Revision: D39579337

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

Differential Revision: D39578561

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

Reviewed By: nikoant

Differential Revision: D39577062

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

Differential Revision: D39576201

fbshipit-source-id: cd6b11bdb0a4c89e2f84d1c4772f08acc4b86418
2022-09-16 07:22:09 -07:00