Commit Graph

370 Commits

Author SHA1 Message Date
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
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
Andrey Goncharov
9fc9d6f9b5 Remove redundant exports from 'flipper'
Summary: Prevent getRenderHostInstance leaking into 'flipper' types

Reviewed By: lblasa

Differential Revision: D39574678

fbshipit-source-id: 43932d73fed8b37a2a0791a312ee3d5129a4923f
2022-09-16 06:33:18 -07:00
Andrey Goncharov
fab4ee8c22 Unload stale modules from electron cache
Summary: `requirePlugin` in electron uses native `require` which has a built-in cache. Without this fix a stale version of the plugin loaded.

Reviewed By: lblasa

Differential Revision: D39542121

fbshipit-source-id: e6c4b65f9ea7b816803baaae537c234914fcb3d7
2022-09-15 10:02:19 -07:00
Andrey Goncharov
6b3298a29e Reload plugins with updated sources
Reviewed By: lblasa

Differential Revision: D39540173

fbshipit-source-id: 65f5d0f0a325d6ca3ed5e1213e689490c6b650b2
2022-09-15 10:02:19 -07:00
Andrey Goncharov
094c5bdfdd Provide external modules to plugins
Summary: esbuild references external modules via `require`. We wrap `require` to point the references to built-in modules to global variables

Reviewed By: lblasa

Differential Revision: D39311893

fbshipit-source-id: a99480161c082f4095d78c22271f114532f32c16
2022-09-15 10:02:19 -07:00
Andrey Goncharov
650ff4bcfb Remove plugin bundling
Summary: Remove the notion of bundled plugins

Reviewed By: lblasa

Differential Revision: D39308888

fbshipit-source-id: aa88ddbf2801ad1da95f89e4c761259b697b0d66
2022-09-15 10:02:19 -07:00
Andrey Goncharov
642a3ebf81 Remove default plugin entrypoints for hot-reloading
Summary: As we stopped bundling plugins in D39276249, we no longer need the entry points for the bundled plugins (these entry points are always going to be empty)

Reviewed By: lblasa

Differential Revision: D39307565

fbshipit-source-id: 43751fe31c8bd962677c226b27cfe52093d3f2d4
2022-09-15 10:02:19 -07:00
Andrey Goncharov
a888e6affa Simplify bundled plugin setup
Summary: Stop bundling plugins into Flipper Server bundles. In later diffs, we will start building all plugins even in dev mode which removes the need to bundle them.

Reviewed By: lblasa

Differential Revision: D39276249

fbshipit-source-id: 091405cfcf58aa7e1bd2b382da40f8d9841ae6b1
2022-09-15 10:02:19 -07:00
Jeferson S. Brito
2b927b4e72 fix: 404 docs links in app inspect (#4042)
Summary:
Currently, the `app inspect` tooltip at the left rail has a link to the getting started page that doesn't exist.
New path is `/docs/getting-started/`.

Also fix troubleshooting guide and no devices are found to `/docs/getting-started/troubleshooting/`

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

Reviewed By: lawrencelomax

Differential Revision: D39314971

Pulled By: lblasa

fbshipit-source-id: 000b354b60bd05211b99134b63d790bf6949060f
2022-09-08 03:45:47 -07:00
dependabot[bot]
e95b222864 Bump react-is from 17.0.2 to 18.2.0 in /desktop (#3904)
Summary:
Bumps [react-is](https://github.com/facebook/react/tree/HEAD/packages/react-is) from 17.0.2 to 18.2.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/facebook/react/releases">react-is's releases</a>.</em></p>
<blockquote>
<h2>18.2.0 (June 14, 2022)</h2>
<h3>React DOM</h3>
<ul>
<li>Provide a component stack as a second argument to <code>onRecoverableError</code>. (<a href="https://github.com/gnoff"><code>@​gnoff</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24591">#24591</a>)</li>
<li>Fix hydrating into <code>document</code> causing a blank page on mismatch. (<a href="https://github.com/gnoff"><code>@​gnoff</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24523">#24523</a>)</li>
<li>Fix false positive hydration errors with Suspense. (<a href="https://github.com/gnoff"><code>@​gnoff</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24480">#24480</a> and  <a href="https://github.com/acdlite"><code>@​acdlite</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24532">#24532</a>)</li>
<li>Fix ignored <code>setState</code> in Safari when adding an iframe. (<a href="https://github.com/gaearon"><code>@​gaearon</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24459">#24459</a>)</li>
</ul>
<h3>React DOM Server</h3>
<ul>
<li>Pass information about server errors to the client. (<a href="https://github.com/salazarm"><code>@​salazarm</code></a> and <a href="https://github.com/gnoff"><code>@​gnoff</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24551">#24551</a> and <a href="https://github-redirect.dependabot.com/facebook/react/pull/24591">#24591</a>)</li>
<li>Allow to provide a reason when aborting the HTML stream. (<a href="https://github.com/gnoff"><code>@​gnoff</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24680">#24680</a>)</li>
<li>Eliminate extraneous text separators in the HTML where possible. (<a href="https://github.com/gnoff"><code>@​gnoff</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24630">#24630</a>)</li>
<li>Disallow complex children inside <code>&lt;title&gt;</code> elements to match the browser constraints. (<a href="https://github.com/gnoff"><code>@​gnoff</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24679">#24679</a>)</li>
<li>Fix buffering in some worker environments by explicitly setting <code>highWaterMark</code> to <code>0</code>. (<a href="https://github.com/jplhomer"><code>@​jplhomer</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24641">#24641</a>)</li>
</ul>
<h3>Server Components (Experimental)</h3>
<ul>
<li>Add support for <code>useId()</code> inside Server Components. (<a href="https://github.com/gnoff"><code>@​gnoff</code></a>) in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24172">#24172</a></li>
</ul>
<h2>18.1.0 (April 26, 2022)</h2>
<h3>React DOM</h3>
<ul>
<li>Fix the false positive warning about <code>react-dom/client</code> when using UMD bundle. (<a href="https://github.com/alireza-molaee"><code>@​alireza-molaee</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24274">#24274</a>)</li>
<li>Fix <code>suppressHydrationWarning</code> to work in production too. (<a href="https://github.com/gaearon"><code>@​gaearon</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24271">#24271</a>)</li>
<li>Fix <code>componentWillUnmount</code> firing twice inside of Suspense. (<a href="https://github.com/acdlite"><code>@​acdlite</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24308">#24308</a>)</li>
<li>Fix some transition updates being ignored. (<a href="https://github.com/acdlite"><code>@​acdlite</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24353">#24353</a>)</li>
<li>Fix <code>useDeferredValue</code> causing an infinite loop when passed an unmemoized value. (<a href="https://github.com/acdlite"><code>@​acdlite</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24247">#24247</a>)</li>
<li>Fix throttling of revealing Suspense fallbacks. (<a href="https://github.com/sunderls"><code>@​sunderls</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24253">#24253</a>)</li>
<li>Fix an inconsistency in whether the props object is the same between renders. (<a href="https://github.com/Andarist"><code>@​Andarist</code></a> and <a href="https://github.com/acdlite"><code>@​acdlite</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24421">#24421</a>)</li>
<li>Fix a missing warning about a <code>setState</code> loop in <code>useEffect</code>. (<a href="https://github.com/gaearon"><code>@​gaearon</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24298">#24298</a>)</li>
<li>Fix a spurious hydration error. (<a href="https://github.com/gnoff"><code>@​gnoff</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24404">#24404</a>)</li>
<li>Warn when calling <code>setState</code> in <code>useInsertionEffect</code>. (<a href="https://github.com/gaearon"><code>@​gaearon</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24295">#24295</a>)</li>
<li>Ensure the reason for hydration errors is always displayed. (<a href="https://github.com/gaearon"><code>@​gaearon</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24276">#24276</a>)</li>
</ul>
<h3>React DOM Server</h3>
<ul>
<li>Fix escaping for the <code>bootstrapScriptContent</code> contents. (<a href="https://github.com/gnoff"><code>@​gnoff</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24385">#24385</a>)</li>
<li>Significantly improve performance of <code>renderToPipeableStream</code>. (<a href="https://github.com/gnoff"><code>@​gnoff</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24291">#24291</a>)</li>
</ul>
<h3>ESLint Plugin: React Hooks</h3>
<ul>
<li>Fix false positive errors with a large number of branches. (<a href="https://github.com/scyron6"><code>@​scyron6</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24287">#24287</a>)</li>
<li>Don't consider a known dependency stable when the variable is reassigned. (<a href="https://github.com/afzalsayed96"><code>@​afzalsayed96</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24343">#24343</a>)</li>
</ul>
<h3>Use Subscription</h3>
<ul>
<li>Replace the implementation with the <code>use-sync-external-store</code> shim. (<a href="https://github.com/gaearon"><code>@​gaearon</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24289">#24289</a>)</li>
</ul>
<h2>18.0.0 (March 29, 2022)</h2>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/facebook/react/blob/main/CHANGELOG.md">react-is's changelog</a>.</em></p>
<blockquote>
<h2>18.2.0 (June 14, 2022)</h2>
<h3>React DOM</h3>
<ul>
<li>Provide a component stack as a second argument to <code>onRecoverableError</code>. (<a href="https://github.com/gnoff"><code>@​gnoff</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24591">#24591</a>)</li>
<li>Fix hydrating into <code>document</code> causing a blank page on mismatch. (<a href="https://github.com/gnoff"><code>@​gnoff</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24523">#24523</a>)</li>
<li>Fix false positive hydration errors with Suspense. (<a href="https://github.com/gnoff"><code>@​gnoff</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24480">#24480</a> and  <a href="https://github.com/acdlite"><code>@​acdlite</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24532">#24532</a>)</li>
<li>Fix ignored <code>setState</code> in Safari when adding an iframe. (<a href="https://github.com/gaearon"><code>@​gaearon</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24459">#24459</a>)</li>
</ul>
<h3>React DOM Server</h3>
<ul>
<li>Pass information about server errors to the client. (<a href="https://github.com/salazarm"><code>@​salazarm</code></a> and <a href="https://github.com/gnoff"><code>@​gnoff</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24551">#24551</a> and <a href="https://github-redirect.dependabot.com/facebook/react/pull/24591">#24591</a>)</li>
<li>Allow to provide a reason when aborting the HTML stream. (<a href="https://github.com/gnoff"><code>@​gnoff</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24680">#24680</a>)</li>
<li>Eliminate extraneous text separators in the HTML where possible. (<a href="https://github.com/gnoff"><code>@​gnoff</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24630">#24630</a>)</li>
<li>Disallow complex children inside <code>&lt;title&gt;</code> elements to match the browser constraints. (<a href="https://github.com/gnoff"><code>@​gnoff</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24679">#24679</a>)</li>
<li>Fix buffering in some worker environments by explicitly setting <code>highWaterMark</code> to <code>0</code>. (<a href="https://github.com/jplhomer"><code>@​jplhomer</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24641">#24641</a>)</li>
</ul>
<h3>Server Components (Experimental)</h3>
<ul>
<li>Add support for <code>useId()</code> inside Server Components. (<a href="https://github.com/gnoff"><code>@​gnoff</code></a>) in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24172">#24172</a></li>
</ul>
<h2>18.1.0 (April 26, 2022)</h2>
<h3>React DOM</h3>
<ul>
<li>Fix the false positive warning about <code>react-dom/client</code> when using UMD bundle. (<a href="https://github.com/alireza-molaee"><code>@​alireza-molaee</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24274">#24274</a>)</li>
<li>Fix <code>suppressHydrationWarning</code> to work in production too. (<a href="https://github.com/gaearon"><code>@​gaearon</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24271">#24271</a>)</li>
<li>Fix <code>componentWillUnmount</code> firing twice inside of Suspense. (<a href="https://github.com/acdlite"><code>@​acdlite</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24308">#24308</a>)</li>
<li>Fix some transition updates being ignored. (<a href="https://github.com/acdlite"><code>@​acdlite</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24353">#24353</a>)</li>
<li>Fix <code>useDeferredValue</code> causing an infinite loop when passed an unmemoized value. (<a href="https://github.com/acdlite"><code>@​acdlite</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24247">#24247</a>)</li>
<li>Fix throttling of revealing Suspense fallbacks. (<a href="https://github.com/sunderls"><code>@​sunderls</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24253">#24253</a>)</li>
<li>Fix an inconsistency in whether the props object is the same between renders. (<a href="https://github.com/Andarist"><code>@​Andarist</code></a> and <a href="https://github.com/acdlite"><code>@​acdlite</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24421">#24421</a>)</li>
<li>Fix a missing warning about a <code>setState</code> loop in <code>useEffect</code>. (<a href="https://github.com/gaearon"><code>@​gaearon</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24298">#24298</a>)</li>
<li>Fix a spurious hydration error. (<a href="https://github.com/gnoff"><code>@​gnoff</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24404">#24404</a>)</li>
<li>Warn when calling <code>setState</code> in <code>useInsertionEffect</code>. (<a href="https://github.com/gaearon"><code>@​gaearon</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24295">#24295</a>)</li>
<li>Ensure the reason for hydration errors is always displayed. (<a href="https://github.com/gaearon"><code>@​gaearon</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24276">#24276</a>)</li>
</ul>
<h3>React DOM Server</h3>
<ul>
<li>Fix escaping for the <code>bootstrapScriptContent</code> contents. (<a href="https://github.com/gnoff"><code>@​gnoff</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24385">#24385</a>)</li>
<li>Significantly improve performance of <code>renderToPipeableStream</code>. (<a href="https://github.com/gnoff"><code>@​gnoff</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24291">#24291</a>)</li>
</ul>
<h3>ESLint Plugin: React Hooks</h3>
<ul>
<li>Fix false positive errors with a large number of branches. (<a href="https://github.com/scyron6"><code>@​scyron6</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24287">#24287</a>)</li>
<li>Don't consider a known dependency stable when the variable is reassigned. (<a href="https://github.com/afzalsayed96"><code>@​afzalsayed96</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24343">#24343</a>)</li>
</ul>
<h3>Use Subscription</h3>
<ul>
<li>Replace the implementation with the <code>use-sync-external-store</code> shim. (<a href="https://github.com/gaearon"><code>@​gaearon</code></a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/24289">#24289</a>)</li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="72b7462fe7"><code>72b7462</code></a> Bump local package.json versions for 18.1 release (<a href="https://github.com/facebook/react/tree/HEAD/packages/react-is/issues/24447">#24447</a>)</li>
<li><a href="34aa5cfe0d"><code>34aa5cf</code></a> Update local package.jsons for 18</li>
<li><a href="d5f1b067c8"><code>d5f1b06</code></a> [ServerContext] Flight support for ServerContext (<a href="https://github.com/facebook/react/tree/HEAD/packages/react-is/issues/23244">#23244</a>)</li>
<li><a href="0dedfcc681"><code>0dedfcc</code></a> Update the exports field (<a href="https://github.com/facebook/react/tree/HEAD/packages/react-is/issues/23257">#23257</a>)</li>
<li><a href="83564712b6"><code>8356471</code></a> Move SuspenseList to experimental channel (<a href="https://github.com/facebook/react/tree/HEAD/packages/react-is/issues/22765">#22765</a>)</li>
<li><a href="2bf4805e4b"><code>2bf4805</code></a> Update entry point exports (<a href="https://github.com/facebook/react/tree/HEAD/packages/react-is/issues/21488">#21488</a>)</li>
<li><a href="3ba5c87377"><code>3ba5c87</code></a> Remove Scheduler indirection (<a href="https://github.com/facebook/react/tree/HEAD/packages/react-is/issues/21107">#21107</a>)</li>
<li><a href="90bde6505e"><code>90bde65</code></a> Add SuspenseList to react-is (<a href="https://github.com/facebook/react/tree/HEAD/packages/react-is/issues/20874">#20874</a>)</li>
<li><a href="a2a025537d"><code>a2a0255</code></a> Fixed invalid DevTools work tags (<a href="https://github.com/facebook/react/tree/HEAD/packages/react-is/issues/20362">#20362</a>)</li>
<li><a href="eaaf4cbce7"><code>eaaf4cb</code></a> 17.0.1</li>
<li>Additional commits viewable in <a href="https://github.com/facebook/react/commits/v18.2.0/packages/react-is">compare view</a></li>
</ul>
</details>
<details>
<summary>Maintainer changes</summary>
<p>This version was pushed to npm by <a href="https://www.npmjs.com/~gnoff">gnoff</a>, a new releaser for react-is since your current version.</p>
</details>
<br />

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

Reviewed By: passy

Differential Revision: D38781408

Pulled By: mweststrate

fbshipit-source-id: 68bb86127bf12bda946a388edc421a704f5b7f32
2022-08-17 11:09:34 -07:00
Feiyu Wong
ab49b17c7b Save logs that are shown in logs plugin if persisted logging is enabled
Summary:
This is the second part of the feature which enables data/log persistence by adding a global setting which controls whether the data is wiped when the same device is disconnected and reconnected.

Building on the previous diff, this diff uses the setting from the Redux Store to determine whether to "wipe" the data or not.

Changelog: Added option in Flipper settings to persist device data upon reconnection instead of wiping everything.

Reviewed By: mweststrate

Differential Revision: D38076567

fbshipit-source-id: 83658ac09bc88921a56517e1a1f624d4a4bbc2c5
2022-07-28 13:56:34 -07:00
Feiyu Wong
3ffb25e672 Update UI for enabling persisted logs feature
Summary:
This is the first diff to implement the feature for the Flipper logs plugin to have an option to persist logs in the table between crashes, disconnections, etc.

Since this is not a local change, the UI option for persistence will be located in the settings for the Flipper UI(as seen in the test plan). The setting is associated with the Redux Store `Settings` and is stored globally to be used across all plugins. So the plan is making the persistence pertain to all plugins.

Reviewed By: mweststrate

Differential Revision: D37786988

fbshipit-source-id: 7ffc6077cbca559b3401b16770eda657a6c45620
2022-07-28 13:56:34 -07:00
Jacy
bd5ac524f5 Update some welcome links (#3902)
Summary:
Some old welcome links are 'Page Not Found'.

## Changelog

Some old links are 'Page Not Found', so update them as follows:
1. Update "Using Flipper" link to 'https://fbflipper.com/docs/features'
2. Update "Add Flipper Support to Your App" link to 'https://fbflipper.com/docs/getting-started'

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

Test Plan: Pass the test on a Mac.

Reviewed By: lblasa

Differential Revision: D37927376

Pulled By: passy

fbshipit-source-id: 0aac129932395e3f2ce3afa8c47cc637f3e814a8
2022-07-19 10:46:28 -07:00
Luke De Feo
0e11eaabb3 Finishing touches
Summary:
A few comments in my rewrite stack got missed, I am addressing them here.
In addition react testing library has been hoisted to the root module in the project and been made available to all sub modules

Reviewed By: mweststrate

Differential Revision: D37712339

fbshipit-source-id: 60984c3d16bd535b0c489570907f097c7d80f634
2022-07-11 05:15:25 -07:00
Lorenzo Blasa
ea958b0b15 MarketplacePluginDetails into flipper-common
Summary: ^

Reviewed By: antonk52

Differential Revision: D37715921

fbshipit-source-id: 05d35c472e847a7891fd4af1e88a3425e1d55f13
2022-07-11 02:39:49 -07:00
Lorenzo Blasa
caa04f4a44 Move User to flipper-common
Summary: Move User from reducers to flipper-common. User will now be usable by other modules.

Reviewed By: passy

Differential Revision: D37599802

fbshipit-source-id: 66412e7ed00bf27448fa2deae70f0e8e80303aba
2022-07-08 14:17:52 -07:00
Feiyu Wong
f46cf2b0ce Added color options for highlighting search terms
Summary:
This diff builds on the previous ones by enabling other colors to be used as highlights for the search terms. Current color options are: yellow(default), red, blue, green. Possible extensions to this feature could include allow the user to enter a custom hex-color string and use that as the highlight color.

Changelog: DataTable will now have option to have its search terms highlighted in the search results by toggling and customizing the highlight colors in the menu bar

Reviewed By: mweststrate

Differential Revision: D37383163

fbshipit-source-id: c81e383c0570ef5efbf3171b92b81a8fb2e55ea7
2022-06-29 10:36:52 -07:00
Feiyu Wong
2f39ede6f7 Highlight search terms in logs with yellow when highlight search setting is enabled
Summary: Building on the previous diff which added a setting to enable/disable highlighting search terms in the logs. This diff adds the actual highlighting and connects with the setting. The highlighting currently only supports one color, while the next diff will seek to support a preset of a "custom" colors for the highlighting

Reviewed By: mweststrate

Differential Revision: D37348441

fbshipit-source-id: 7a2b74b16f239d5e36c213e06ccb86f74eaa8df5
2022-06-29 10:36:52 -07:00
Andrey Goncharov
47956087ee Add a menu item to export Flipper logs to a file
Summary:
CHANGELOG: Add Flipper logs export to file

Allows users to export their Flipper logs with a single click. The export always includes all log levels but debug.

Reviewed By: antonk52

Differential Revision: D37485571

fbshipit-source-id: 82b02132794da30b255e6178db4a17c1ba8091ee
2022-06-28 06:27:43 -07:00
Andrey Goncharov
572678c4aa Fix loading plugins from disk/marketplace
Summary: Good ol' dynamic this

Reviewed By: nikoant

Differential Revision: D37456434

fbshipit-source-id: 7a90f1b8e6492f41eb4096f7c976e17f6a98810e
2022-06-27 08:05:31 -07:00
Lorenzo Blasa
335dec1a08 Adds some settings to check flipper-server state
Summary:
There's one setting: to enable or disable flipper-server.

However, I've added some current running state to it. If there's a better way of doing this, please do let me know.

Reviewed By: aigoncharov

Differential Revision: D37276670

fbshipit-source-id: f6c941cf0cfe55c267b9bcb9f799934fba1e28ef
2022-06-22 05:26:11 -07:00
Andrey Goncharov
3e72831699 Move most of plugin tests to flipper-frontend-core
Summary: See D37139129

Reviewed By: passy

Differential Revision: D37241829

fbshipit-source-id: d6bef24416e2b999d529fb6e275c64384c775c21
2022-06-20 12:18:40 -07:00
Andrey Goncharov
f4fc07ffd2 Move BaseDevice tests from flipper-ui-core to flipper-frontend-core
Summary: See D37139129

Reviewed By: passy

Differential Revision: D37241244

fbshipit-source-id: 3dca03e7a22c218b95702b77bb93efc983528142
2022-06-20 12:18:40 -07:00
Andrey Goncharov
115a4b7997 Use AbstractPluginInitializer from flipper-frontend-core in flipper-ui-core
Summary: See D37139129

Reviewed By: passy

Differential Revision: D37238571

fbshipit-source-id: 39d6bb87d6beacc793ef5acd71097fcc4e82969d
2022-06-20 12:18:40 -07:00
Andrey Goncharov
8768405e80 Use constants from flipper-frontend-core in flipper-ui-core
Summary: See D37139129

Reviewed By: lblasa

Differential Revision: D37238570

fbshipit-source-id: 5dbf6f179fc8957e074bad1e8f74e400644be049
2022-06-20 12:18:40 -07:00
Andrey Goncharov
68e2bc73c9 Use setGlobalObject from flipper-frontned-core in flipper-ui-core
Summary: See D37139129

Reviewed By: lblasa

Differential Revision: D37236905

fbshipit-source-id: aeb4c02cfc0e57d262fa59c045fa542819ee988c
2022-06-20 12:18:40 -07:00
Andrey Goncharov
851270589f Use flipper lib implementation from flipper-frontend-core in flipper-ui-core
Summary: See D37139129

Reviewed By: lblasa

Differential Revision: D37236771

fbshipit-source-id: 7f93140f72e89cb4a7907f07cceec1fed50cb66b
2022-06-20 12:18:40 -07:00
Andrey Goncharov
17ab7a86ef Use getRenderHost from flipper-frontned-core in flipper-ui-core
Summary: See D37139129

Reviewed By: lblasa

Differential Revision: D37236435

fbshipit-source-id: 927e9f741bfedb65165f5d24f0acfb775925cdc7
2022-06-20 12:18:40 -07:00
Andrey Goncharov
fab8849c73 Use TestDevice from flipper-frontend-core in flipper-ui-core
Summary: See D37139129

Reviewed By: lblasa

Differential Revision: D37235567

fbshipit-source-id: a0596ba71fcb8722088e51361774389a7daaebb8
2022-06-20 12:18:40 -07:00
Andrey Goncharov
a648861273 Use ArchivedDevice from flipper-frontend-core in flipper-ui-core
Summary: See D37139129

Reviewed By: lblasa

Differential Revision: D37235514

fbshipit-source-id: 54124f2b9768b068ae667b27171eaa05a693b398
2022-06-20 12:18:40 -07:00
Andrey Goncharov
fd380a4c1e Use BaseDevice from flipper-frontend-core in flipper-ui-core
Summary: Use BasDevice definition from flipper-frontend-core in flipper-ui-core and remove the redundant definition from flipper-ui-core

Reviewed By: lblasa

Differential Revision: D37234785

fbshipit-source-id: 6e768090a197c1d2c49cb1cd573acea12fb65d24
2022-06-20 12:18:40 -07:00
Andrey Goncharov
ef5fa275a3 Use AbstractClient from flipper-frontend-core in fliper-ui-core
Summary: This stack attempts to start using flipper-frontend-core from flipper-ui-core. Currently, flipper-frontend-core contains lots of copy-pasted code from flipper-ui-core.

Reviewed By: lblasa

Differential Revision: D37139198

fbshipit-source-id: 042db7492c550e10ea72c32fd15001c141bf53f9
2022-06-20 12:18:40 -07:00
Pascal Hartig
b25a212890 Remove SupportRequestFormV2
Summary: This is now replaced by the support entry point and we need to delete the calling sites before we can clean up the everstore type.

Reviewed By: lawrencelomax

Differential Revision: D37090901

fbshipit-source-id: 597684bb149783d75e46ba61113e73878bf271a8
2022-06-13 07:16:47 -07:00
Andrey Goncharov
59761ecd50 Mark deprecated plugins in the UI
Summary:
Changelog: Add a deprecation warning for deprecated plugins.

Closes https://github.com/facebook/flipper/issues/2074

Reviewed By: lblasa, antonk52

Differential Revision: D36760209

fbshipit-source-id: 64cf799644f28aeedf88824c949738a6a766b094
2022-05-30 07:32:12 -07:00
Pascal Hartig
db045a3b21 Send isHeadlessBuild flag in error reporting
Summary:
Andrey's diff already ensures that we send the flag, this also adds it to the info string
which makes it more visible.

Reviewed By: lblasa

Differential Revision: D36699070

fbshipit-source-id: 905eded9612b19ecaa35a841ec240af002e11611
2022-05-30 03:44:28 -07:00
Michel Weststrate
15e9d105c4 Restore styleguide menu entry, reordered menu
Summary: The styleguide was no longer accessible in Flipper, this diff restores that, and also cleans up the extras menu a bit to by creating a plugin devs only section.

Reviewed By: antonk52

Differential Revision: D36697071

fbshipit-source-id: a2abce40157fffd4952172f379c8063492e2dcc0
2022-05-26 04:26:20 -07:00
Michel Weststrate
9111b66916 Document Container grow / shrink properties
Summary: For some reason, the most important container property grow (and shrink) wasn't in the docs. Added that

Reviewed By: antonk52

Differential Revision: D36697072

fbshipit-source-id: 45dd0351e2a94d31972d57a9f006cd06a0d37c4e
2022-05-26 04:26:20 -07:00
Lorenzo Blasa
6d2bc5cc9a Refactor some of the types used by FBLogger into Logger
Summary:
^

This change aims to extract some bits and pieces that are not specific to FBLogger and could be used by other Logger implementations.

Reviewed By: passy

Differential Revision: D36473286

fbshipit-source-id: 57f02d132673dbac97384da4dca51bf3e6fb8738
2022-05-24 10:23:42 -07:00
Pascal Hartig
a73f736d92 Launch emulator error message
Summary:
It's not obvious for non-mobile developers how to fix it when there are no emulators available. Adding a quick section in the troubleshooting guide and linking to it.

Changelog: Add link to troubleshooting page when no emulators are available.

Reviewed By: nikoant

Differential Revision: D36599925

fbshipit-source-id: f3a1e79e07209e34b66176102c85e7797292978c
2022-05-24 07:55:40 -07:00
Pascal Hartig
f84f56614d Loading state for emulator launcher
Summary:
Our current loading state holder for the emulator launch dialogue is a "No emulators available" error message which may stay there for up to 5 seconds (in the case of only iOS enabled) before we see devices.

This adds a proper spinner that will show for as long there are pending device queries.

Changelog: Loading state for emulator launch dialogue

Reviewed By: nikoant

Differential Revision: D36598855

fbshipit-source-id: 64099596b48708b48a43f0208696a7dddc15007c
2022-05-24 07:55:40 -07:00
Pascal Hartig
fe29183014 Show custom messages for no SDKs in Launch Emulator dialog
Summary:
Our launch emulator button isn't very helpful when you don't have any SDKs set up as it shows you exactly the same message as if it was loading for a bit longer. We've seen a low, but constant flow of support requests and it's often not easy to debug remotely unless you dig into the state export.

This sets up a new actionable message when you have neither Android nor iOS support enabled and sends you straight to the settings.

Changelog: Show alert in Launch Emulator dialogue if no SDKs are enabled

Reviewed By: mweststrate

Differential Revision: D36596972

fbshipit-source-id: ba72e9aaeb136c1a7e2f360ef9fbbeec6bc76f4d
2022-05-24 07:55:40 -07:00
Pascal Hartig
b185cabbc2 Fix height of launch emu window
Summary:
A paper cut that hurt me so many times. The launch emulator window gets populated by external commands that finish at interminate points in time and change the size, jiggling the buttons around. That means, you may hover over an android emulator just when the iOS command returns and when you click, you don't hit the Android emu, but some iOS thing.

This just makes the height fixed, so this cannot happen.

Still having some more improvements in mind as this is such a high-trafficked surface.

Chanlog: Fix wiggling of the Launch Emulator dialogue as data comes in

Reviewed By: mweststrate

Differential Revision: D36595001

fbshipit-source-id: e61de55f348ab4d2f6f977552539d2a44d3fd11d
2022-05-23 11:25:33 -07:00
Muzammil Mahmood
ec6f732b09 Prevent TypeError exception on missing column.
Summary: Fix a TypeError exception in TableHead.tsx when an ordered column is not present in the row.

Reviewed By: aigoncharov

Differential Revision: D36497494

fbshipit-source-id: 18c961468fc2bc3cca16290fd9e6c973e5e18ebf
2022-05-20 02:54:00 -07:00
Kevin Strider
0b16f3a031 NEW troubleshooting section (SetUp)
Summary: Restyle of Trobleshooting, which involved changes to sidebar.js and splitting up the previous troubleshooting page into five separate pages.

Reviewed By: lblasa

Differential Revision: D36282539

fbshipit-source-id: e60834e2b4d98b70b23bb11309c3438d85e4de0e
2022-05-11 08:58:34 -07:00
Andrey Goncharov
ad76060614 Expose intern graphQL reuqests to plugins
Summary: Some intern plugins use it, an dit is currently missing in FlipperLib

Reviewed By: timur-valiev

Differential Revision: D36313032

fbshipit-source-id: 5ea8e250f1d0bc8831727abd883d953286a022d4
2022-05-11 06:48:05 -07:00
Andrey Goncharov
3ac93d301a Remove optional in plugin init/deinit
Reviewed By: mweststrate

Differential Revision: D35965072

fbshipit-source-id: 0be6b538d371e41b438263a6a4161b079861b293
2022-05-10 05:13:24 -07:00
Pascal Hartig
39317adfb7 Disable flaky PluginContainer test (#3693)
Summary:
Keeps flaking out: https://github.com/facebook/flipper/runs/6308722109?check_suite_focus=true

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

Reviewed By: aigoncharov

Differential Revision: D36170437

Pulled By: passy

fbshipit-source-id: 471e702243d68d927287aad5d1fc1d8c392b059c
2022-05-09 03:35:52 -07:00
Pascal Hartig
342e22bd87 Upgrade more /desktop deps
Summary: More bumps for patch and minor releases. allow-large-files

Reviewed By: aigoncharov

Differential Revision: D36104098

fbshipit-source-id: 6db995e660afbe4febd72aa70ed8150cc16a8c93
2022-05-04 04:03:19 -07:00
Anton Nikolaev
46340fa30a Fix UI freezes on popup opening by upgrading back React app creation from "createRoot" to "ReactDOM.render"
Summary: Fix UI freezes on popup opening by upgrading back React app creation from "createRoot" to "ReactDOM.render". These UI freezes started to happen after React upgrade because the issue in integration of Antd with React 18: https://github.com/react-component/trigger/issues/288

Reviewed By: aigoncharov

Differential Revision: D35359129

fbshipit-source-id: eb0ad979443ecf67eb2acc2e219196c9fefcff62
2022-04-04 08:00:06 -07:00