Commit Graph

1050 Commits

Author SHA1 Message Date
Andrey Goncharov
a279b9bc43 Remove fs.readFile from some plugins
Summary:
1. Remove fs.readFile from some plugins
2. Add "importFile" to FlipperLib and RenderHost

See D32492149 for context

Followups:

1. Decapitate Stella's sendToPhone
2. Decapitate crash reporter
3. Figure out how to approach navigation
4. Figure out how to approach FileSelector

Reviewed By: mweststrate

Differential Revision: D32496775

fbshipit-source-id: e150aa56a2c2c1eb12a4c03c801f76cd76485a9d
2021-11-18 09:15:30 -08:00
Andrey Goncharov
2c7bc0a952 Remove fs.write from plugins
Summary:
1. Remove "fs.writeFile" from plugins
2. Remove "showSaveDialog" from "FlipperLib"
3. Add "exportFile" to "FlipperLib" and "RenderHost"

As we are going to use Flipper in a browser as well, instead of providing low-level abstraction like "showSaveDialog", we should provide more high-level ones like "exportFile". In browsers it does not make too much sense to expose "showSaveDialog" as there is not way to use the returned file path to write to it.
In the end, "exportFile" is going to trigger a file download for browsers and show the save dialog and write to the returned file path for Electron.

Reviewed By: mweststrate

Differential Revision: D32492149

fbshipit-source-id: 0673119bdb7670a5872f5982c7d82dfc44eb7906
2021-11-18 09:15:30 -08:00
Michel Weststrate
7e50c0466a Move app/src (mostly) to flipper-ui-core/src
Summary:
This diff moves all UI code from app/src to app/flipper-ui-core. That is now slightly too much (e.g. node deps are not removed yet), but from here it should be easier to move things out again, as I don't want this diff to be open for too long to avoid too much merge conflicts.

* But at least flipper-ui-core is Electron free :)
* Killed all cross module imports as well, as they where now even more in the way
* Some unit test needed some changes, most not too big (but emotion hashes got renumbered in the snapshots, feel free to ignore that)
* Found some files that were actually meaningless (tsconfig in plugins, WatchTools files, that start generating compile errors, removed those

Follow up work:
* make flipper-ui-core configurable, and wire up flipper-server-core in Electron instead of here
* remove node deps (aigoncharov)
* figure out correct place to load GKs, plugins, make intern requests etc., and move to the correct module
* clean up deps

Reviewed By: aigoncharov

Differential Revision: D32427722

fbshipit-source-id: 14fe92e1ceb15b9dcf7bece367c8ab92df927a70
2021-11-16 05:29:21 -08:00
Pascal Hartig
54b7ce9308 Add back support for flipper://welcome
Summary:
This was removed as part of the deeplink restructuring.
Turns out this is actually useful in addition to the `flipper://`
as some normalisation algos (notably VSCode's) remove the `//`
otherwise.

Reviewed By: nikoant

Differential Revision: D32428872

fbshipit-source-id: ec89b1ab561504996da5d02521b91562245554a0
2021-11-15 06:40:08 -08:00
Andrey Goncharov
eb28fc411b Encapsulate electron bar setup
Summary: See D32311662 for details

Reviewed By: mweststrate

Differential Revision: D32357953

fbshipit-source-id: f951e82761f081876ae8e0409f00e19e87047726
2021-11-12 07:13:56 -08:00
Andrey Goncharov
15a59c3aea Combine lef nav entries under a single menu
Summary: See D32311662 for details

Reviewed By: mweststrate

Differential Revision: D32356865

fbshipit-source-id: 065a580f3ce0aacc786c1de2b5fc713a86f0567f
2021-11-12 07:13:56 -08:00
Andrey Goncharov
ed5c2bd39f Add plugin actions menu
Summary: See D32311662 for details

Reviewed By: mweststrate

Differential Revision: D32329804

fbshipit-source-id: 26670353fdf8580643afcb8bc3493384146f5574
2021-11-12 07:13:56 -08:00
Andrey Goncharov
2591d1629e Add import/export left rail menu
Summary: See D32311662 for details

Reviewed By: mweststrate

Differential Revision: D32316987

fbshipit-source-id: c2d173f981cce1b148f463d981977e23258ffc02
2021-11-12 07:13:55 -08:00
Andrey Goncharov
32f722264f Add changelog button to welcome screen
Summary:
## Overall goal
Decouple top menu from electron

## Approach

We have two options to solve it:

1. Leave the menu as-is for electron. Add a new menu to the left nav for other target envs.
2. Add a new menu to the left nav for all target envs. Leave only electron-specific options in the electron top menu.

This stack of diffs (D32311662, D32316987, D32329804, TDB) implements the second option. The primary reason is to have unified user-experience. If our users on different platforms have the same experience, it is easier for us to propagate knowledge and debug issues.

## Implementation plan

1. Move changelog to the welcome screen (D32311662)
2. Move import/export functionality to a dedicated menu in the left nav (D32316987)
3. Move plugin actions button to the toolbox with screen recording buttons (D32329804)
4. Collapse some left rail items under a single menu (D32356865)
5. Clean up the rest of electron menu items (D32357953)

## Followup

Return to re-grouping of the left rail buttons and toggles after decapitation

Reviewed By: mweststrate

Differential Revision: D32311662

fbshipit-source-id: e2c4bc1a7bd2c167335fcd6d76276ae7c4947859
2021-11-12 07:13:55 -08:00
dependabot[bot]
adaa4b544a Bump react-redux from 7.2.4 to 7.2.6 in /desktop (#3035)
Summary:
Bumps [react-redux](https://github.com/reduxjs/react-redux) from 7.2.4 to 7.2.6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/reduxjs/react-redux/releases">react-redux's releases</a>.</em></p>
<blockquote>
<h2>v7.2.6</h2>
<p><em>Shameless plug: <a href="https://spaceship.run/">I'm working on a new company called Spaceship 🚀</a> It's a tool to launch your code anywhere in one click. Check it out!</em></p>
<p>Just a quick fix for a Yarn install warning. Sorry about the noise!</p>
<h2><a href="https://github.com/reduxjs/react-redux/compare/v7.2.5...v7.2.6">Changes</a></h2>
<ul>
<li>Remove <code>workspaces</code> from our package.json to silence a Yarn warning (<a href="https://github.com/timdorr"><code>@​timdorr</code></a>)</li>
</ul>
<h2>v7.2.5</h2>
<p>This release shrinks the size of our internal <code>Subscription</code> class, and updates <code>useSelector</code> to avoid an unnecessary selector call on mount.</p>
<h2>Changes</h2>
<h3>Subscription Size Refactor</h3>
<p>Our internal <code>Subscription</code> implementation has been written as a class ever since it was added in v5.  By rewriting it as a closure factory, we were able to shave a few bytes off the final bundle size.</p>
<h3><code>useSelector</code> Mount Optimization</h3>
<p>A user noticed that <code>useSelector</code> had never been given an early &quot;bail out if the root state is the same&quot; check to match how <code>connect</code> works. This resulted in a usually-unnecessary second call to the provided selector on mount. We've added that check.</p>
<h3>Entry Point Consolidation</h3>
<p>We've consolidated the list of exported public APIs into a single file, and both the <code>index.js</code> and <code>alternate-renderers.js</code> entry points now re-export everything from that file. No meaningful change here, just shuffling lines of code around for consistency.</p>
<h2>Other Updates</h2>
<h3>React-Redux v8 and React 18 Development</h3>
<p>With <a href="https://github.com/reactwg/react-18/discussions/4">the announcement of React 18</a>, we've been working with the React team to plan our migration path to keep React-Redux fully compatible with React's upcoming features.</p>
<p>We've already <a href="https://github-redirect.dependabot.com/reduxjs/react-redux/issues/1737">migrated the React-Redux main development branch to TypeScript</a>, and are <a href="https://github-redirect.dependabot.com/reduxjs/react-redux/pull/1808">prototyping compatibility implementation updates</a>.  We'd appreciate any assistance from the community in testing out these changes so that we can ensure React-Redux works great for everyone when React 18 is ready!</p>
<h3>Internal Tooling Updates</h3>
<p>Our <code>master</code> branch now uses Yarn v2 for package management, is built with TypeScript, and we've made CI updates to test against multiple TS versions.</p>
<p>The <code>7.x</code> branch has also been updated to use Yarn v2 for consistency.</p>
<p>These only affect contributors to the React-Redux package itself.</p>
<h2>Changelog</h2>
<ul>
<li>Port entry point consolidation from 8.x branch (<a href="https://github-redirect.dependabot.com/reduxjs/react-redux/issues/1811">https://github.com/facebook/flipper/issues/1811</a> - <a href="https://github.com/markerikson"><code>@​markerikson</code></a>)</li>
<li>Update v7 branch to use Yarn v2 and improve CI process (<a href="https://github-redirect.dependabot.com/reduxjs/react-redux/issues/1810">https://github.com/facebook/flipper/issues/1810</a> - <a href="https://github.com/markerikson"><code>@​markerikson</code></a>)</li>
<li>Reduce unnecessary calls to useSelector selector (<a href="https://github-redirect.dependabot.com/reduxjs/react-redux/issues/1803">https://github.com/facebook/flipper/issues/1803</a> - <a href="https://github.com/sufian-slack"><code>@​sufian-slack</code></a> )</li>
<li>Port Subscription closure implementation from 8.x to 7.x (<a href="https://github-redirect.dependabot.com/reduxjs/react-redux/issues/1809">https://github.com/facebook/flipper/issues/1809</a> - <a href="https://github.com/mbelsky"><code>@​mbelsky</code></a>)</li>
</ul>
<p><a href="https://github.com/reduxjs/react-redux/compare/v7.2.4...v7.2.5">https://github.com/reduxjs/react-redux/compare/v7.2.4...v7.2.5</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="0bcaec4733"><code>0bcaec4</code></a> 7.2.6</li>
<li><a href="27e2332d5f"><code>27e2332</code></a> Upgrade a bunch of stuff.</li>
<li><a href="9890491d1d"><code>9890491</code></a> Backwards action steps</li>
<li><a href="e94b191886"><code>e94b191</code></a> Remove yarn and workspace for website</li>
<li><a href="0691cca518"><code>0691cca</code></a> 7.2.5</li>
<li><a href="c8f56743d6"><code>c8f5674</code></a> Port entry point consolidation from 8.x branch (<a href="https://github-redirect.dependabot.com/reduxjs/react-redux/issues/1811">https://github.com/facebook/flipper/issues/1811</a>)</li>
<li><a href="c16d3c10c1"><code>c16d3c1</code></a> Update v7 branch to use Yarn v2 and improve CI process (<a href="https://github-redirect.dependabot.com/reduxjs/react-redux/issues/1810">https://github.com/facebook/flipper/issues/1810</a>)</li>
<li><a href="099e104281"><code>099e104</code></a> Reduce unnecessary calls to useSelector selector (<a href="https://github-redirect.dependabot.com/reduxjs/react-redux/issues/1803">https://github.com/facebook/flipper/issues/1803</a>)</li>
<li><a href="e7807ef69a"><code>e7807ef</code></a> Port Subscription closure implementation from 8.x to 7.x (<a href="https://github-redirect.dependabot.com/reduxjs/react-redux/issues/1807">https://github.com/facebook/flipper/issues/1807</a>) (<a href="https://github-redirect.dependabot.com/reduxjs/react-redux/issues/1809">https://github.com/facebook/flipper/issues/1809</a>)</li>
<li><a href="2c7ef25a07"><code>2c7ef25</code></a> Bump react-native from 0.63.3 to 0.64.1 (<a href="https://github-redirect.dependabot.com/reduxjs/react-redux/issues/1773">https://github.com/facebook/flipper/issues/1773</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/reduxjs/react-redux/compare/v7.2.4...v7.2.6">compare view</a></li>
</ul>
</details>
<br />

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

Reviewed By: nikoant

Differential Revision: D32246958

Pulled By: mweststrate

fbshipit-source-id: c6b0938530f121c0674d60f2d3b476cad681ccb8
2021-11-09 04:09:51 -08:00
Michel Weststrate
8596dd951b re-expose redux connect
Summary: Some old and public plugins use `connect` from Flipper. Long deprecated, but alas, not breaking those instances doesn't cost us anything.

Reviewed By: lblasa

Differential Revision: D32245550

fbshipit-source-id: 01313ded36c042cb75c8e7841046facb3f26ec06
2021-11-08 05:51:50 -08:00
dependabot[bot]
07468fdfd1 Bump pretty-format from 27.2.5 to 27.3.1 in /desktop (#2991)
Summary:
Bumps [pretty-format](https://github.com/facebook/jest/tree/HEAD/packages/pretty-format) from 27.2.5 to 27.3.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/facebook/jest/releases">pretty-format's releases</a>.</em></p>
<blockquote>
<h2>v27.3.1</h2>
<h2>Fixes</h2>
<ul>
<li><code>[expect]</code> Make <code>expect</code> extension properties <code>configurable</code> (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11978">#11978</a>)</li>
<li><code>[expect]</code> Fix <code>.any()</code> checks on primitive wrapper classes (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11976">#11976</a>)</li>
</ul>
<h2>Chore &amp; Maintenance</h2>
<ul>
<li><code>[expect]</code> <code>BigInt</code> global is always defined, don't check for its existence at runtime (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11979">#11979</a>)</li>
<li><code>[jest-config, jest-util]</code> Use <code>ci-info</code> instead of <code>is-ci</code> to detect CI environment (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11973">#11973</a>)</li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/posva"><code>@​posva</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/11974">facebook/jest#11974</a></li>
<li><a href="https://github.com/blaky"><code>@​blaky</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/11978">facebook/jest#11978</a></li>
<li><a href="https://github.com/lobsterkatie"><code>@​lobsterkatie</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/11976">facebook/jest#11976</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/facebook/jest/compare/v27.3.0...v27.3.1">https://github.com/facebook/jest/compare/v27.3.0...v27.3.1</a></p>
<h2>27.3.0</h2>
<h2>Features</h2>
<ul>
<li><code>[jest-config]</code> Add <code>testEnvironmentOptions.html</code> to apply to jsdom input (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11950">#11950</a>)</li>
<li><code>[jest-resolver]</code> Support default export (<code>.</code>) in <code>exports</code> field <em>if</em> <code>main</code> is missing (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11919">#11919</a>)</li>
</ul>
<h2>Fixes</h2>
<ul>
<li><code>[expect]</code> Tweak and improve types (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11949">#11949</a>)</li>
<li><code>[jest-runtime]</code> Ensure absolute paths can be resolved within test modules (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11943">#11943</a>)</li>
<li><code>[jest-runtime]</code> Fix <code>instanceof</code> for <code>ModernFakeTimers</code> and <code>LegacyFakeTimers</code> methods (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11946">#11946</a>)</li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/airhorns"><code>@​airhorns</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/11943">facebook/jest#11943</a></li>
<li><a href="https://github.com/mrienstra"><code>@​mrienstra</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/11942">facebook/jest#11942</a></li>
<li><a href="https://github.com/minijus"><code>@​minijus</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/11946">facebook/jest#11946</a></li>
<li><a href="https://github.com/MarvelSQ"><code>@​MarvelSQ</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/11950">facebook/jest#11950</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/facebook/jest/compare/v27.2.5...v27.3.0">https://github.com/facebook/jest/compare/v27.2.5...v27.3.0</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/facebook/jest/blob/main/CHANGELOG.md">pretty-format's changelog</a>.</em></p>
<blockquote>
<h2>27.3.1</h2>
<h3>Fixes</h3>
<ul>
<li><code>[expect]</code> Make <code>expect</code> extension properties <code>configurable</code> (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11978">#11978</a>)</li>
<li><code>[expect]</code> Fix <code>.any()</code> checks on primitive wrapper classes (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11976">#11976</a>)</li>
</ul>
<h3>Chore &amp; Maintenance</h3>
<ul>
<li><code>[expect]</code> <code>BigInt</code> global is always defined, don't check for its existence at runtime (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11979">#11979</a>)</li>
<li><code>[jest-config, jest-util]</code> Use <code>ci-info</code> instead of <code>is-ci</code> to detect CI environment (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11973">#11973</a>)</li>
</ul>
<h2>27.3.0</h2>
<h3>Features</h3>
<ul>
<li><code>[jest-config]</code> Add <code>testEnvironmentOptions.html</code> to apply to jsdom input (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11950">#11950</a>)</li>
<li><code>[jest-resolver]</code> Support default export (<code>.</code>) in <code>exports</code> field <em>if</em> <code>main</code> is missing (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11919">#11919</a>)</li>
</ul>
<h3>Fixes</h3>
<ul>
<li><code>[expect]</code> Tweak and improve types (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11949">#11949</a>)</li>
<li><code>[jest-runtime]</code> Ensure absolute paths can be resolved within test modules (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11943">#11943</a>)</li>
<li><code>[jest-runtime]</code> Fix <code>instanceof</code> for <code>ModernFakeTimers</code> and <code>LegacyFakeTimers</code> methods (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11946">#11946</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="4f3328f322"><code>4f3328f</code></a> v27.3.1</li>
<li><a href="9d286a65c4"><code>9d286a6</code></a> chore: <code>BigInt</code> is always defined, do not conditionally check for it (<a href="https://github.com/facebook/jest/tree/HEAD/packages/pretty-format/issues/11979">#11979</a>)</li>
<li><a href="14b0c2c1d6"><code>14b0c2c</code></a> v27.3.0</li>
<li><a href="3a85065fe5"><code>3a85065</code></a> chore: use <code>unknown</code> in catch variables where possible (<a href="https://github.com/facebook/jest/tree/HEAD/packages/pretty-format/issues/11948">#11948</a>)</li>
<li>See full diff in <a href="https://github.com/facebook/jest/commits/v27.3.1/packages/pretty-format">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pretty-format&package-manager=npm_and_yarn&previous-version=27.2.5&new-version=27.3.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/2991

Reviewed By: passy

Differential Revision: D32202546

Pulled By: mweststrate

fbshipit-source-id: ca0803339e077e783392868eca4b58ee8b814b9e
2021-11-05 05:29:55 -07:00
dependabot[bot]
b9e41cc787 Bump @emotion/css from 11.1.3 to 11.5.0 in /desktop (#3020)
Summary:
Bumps [emotion/css](https://github.com/emotion-js/emotion) from 11.1.3 to 11.5.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/emotion-js/emotion/releases"><code>@​emotion/css</code>'s releases</a>.</em></p>
<blockquote>
<h2><code>@​emotion/css</code><a href="https://github.com/11"><code>@​11</code></a>.5.0</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a href="https://github-redirect.dependabot.com/emotion-js/emotion/pull/2498">https://github.com/facebook/flipper/issues/2498</a> <a href="e5beae8e32"><code>e5beae8e</code></a> Thanks <a href="https://github.com/Andarist"><code>@​Andarist</code></a>! - Fixed an edge case issue with incorrect rules being generated. When a context selector (<code>&amp;</code>) was used not at the beginning of a selector (which is not valid SCSS but is allowed by the Stylis parser that we are using) within a group of selectors containing a pseudoclass then it was not replaced correctly with the current context selector.</p>
</li>
<li>
<p>Updated dependencies [<a href="e5beae8e32"><code>e5beae8e</code></a>, <a href="9ae4a91a08"><code>9ae4a91a</code></a>, <a href="f2eda82954"><code>f2eda829</code></a>]:</p>
<ul>
<li><code>@​emotion/cache</code><a href="https://github.com/11"><code>@​11</code></a>.5.0</li>
<li><code>@​emotion/sheet</code><a href="https://github.com/1"><code>@​1</code></a>.0.3</li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="4be3391914"><code>4be3391</code></a> Version Packages (<a href="https://github-redirect.dependabot.com/emotion-js/emotion/issues/2495">https://github.com/facebook/flipper/issues/2495</a>)</li>
<li><a href="f2eda82954"><code>f2eda82</code></a> Prevent flush from raising error on detached tag (<a href="https://github-redirect.dependabot.com/emotion-js/emotion/issues/2447">https://github.com/facebook/flipper/issues/2447</a>)</li>
<li><a href="d7d768e056"><code>d7d768e</code></a> Implement automatic adding of jsxImportSource pragma definition (<a href="https://github-redirect.dependabot.com/emotion-js/emotion/issues/2353">https://github.com/facebook/flipper/issues/2353</a>)</li>
<li><a href="685bbec099"><code>685bbec</code></a> Improve readability of the <code>extractCriticalToChunks</code> example in the docs (<a href="https://github-redirect.dependabot.com/emotion-js/emotion/issues/2460">https://github.com/facebook/flipper/issues/2460</a>)</li>
<li><a href="218e4f78ca"><code>218e4f7</code></a> Add <code>RegExp</code> as a valid type for the <code>target</code> option accepted by `toHaveStyle...</li>
<li><a href="eda5e687c0"><code>eda5e68</code></a> Fix error in alternative JS environments (<a href="https://github-redirect.dependabot.com/emotion-js/emotion/issues/2500">https://github.com/facebook/flipper/issues/2500</a>)</li>
<li><a href="84522ded6e"><code>84522de</code></a> fix: update docs references (<a href="https://github-redirect.dependabot.com/emotion-js/emotion/issues/2497">https://github.com/facebook/flipper/issues/2497</a>)</li>
<li><a href="500cdd828b"><code>500cdd8</code></a> Support typings for Jest v27 (<a href="https://github-redirect.dependabot.com/emotion-js/emotion/issues/2456">https://github.com/facebook/flipper/issues/2456</a>)</li>
<li><a href="e5beae8e32"><code>e5beae8</code></a> Fixed an issue with context selector not at the beginning (<a href="https://github-redirect.dependabot.com/emotion-js/emotion/issues/2498">https://github.com/facebook/flipper/issues/2498</a>)</li>
<li><a href="63a0a6c5d1"><code>63a0a6c</code></a> Fix URLs in the <code>docs/extract-static.mdx</code> (<a href="https://github-redirect.dependabot.com/emotion-js/emotion/issues/2496">https://github.com/facebook/flipper/issues/2496</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/emotion-js/emotion/compare/emotion/css@11.1.3...@emotion/css@11.5.0">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@emotion/css&package-manager=npm_and_yarn&previous-version=11.1.3&new-version=11.5.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/3020

Reviewed By: passy

Differential Revision: D32202498

Pulled By: mweststrate

fbshipit-source-id: bcc677dad5e218a72a2e58b55632f93509ecde99
2021-11-05 05:29:55 -07:00
dependabot[bot]
3a7757e08d Bump @testing-library/dom from 8.9.1 to 8.10.1 in /desktop (#3021)
Summary:
Bumps [testing-library/dom](https://github.com/testing-library/dom-testing-library) from 8.9.1 to 8.10.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/testing-library/dom-testing-library/releases"><code>@​testing-library/dom</code>'s releases</a>.</em></p>
<blockquote>
<h2>v8.10.1</h2>
<h2><a href="https://github.com/testing-library/dom-testing-library/compare/v8.10.0...v8.10.1">8.10.1</a> (2021-10-18)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>Bump dom-accessibility-api (<a href="https://github-redirect.dependabot.com/testing-library/dom-testing-library/issues/1063">https://github.com/facebook/flipper/issues/1063</a>) (<a href="b6b9b5b038">b6b9b5b</a>)</li>
</ul>
<h2>v8.10.0</h2>
<h1><a href="https://github.com/testing-library/dom-testing-library/compare/v8.9.1...v8.10.0">8.10.0</a> (2021-10-18)</h1>
<h3>Features</h3>
<ul>
<li>Use ARIA 1.2 for role queries (<a href="https://github-redirect.dependabot.com/testing-library/dom-testing-library/issues/1058">https://github.com/facebook/flipper/issues/1058</a>) (<a href="12391821b1">1239182</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="b6b9b5b038"><code>b6b9b5b</code></a> fix: Bump dom-accessibility-api (<a href="https://github-redirect.dependabot.com/testing-library/dom-testing-library/issues/1063">https://github.com/facebook/flipper/issues/1063</a>)</li>
<li><a href="b9ae752935"><code>b9ae752</code></a> docs: add jrnail23 as a contributor for bug (<a href="https://github-redirect.dependabot.com/testing-library/dom-testing-library/issues/1062">https://github.com/facebook/flipper/issues/1062</a>)</li>
<li><a href="84d1d4f0bb"><code>84d1d4f</code></a> docs: add supervanya as a contributor for bug (<a href="https://github-redirect.dependabot.com/testing-library/dom-testing-library/issues/1061">https://github.com/facebook/flipper/issues/1061</a>)</li>
<li><a href="2b39ced921"><code>2b39ced</code></a> docs: add IanVS as a contributor for code (<a href="https://github-redirect.dependabot.com/testing-library/dom-testing-library/issues/1060">https://github.com/facebook/flipper/issues/1060</a>)</li>
<li><a href="12391821b1"><code>1239182</code></a> feat: Use ARIA 1.2 for role queries (<a href="https://github-redirect.dependabot.com/testing-library/dom-testing-library/issues/1058">https://github.com/facebook/flipper/issues/1058</a>)</li>
<li>See full diff in <a href="https://github.com/testing-library/dom-testing-library/compare/v8.9.1...v8.10.1">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@testing-library/dom&package-manager=npm_and_yarn&previous-version=8.9.1&new-version=8.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/3021

Reviewed By: passy

Differential Revision: D32202491

Pulled By: mweststrate

fbshipit-source-id: cb02542b3907b0bb1d7946c301fd5844fcb1fa42
2021-11-05 05:29:54 -07:00
dependabot[bot]
199b14a4eb Bump @emotion/react from 11.4.1 to 11.5.0 in /desktop (#3022)
Summary:
Bumps [emotion/react](https://github.com/emotion-js/emotion) from 11.4.1 to 11.5.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/emotion-js/emotion/releases"><code>@​emotion/react</code>'s releases</a>.</em></p>
<blockquote>
<h2><code>@​emotion/react</code><a href="https://github.com/11"><code>@​11</code></a>.5.0</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a href="https://github-redirect.dependabot.com/emotion-js/emotion/pull/2498">https://github.com/facebook/flipper/issues/2498</a> <a href="e5beae8e32"><code>e5beae8e</code></a> Thanks <a href="https://github.com/Andarist"><code>@​Andarist</code></a>! - Fixed an edge case issue with incorrect rules being generated. When a context selector (<code>&amp;</code>) was used not at the beginning of a selector (which is not valid SCSS but is allowed by the Stylis parser that we are using) within a group of selectors containing a pseudoclass then it was not replaced correctly with the current context selector.</p>
</li>
<li>
<p><a href="https://github-redirect.dependabot.com/emotion-js/emotion/pull/2500">https://github.com/facebook/flipper/issues/2500</a> <a href="eda5e687c0"><code>eda5e687</code></a> Thanks <a href="https://github.com/Jarred-Sumner"><code>@​Jarred-Sumner</code></a>! - Fix error loading <code>@​emotion/react</code> in alternative JS environments</p>
</li>
<li>
<p>Updated dependencies [<a href="e5beae8e32"><code>e5beae8e</code></a>, <a href="9ae4a91a08"><code>9ae4a91a</code></a>, <a href="f2eda82954"><code>f2eda829</code></a>]:</p>
<ul>
<li><code>@​emotion/cache</code><a href="https://github.com/11"><code>@​11</code></a>.5.0</li>
<li><code>@​emotion/sheet</code><a href="https://github.com/1"><code>@​1</code></a>.0.3</li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="4be3391914"><code>4be3391</code></a> Version Packages (<a href="https://github-redirect.dependabot.com/emotion-js/emotion/issues/2495">https://github.com/facebook/flipper/issues/2495</a>)</li>
<li><a href="f2eda82954"><code>f2eda82</code></a> Prevent flush from raising error on detached tag (<a href="https://github-redirect.dependabot.com/emotion-js/emotion/issues/2447">https://github.com/facebook/flipper/issues/2447</a>)</li>
<li><a href="d7d768e056"><code>d7d768e</code></a> Implement automatic adding of jsxImportSource pragma definition (<a href="https://github-redirect.dependabot.com/emotion-js/emotion/issues/2353">https://github.com/facebook/flipper/issues/2353</a>)</li>
<li><a href="685bbec099"><code>685bbec</code></a> Improve readability of the <code>extractCriticalToChunks</code> example in the docs (<a href="https://github-redirect.dependabot.com/emotion-js/emotion/issues/2460">https://github.com/facebook/flipper/issues/2460</a>)</li>
<li><a href="218e4f78ca"><code>218e4f7</code></a> Add <code>RegExp</code> as a valid type for the <code>target</code> option accepted by `toHaveStyle...</li>
<li><a href="eda5e687c0"><code>eda5e68</code></a> Fix error in alternative JS environments (<a href="https://github-redirect.dependabot.com/emotion-js/emotion/issues/2500">https://github.com/facebook/flipper/issues/2500</a>)</li>
<li><a href="84522ded6e"><code>84522de</code></a> fix: update docs references (<a href="https://github-redirect.dependabot.com/emotion-js/emotion/issues/2497">https://github.com/facebook/flipper/issues/2497</a>)</li>
<li><a href="500cdd828b"><code>500cdd8</code></a> Support typings for Jest v27 (<a href="https://github-redirect.dependabot.com/emotion-js/emotion/issues/2456">https://github.com/facebook/flipper/issues/2456</a>)</li>
<li><a href="e5beae8e32"><code>e5beae8</code></a> Fixed an issue with context selector not at the beginning (<a href="https://github-redirect.dependabot.com/emotion-js/emotion/issues/2498">https://github.com/facebook/flipper/issues/2498</a>)</li>
<li><a href="63a0a6c5d1"><code>63a0a6c</code></a> Fix URLs in the <code>docs/extract-static.mdx</code> (<a href="https://github-redirect.dependabot.com/emotion-js/emotion/issues/2496">https://github.com/facebook/flipper/issues/2496</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/emotion-js/emotion/compare/emotion/react@11.4.1...@emotion/react@11.5.0">compare view</a></li>
</ul>
</details>
<br />

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

Reviewed By: passy

Differential Revision: D32202484

Pulled By: mweststrate

fbshipit-source-id: 85c7df21741e7e19108039199c8c3671258a7c87
2021-11-05 05:29:54 -07:00
Pascal Hartig
72c886e91f Fix reading of launcher settings
Summary:
Noticed in a bug report that the read value was `[object Promise]`.

This wasn't a huge issue before because the worst case was that when writing settings, it would replace them again with the defaults, but still not great.

Reviewed By: mweststrate

Differential Revision: D32181718

fbshipit-source-id: cf6cd7aa3bd823845d6657c5466fbcdef6adac28
2021-11-05 05:03:02 -07:00
Pascal Hartig
3bc8cbc5c5 Add comments for remaining events
Summary:
Ugh, VS Code blocked on the formatter and didn't include these
in my previous commit.

Reviewed By: mweststrate

Differential Revision: D32179985

fbshipit-source-id: e8cf178996bc3b468c88023a5c48e69271758e07
2021-11-05 05:03:02 -07:00
Pascal Hartig
513c475e3d Add comments for interaction events
Summary: Per title

Reviewed By: mweststrate

Differential Revision: D32171224

fbshipit-source-id: b7610e8c10674d56e75468f46a3fd0664d70b4aa
2021-11-05 05:03:02 -07:00
Abhishek Nandwana
2f471cc2b2 Visual changes to let the user easily know what release channel they are using
Summary:
1. Added a text label similar to the launch screen that tells user the release channel they are using.
2. Show a different coloured logo when the user is using the "Insiders" channel.

I have tried to keep the style as similar to the launch screen as possible for consistency.

Reviewed By: passy

Differential Revision: D32169268

fbshipit-source-id: f119a379fce983d9df765ede94148a4deaa31c9c
2021-11-04 14:01:34 -07:00
Gerard Delmas
6bcb5a435b Hide "no application selected" warning when there is no device
Summary:
In the left App Inspect sidebar on Flipper there were two warning messages
- "no devices found"
- "no application selected"

As there can be no application selected, while no device is active, this change removes the "no application selected" warning. Resulting in only showing one warning at a time.

As I am not familiar with all the states, nor what kind of devices or applications can exist in detail, I have moved up the logic to show the "no device found" message. Then reused it for the "no application selected" visibility.

In case the upper device list can show "connecting" without an actual device in the list, the "no application selected" message will be shown.

Reviewed By: passy

Differential Revision: D32139077

fbshipit-source-id: 06456e81fbe1f86d65f9aba598ee84ed8cd6b043
2021-11-04 05:13:46 -07:00
Michel Weststrate
2e7015388c Remove remaining Electron imports from product code: paths & env
Summary:
This diff removes most remaining Electron imports, by storing env and path constants on the RenderHost. As nice side effect those paths are all cached now as well.

To make sure RenderHost is initialised before Flipper itself, forced loading Flipper through a require. Otherwise the setup is super sensitive to circular import statements, since a lot of module initialisation code depends on those paths / env vars.

Reviewed By: nikoant

Differential Revision: D31992230

fbshipit-source-id: 91beb430902272aaf4b051b35cdf12d2fc993347
2021-11-03 07:01:21 -07:00
Michel Weststrate
72ce759e61 Remove some unhandled rejections in tests
Summary: Fixed several tests that caused uncaught promise rejects to fire after the tests finished. This caused jest to fail if there are too many of them.

Reviewed By: aigoncharov

Differential Revision: D32118124

fbshipit-source-id: 50734dab6dee2efec7f056940af72858b27b1707
2021-11-03 03:14:08 -07:00
Michel Weststrate
64e791e253 Remove usage of Electron context menus
Summary: Removed the usage of electron's native context menus, and replaces it with Antd based context menu's.

Reviewed By: passy

Differential Revision: D31990756

fbshipit-source-id: 0312cbac5fd20a1a30603ce1058c03f4291b23b1
2021-10-28 07:41:00 -07:00
Michel Weststrate
25590e14b9 Move Electron stuff to separate folder, decapitate restart
Summary: Per title

Reviewed By: passy

Differential Revision: D31991715

fbshipit-source-id: 9ca58cdd26c1f540fbe09dcfc7b7f5e7a319ea7d
2021-10-28 07:41:00 -07:00
dependabot[bot]
7a19b1c8d4 Bump ws from 7.5.5 to 8.2.3 in /desktop (#3004)
Summary:
Bumps [ws](https://github.com/websockets/ws) from 7.5.5 to 8.2.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/websockets/ws/releases">ws's releases</a>.</em></p>
<blockquote>
<h2>8.2.3</h2>
<h1>Bug fixes</h1>
<ul>
<li>When context takeover is enabled, messages are now compressed even if their size
is below the value of the <code>perMessageDeflate.threshold</code> option (41ae5631).</li>
</ul>
<h2>8.2.2</h2>
<h1>Bug fixes</h1>
<ul>
<li>Some closing operations are now run only if needed (ec9377ca).</li>
</ul>
<h2>8.2.1</h2>
<h1>Bug fixes</h1>
<ul>
<li>Fixed an issue where the socket was not resumed, preventing the connection
from being closed cleanly (869c9892).</li>
</ul>
<h2>8.2.0</h2>
<h1>Features</h1>
<ul>
<li>Added <code>WebSocket.WebSocket</code> as an alias for <code>WebSocket</code> and
<code>WebSocket.WebSocketServer</code> as an alias for <code>WebSocket.Server</code> to fix name
consistency and improve interoperability with the ES module wrapper (<a href="https://github-redirect.dependabot.com/websockets/ws/issues/1935">https://github.com/facebook/flipper/issues/1935</a>).</li>
</ul>
<h2>8.1.0</h2>
<h1>Features</h1>
<ul>
<li>Added ability to skip UTF-8 validation (<a href="https://github-redirect.dependabot.com/websockets/ws/issues/1928">https://github.com/facebook/flipper/issues/1928</a>).</li>
</ul>
<h1>Bug fixes</h1>
<ul>
<li>Fixed an issue with a breaking change in Node.js master (6a72da3e).</li>
<li>Fixed a misleading error message (c95e695d).</li>
</ul>
<h2>8.0.0</h2>
<h1>Breaking changes</h1>
<ul>
<li>The <code>WebSocket</code> constructor now throws a <code>SyntaxError</code> if any of the
subprotocol names are invalid or duplicated (0aecf0c9).</li>
<li>The server now aborts the opening handshake if an invalid
<code>Sec-WebSocket-Protocol</code> header field value is received (1877ddeb).</li>
<li>The <code>protocols</code> argument of <code>handleProtocols</code> hook is no longer an <code>Array</code> but
a <code>Set</code> (1877ddeb).</li>
<li>The opening handshake is now aborted if the <code>Sec-WebSocket-Extensions</code> header
field value is empty or it begins or ends with a white space (e814110e).</li>
<li>Dropped support for Node.js &lt; 10.0.0 (552b5067).</li>
<li>The <code>WebSocket</code> constructor now throws a <code>SyntaxError</code> if the connection URL
contains a fragment identifier or if the URL's protocol is not one of <code>'ws:'</code>,
<code>'wss:'</code>, or <code>'ws+unix:'</code> (ebea038f).</li>
<li>Text messages and close reasons are no longer decoded to strings. They are</li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="cfd99b6309"><code>cfd99b6</code></a> [dist] 8.2.3</li>
<li><a href="fef7942a18"><code>fef7942</code></a> [ci] Fix typo</li>
<li><a href="41ae56313b"><code>41ae563</code></a> [fix] Ignore the <code>threshold</code> option if context takeover is enabled</li>
<li><a href="474aa3616f"><code>474aa36</code></a> [doc] Improve <code>WebSocket#{p{i,o}ng,send}()</code> documentation</li>
<li><a href="055949fd23"><code>055949f</code></a> [doc] Remove no longer needed noop function from code snippet</li>
<li><a href="5b85322f54"><code>5b85322</code></a> [ci] Update coverallsapp/github-action action to version 1.1.3</li>
<li><a href="f871195c55"><code>f871195</code></a> [doc] Update issue template</li>
<li><a href="72296e54ca"><code>72296e5</code></a> [dist] 8.2.2</li>
<li><a href="3039b6b9d2"><code>3039b6b</code></a> [doc] Change label text to CI</li>
<li><a href="04c032c51b"><code>04c032c</code></a> [ci] Use Github Actions for Windows x86 testing</li>
<li>Additional commits viewable in <a href="https://github.com/websockets/ws/compare/7.5.5...8.2.3">compare view</a></li>
</ul>
</details>
<br />

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

Reviewed By: passy

Differential Revision: D31991546

Pulled By: cekkaewnumchai

fbshipit-source-id: 029092fa88e0c4a0816574c6c18e5565b9650615
2021-10-28 06:18:12 -07:00
Pascal Hartig
2525a5efd4 Fix Flipper lints #9
Summary:
This introduces a few more lints in fact because I renamed the icon functions
to make clear that they use sync methods under the hood.

Reviewed By: timur-valiev

Differential Revision: D31964701

fbshipit-source-id: d0beb58b5b301f5428fdbfe8c65784df0d86eaad
2021-10-28 05:47:40 -07:00
Pascal Hartig
366c8f2681 Fix Flipper lints #9 1/n
Summary: Mostly ignoring things in this one because it's tests.

Reviewed By: timur-valiev

Differential Revision: D31955716

fbshipit-source-id: f799bf2b3eaae6753f41121264c777fdeda03165
2021-10-27 11:10:52 -07:00
Michel Weststrate
9763af4c96 Decouple open/save dialogs, reload, shouldUseDarkColors from Electron
Summary: Per title. Less imports from Electron.

Reviewed By: timur-valiev, aigoncharov

Differential Revision: D31923504

fbshipit-source-id: dc7557cf7c88c0c8168ba22f7dca7b3e2d339a09
2021-10-26 12:07:22 -07:00
Daniel Parreira
9ef4303a1a Add platform wizard when opening Flipper for first time
Summary: T103651722 - Added a first time wizard to pick the user platforms when the user opens it for the first time. The fact that the wizard was shown is stored in localstorage.

Reviewed By: mweststrate

Differential Revision: D31861286

fbshipit-source-id: a46c532520cd88a0c4c608d3ee314289f0407475
2021-10-25 15:05:04 -07:00
Michel Weststrate
945f133593 Remove some Electron imports
Summary: Remove some Electron imports that weren't needed

Reviewed By: passy

Differential Revision: D31893756

fbshipit-source-id: 92edeb2e00a7c37e32365bb059d00d7c730a7a92
2021-10-25 06:12:20 -07:00
Michel Weststrate
ae726e7cac Don't export Electron from index
Summary: Removed 'electron' based exports from 'flipper' package

Reviewed By: passy

Differential Revision: D31893039

fbshipit-source-id: 9dba50978d19c86bf6d89e3f967e19fc368f1f62
2021-10-25 06:12:20 -07:00
Pascal Hartig
695ba14289 More granular logging
Summary: The `'PLUGIN_DEVICE_BAIL'` event encompasses too many individual steps. This is now broken down into the various parts like closing the emulator launch dialogue, selecting multiple apps/devices or quitting the wait period.

Differential Revision: D31861520

fbshipit-source-id: ff724b461f3af8021950f4aebe87eba0b20dea79
2021-10-25 03:18:47 -07:00
Pascal Hartig
0b44931e2b Refresh on new plugins
Summary:
afcoplan found a bug in the deeplink opening flow: If a device is open but not the app that supports a supported plugin, the dialogue won't disappear once the app is connected.

That is because apps are initialised with an empty plugin list and we're doing a reference equality check to get notified of changes which won't get triggered when the deep `plugin` property is changed.

Instead, we additionally wait for the `plugin-change` event that's emitted by the client to refresh.

Differential Revision: D31861521

fbshipit-source-id: 88fc456553e218f9c8ea68435ff84bdae0d1b586
2021-10-25 03:18:47 -07:00
Pascal Hartig
ec9e3aeb6e Filter out OS devices when finding valid clients
Summary: When running debug builds, and not specifying a `device=...` qualifier as part of the deeplink, you'd get stuck on the "waiting for plugin to be launched" dialogue as Flipper would accept the local MacOS (or Windows, ...) connection as a valid client which can be quite confusing.

Reviewed By: mweststrate

Differential Revision: D31857737

fbshipit-source-id: ff568544f660c51e17b40c2aaadf058588746ef9
2021-10-22 11:29:00 -07:00
Pascal Hartig
ece8b8e1a1 Add debug logging
Summary:
Open to feedback that this is making it harder to follow the code.
I was trying to make sense of some odd opening behaviour and it helped
in that case but we can also just keep this diff around to re-apply if needed.

Reviewed By: mweststrate

Differential Revision: D31857738

fbshipit-source-id: 4ebc8685e65e1cc854586518d4f790b3ad102633
2021-10-22 11:29:00 -07:00
Michel Weststrate
75df79a248 Factored out ipcRender.send
Summary: Delegate sending events over IPC from the render process to the main process over the RenderHost interface. This basically removes all our direct usages of `ipcRenderer`.

Reviewed By: timur-valiev, aigoncharov

Differential Revision: D31828580

fbshipit-source-id: 9c1333ae55620d36c2af70aa7abc5403c2f4907c
2021-10-22 09:21:18 -07:00
Michel Weststrate
ecf2e32722 Factored out ipcRenderer.on
Summary:
Delegate receiving events from the Electron host process to the RenderHost interface.

Typed them as well while at it.

Reviewed By: timur-valiev

Differential Revision: D31828130

fbshipit-source-id: 920055de6f48512b91a433b229dbacd611c6f139
2021-10-22 09:21:18 -07:00
Michel Weststrate
27549ac5eb Move first pieces of functionality of Electron
Summary: Started abstraction some Electron specific APIs away, like process id, select directory dialogs etc.

Reviewed By: timur-valiev, aigoncharov

Differential Revision: D31827016

fbshipit-source-id: e835ac9095e63d7ea79dd0eaf7f2918ac8d09994
2021-10-22 09:21:18 -07:00
Pascal Hartig
25a6fc1ab1 Re-enable flipper:// support
Summary: We used to support invoking `flipper://` to launch Flipper. This broke with the recent changes to our deeplink handling.

Reviewed By: mweststrate

Differential Revision: D31826699

fbshipit-source-id: 09d0d16de4779bb550da884d268ca9fd60f1a9e2
2021-10-21 07:51:05 -07:00
Andrey Goncharov
37498ad5a9 Refactor server implementation for WebSockets
Summary:
Standardize WS implementation for JS environments.

Why do we need a separate server implementation for browsers?
Browser targets cannot authenticate via the default certificate exchange flow. For browser targets we verify the origin instead.
Moreover, for already forgotten reasons the initial implementation of the WS server for browsers used a different kind of message structure and added extra `connect`/`disconnect` messages. After examination, it seems the `connect`/`disconnect` flow is redundant.

Major changes:
1. Updated class hierarchy for WS server implementations.
2. Updated browser WS server to support the modern and the legacy protocols.
3. Now a websocket connection with the device is closed on error. The idea is it is highly unlikely to handle any subsequent messages properly once we observe an error. It is better to bail and reconnect. What do you think?

Reviewed By: mweststrate

Differential Revision: D31532172

fbshipit-source-id: f86aa63a40efe4d5263353cc124fac8c63b80e45
2021-10-21 03:34:15 -07:00
Anton Kastritskiy
6facf5ed0f Fix eslint warning for communist-spelling/communist-spelling rule
Summary: Fixes eslint warnings

Reviewed By: passy

Differential Revision: D31760180

fbshipit-source-id: 635e842d626c58a2a8d2ea2543bf171237e93dc4
2021-10-19 09:40:49 -07:00
Pascal Hartig
b3fa8dd6c1 Dep bump
Summary:
Took a few iterations to make offline mirror happy, but everything is green now.

allow-large-files

Reviewed By: nikoant

Differential Revision: D31690614

fbshipit-source-id: 38d0d6cb5e3f63b3707d917a1ed6fc6144762731
2021-10-19 09:21:36 -07:00
dependabot[bot]
16e3a9cb3d Bump axios from 0.21.4 to 0.22.0 in /desktop (#2940)
Summary:
Bumps [axios](https://github.com/axios/axios) from 0.21.4 to 0.22.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/axios/axios/releases">axios's releases</a>.</em></p>
<blockquote>
<h2>v0.22.0</h2>
<h3>0.22.0 (October 01, 2021)</h3>
<p>Fixes and Functionality:</p>
<ul>
<li>Caseless header comparing in HTTP adapter (<a href="https://github-redirect.dependabot.com/axios/axios/pull/2880">https://github.com/facebook/flipper/issues/2880</a>)</li>
<li>Avoid package.json import fixing issues and warnings related to this (<a href="https://github-redirect.dependabot.com/axios/axios/pull/4041">#4041</a>), (<a href="https://github-redirect.dependabot.com/axios/axios/pull/4065">#4065</a>)</li>
<li>Fixed cancelToken leakage and added AbortController support (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3305">#3305</a>)</li>
<li>Updating CI to run on release branches</li>
<li>Bump follow redirects version</li>
<li>Fixed default transitional config for custom Axios instance; (<a href="https://github-redirect.dependabot.com/axios/axios/pull/4052">#4052</a>)</li>
</ul>
<p>Huge thanks to everyone who contributed to this release via code (authors listed below) or via reviews and triaging on GitHub:</p>
<ul>
<li><a href="https://github.com/axios/axios/blob/HEAD/mailto:jasonsaayman@gmail.com">Jay</a></li>
<li><a href="https://github.com/mastermatt">Matt R. Wilson</a></li>
<li><a href="https://github.com/chinesedfan">Xianming Zhong</a></li>
<li><a href="https://github.com/DigitalBrainJS">Dmitriy Mozgovoy</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/axios/axios/blob/master/CHANGELOG.md">axios's changelog</a>.</em></p>
<blockquote>
<h3>0.22.0 (October 01, 2021)</h3>
<p>Fixes and Functionality:</p>
<ul>
<li>Caseless header comparing in HTTP adapter (<a href="https://github-redirect.dependabot.com/axios/axios/pull/2880">https://github.com/facebook/flipper/issues/2880</a>)</li>
<li>Avoid package.json import fixing issues and warnings related to this (<a href="https://github-redirect.dependabot.com/axios/axios/pull/4041">#4041</a>), (<a href="https://github-redirect.dependabot.com/axios/axios/pull/4065">#4065</a>)</li>
<li>Fixed cancelToken leakage and added AbortController support (<a href="https://github-redirect.dependabot.com/axios/axios/pull/3305">#3305</a>)</li>
<li>Updating CI to run on release branches</li>
<li>Bump follow redirects version</li>
<li>Fixed default transitional config for custom Axios instance; (<a href="https://github-redirect.dependabot.com/axios/axios/pull/4052">#4052</a>)</li>
</ul>
<p>Huge thanks to everyone who contributed to this release via code (authors listed below) or via reviews and triaging on GitHub:</p>
<ul>
<li><a href="https://github.com/axios/axios/blob/master/mailto:jasonsaayman@gmail.com">Jay</a></li>
<li><a href="https://github.com/mastermatt">Matt R. Wilson</a></li>
<li><a href="https://github.com/chinesedfan">Xianming Zhong</a></li>
<li><a href="https://github.com/DigitalBrainJS">Dmitriy Mozgovoy</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="72f14ceef7"><code>72f14ce</code></a> Updated date</li>
<li><a href="3e01600208"><code>3e01600</code></a> Prepping v0.22.0 for release</li>
<li><a href="6100f694b3"><code>6100f69</code></a> Fixed default transitional config for custom Axios instance; (<a href="https://github-redirect.dependabot.com/axios/axios/issues/4052">#4052</a>)</li>
<li><a href="ac10a254ef"><code>ac10a25</code></a> Updating CI to run on release branches</li>
<li><a href="9bcff10dfa"><code>9bcff10</code></a> Fixed cancelToken leakage; Added AbortController support; (<a href="https://github-redirect.dependabot.com/axios/axios/issues/3305">#3305</a>)</li>
<li><a href="fffa02cd2c"><code>fffa02c</code></a> Feat/export package version constant (<a href="https://github-redirect.dependabot.com/axios/axios/issues/4065">#4065</a>)</li>
<li><a href="66d188d590"><code>66d188d</code></a> fix/Avoid package.json import; (<a href="https://github-redirect.dependabot.com/axios/axios/issues/4041">#4041</a>)</li>
<li><a href="f3ca6371ca"><code>f3ca637</code></a> Caseless header comparing in HTTP adapter. (<a href="https://github-redirect.dependabot.com/axios/axios/issues/2880">https://github.com/facebook/flipper/issues/2880</a>)</li>
<li><a href="4091b075f6"><code>4091b07</code></a> Release/0.21.4 (<a href="https://github-redirect.dependabot.com/axios/axios/issues/4025">#4025</a>)</li>
<li>See full diff in <a href="https://github.com/axios/axios/compare/v0.21.4...v0.22.0">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=axios&package-manager=npm_and_yarn&previous-version=0.21.4&new-version=0.22.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/2940

Reviewed By: passy

Differential Revision: D31390489

Pulled By: jknoxville

fbshipit-source-id: 3abea61aaa89e2320b81af78a3d6d02018c5f158
2021-10-14 06:27:59 -07:00
Lucas Bento
8b270ed204 Fix Settings window hotkeys alignment and colors (#2961)
Summary:
This PR fixes a few color issues (mainly on dark mode) and the alignment of the `React Native keyboard shortcuts` hotkeys.

I also took the liberty of changing the color of a few other icons.

### Light mode

|Before|After|
|---|---|
|![image](https://user-images.githubusercontent.com/6207220/136688801-d317b9b3-8393-4443-bd39-87a4d330da10.png)|![image](https://user-images.githubusercontent.com/6207220/136688833-43e1ec2f-7c1f-4995-ba9e-afedfd3ccb26.png)|

### Dark mode

|Before|After|
|---|---|
|![image](https://user-images.githubusercontent.com/6207220/136688811-2b5f5dbc-3dc8-41c2-955a-c1af8a5637c4.png)|![image](https://user-images.githubusercontent.com/6207220/136688839-188bdc2a-d589-4c84-a1db-aa8c93ca9d61.png)|

## Changelog

Fix `Settings` window hotkeys alignment and colors.

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

Test Plan:
1. Run the app;
1. Press `⌘` + `,`;
2. Profit.

Reviewed By: mweststrate

Differential Revision: D31546032

Pulled By: passy

fbshipit-source-id: 5f7c73826cf6a367afb1ad758d1fd0451aaeb6cf
2021-10-14 06:07:46 -07:00
Pascal Hartig
91cc0ef3c0 Dep bump
Summary: Lots of open security warnings so I'm trying to catch a few that are behind patch releases at once.

Reviewed By: mweststrate

Differential Revision: D31574708

fbshipit-source-id: 5a4f2b18b50a3752b4986c4196a4bcda1e8a298c
2021-10-14 03:56:43 -07:00
dependabot[bot]
d3e28aa724 Bump @ant-design/icons from 4.6.3 to 4.7.0 in /desktop (#2944)
Summary:
Bumps [ant-design/icons](https://github.com/ant-design/ant-design-icons) from 4.6.3 to 4.7.0.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/ant-design/ant-design-icons/commits">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@ant-design/icons&package-manager=npm_and_yarn&previous-version=4.6.3&new-version=4.7.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/2944

Reviewed By: timur-valiev

Differential Revision: D31390474

Pulled By: jknoxville

fbshipit-source-id: d918dc9d3f7a49376784d9e93ddea7321d31c772
2021-10-14 03:36:37 -07:00
Michel Weststrate
a51c8caa09 Fix layout issue on plugin container
Summary: Reverted a change in D30192002 (9e5575cf69) that unintendendly caused some plugin containers to grow too big.

Reviewed By: nikoant

Differential Revision: D31609023

fbshipit-source-id: 56daa5efe6d9071a856536a59b473f17796201eb
2021-10-14 03:17:47 -07:00
Michel Weststrate
f43ff73591 Addressed some earlier diff comments
Summary: Async processed review feedback from stack D31474919 (cfd44b592a) e.o. (decapitate)

Reviewed By: passy

Differential Revision: D31608309

fbshipit-source-id: 536b3c9350f7acc40530000ecf5e46d5b074d50f
2021-10-14 03:17:47 -07:00
Michel Weststrate
d88b28330a Move app/server to flipper-server-core
Summary: moved `app/src/server` to `flipper-server-core/src` and fixed any fallout from that (aka integration points I missed on the preparing diffs).

Reviewed By: passy

Differential Revision: D31541378

fbshipit-source-id: 8a7e0169ebefa515781f6e5e0f7b926415d4b7e9
2021-10-12 16:00:52 -07:00
Michel Weststrate
3e7a6b1b4b Move metrics / tracking / error analysis to flipper-common package
Summary:
what else can I say

move_complexity

Reviewed By: passy

Differential Revision: D31483414

fbshipit-source-id: 1692c792121a3aae0843eb238040cae0445cdf54
2021-10-12 16:00:52 -07:00