Summary:
A lot of the errors in our monitoring / logs are mere sign in errors. Many of them are unnecessary as they are features triggered automatically even when the user isn't logged in.
This diff improves error handling and prevents requires from being made / features from being used by introducing a `<RequireLogin>` component that will hide an underlying feature if the user isn't logged in.
This also prevents the support request form from failing after the user has filled in all details.
This also fixes an issue where mobilebuilds plugin didn't refresh after the user did log in.
From our monitoring error 1,9 and 10:
{F350458668}
Reviewed By: jknoxville
Differential Revision: D25494356
fbshipit-source-id: 95701381bb74c27b9ea9658dc4df678e5f0710e0
Summary: See https://github.com/facebook/flipper/issues/1755, we did hide the Sandy option in OSS, but not the dark mode option. I intend to enable & switch to Sandy in OSS after the holidays, to make it easier to deal with any possible fallout.
Reviewed By: nikoant
Differential Revision: D25460906
fbshipit-source-id: b80d751f2ff435775d08d17effb81e56db738d4d
Summary: Noticed when testing `selectClient` logic, that if plugin selection is changed programmatically rather than interactively, the selection isn't updated, and the scrolling wasn't working nicely either (since `active` collided with a non-public Ant field it always got overriden).
Reviewed By: nikoant
Differential Revision: D25460681
fbshipit-source-id: 1854ee8b9e6b2a2580f2143cd834ac1eacd296a9
Summary:
Introduced API to replace the deprecated `selectPlugin` in Sandy.
The API can be used to navigate from `device plugin -> device plugin`, or` client plugin -> device / client plugin`
Introduced `isPluginAvailable` as well, so that the user interaction an be fine tuned in case the plugin is not disabled.
Reviewed By: jknoxville
Differential Revision: D25422370
fbshipit-source-id: c6c603f1c68e6291280b3d0883e474448754ded1
Summary: In the Sandy welcome screen, the `Don't show this dialog again` checkbox couldn't not be toggled back on after it was toggled off.
Reviewed By: passy
Differential Revision: D25421721
fbshipit-source-id: c58170bb9442d1114d1197655bc58f61e47da880
Summary: This diff adds an option to wipe local storage to the settings dialog, to reset all preferences, table column widths, changelog and Nux state, etc. etc. in one go. This is primarily an self-fixing mechanism in case we mess up in the future, but useful during development / testing as well.
Reviewed By: passy
Differential Revision: D25421722
fbshipit-source-id: 3b69653b2142a7178ef83e01d35309f3a971e2cf
Summary:
`activatePlugin` events where not recorded correctly for Sandy plugins. Although the starting measuerments is fired the `connections` reducer, the completing event fires from `PluginContainer`. Since this is done as part of a ref-update (!!), see [here](https://www.internalfb.com/intern/diffusion/FBS/browse/master/xplat/sonar/desktop/app/src/PluginContainer.tsx?commit=65a625ea9941&lines=155), and the ref to the corresponding element is not set for Sandy plugins, the event was never marked as completed.
Fixed this by making it part of the `activate` life-cycle event of Sandy plugins.
Reviewed By: passy
Differential Revision: D25421537
fbshipit-source-id: 5cbfeb91cc12e4520fa271bab24034094d7ddb39
Summary: In the Flipper chrome there is a lot of `logger={logger}` prop drilling. Let's not do that anymore in the future by using a proper hook, which is exposed from `flipper-plugin`.
Reviewed By: passy
Differential Revision: D25421304
fbshipit-source-id: 01ec8563c67f7e2fac359c2f8216eba722bff8d9
Summary: Each build will have an embedded file specifying the target release channel for the build. This allows us to do some customisations, e.g. show "Insiders" label in the title and enable Sandy by default for insiders builds.
Reviewed By: jknoxville
Differential Revision: D25399045
fbshipit-source-id: 8e26d0754d0713ced823f86b30b54491d55b4d97
Summary:
Bumps [react-markdown](https://github.com/remarkjs/react-markdown) from 4.3.1 to 5.0.3.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/remarkjs/react-markdown/blob/main/changelog.md">react-markdown's changelog</a>.</em></p>
<blockquote>
<h2>5.0.3 - 2020-10-23</h2>
<ul>
<li><a href="https://github.com/remarkjs/react-markdown/commit/bb0bdde"><code>bb0bdde</code></a>
Unlock peer dependency on React to allow v17</li>
<li><a href="https://github.com/remarkjs/react-markdown/commit/24e42bd"><code>24e42bd</code></a>
Fix exception on missing element from <code>html-to-react</code></li>
<li><a href="https://github.com/remarkjs/react-markdown/commit/3d363e9"><code>3d363e9</code></a>
Fix umd browser build</li>
</ul>
<h2>5.0.2 - 2020-10-23</h2>
<ul>
<li><a href="https://github.com/remarkjs/react-markdown/commit/4dadaba"><code>4dadaba</code></a>
Fix to allow combining <code>allowedTypes</code>, <code>unwrapDisallowed</code> in types</li>
</ul>
<h2>5.0.1 - 2020-10-21</h2>
<ul>
<li><a href="https://github.com/remarkjs/react-markdown/commit/c3dc5ee"><code>c3dc5ee</code></a>
Fix to not crash on empty text nodes</li>
</ul>
<h2>5.0.0 - 2020-10-19</h2>
<h3>BREAKING</h3>
<h4>Maintained by <a href="https://unifiedjs.com">unified</a></h4>
<p>This project is now maintained by the unified collective, which also houses the
underlying tools used in <code>react-markdown</code>: hundreds of projects for working with
markdown and markup related things (including MDX).
We have cleaned the project: updated dependencies, improved
docs/tests/coverage/types, cleaned the issue tracker, and fixed a couple of
bugs, but otherwise <em>much should be the same</em>.</p>
<h4>Upgrade <code>remark-parse</code></h4>
<p>The parser used in <code>react-markdown</code> has been upgraded to the latest version.
It is now 100% CommonMark compliant: that means it works the same as in other
places, such as Discourse, Reddit, Stack Overflow, and GitHub.
Note that GitHub does extend CommonMark: to match how Markdown works on GitHub,
use the <a href="https://github.com/remarkjs/remark-gfm"><code>remark-gfm</code></a> plugin.</p>
<ul>
<li><a href="https://github.com/remarkjs/remark/releases/tag/remark-parse%409.0.0"><code>remark-parse@9.0.0</code></a></li>
<li><a href="https://github.com/remarkjs/remark/releases/tag/remark-parse%408.0.0"><code>remark-parse@8.0.0</code></a></li>
<li><a href="https://github.com/remarkjs/remark/releases/tag/remark-parse%407.0.0"><code>remark-parse@7.0.0</code></a></li>
<li><a href="https://github.com/remarkjs/remark/releases/tag/remark-parse%406.0.0"><code>remark-parse@6.0.0</code></a></li>
</ul>
<h4>New serializer property: <code>node</code></h4>
<p>A new <code>node</code> prop is passed to all non-tag/non-fragment renderers.
This contains the raw <a href="https://github.com/syntax-tree/mdast">mdast</a> AST node,
which opens up a number of interesting possibilities.</p>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="22bb78747d"><code>22bb787</code></a> 5.0.3</li>
<li><a href="bb0bdded9f"><code>bb0bdde</code></a> Unlock peer dependency on React to allow v17</li>
<li><a href="816a52bc75"><code>816a52b</code></a> Use Actions</li>
<li><a href="6e2eb1c5b3"><code>6e2eb1c</code></a> Update dev-dependencies</li>
<li><a href="24e42bd14f"><code>24e42bd</code></a> Fix exception on missing element from <code>html-to-react</code></li>
<li><a href="3d363e9d07"><code>3d363e9</code></a> Fix umd browser build</li>
<li><a href="6e38dd343e"><code>6e38dd3</code></a> Update changelog</li>
<li><a href="62a683f18c"><code>62a683f</code></a> 5.0.2</li>
<li><a href="89bc8d8317"><code>89bc8d8</code></a> Add ignore comment</li>
<li><a href="4dadaba5ab"><code>4dadaba</code></a> Fix to allow combining <code>allowedTypes</code>, <code>unwrapDisallowed</code> in types</li>
<li>Additional commits viewable in <a href="https://github.com/remarkjs/react-markdown/compare/v4.3.1...5.0.3">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/~wooorm">wooorm</a>, a new releaser for react-markdown since your current version.</p>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
Pull Request resolved: https://github.com/facebook/flipper/pull/1751
Reviewed By: mweststrate
Differential Revision: D25373134
Pulled By: passy
fbshipit-source-id: 3bc61c309b8db6da4c042b8943a6d338b84d932e
Summary: Metro and Mac device were always hidden in Sandy, but they should only be hidden if they don't have underlying Clients. Fixes https://fb.workplace.com/groups/748354712423318/permalink/775342569724532/
Reviewed By: nikoant
Differential Revision: D25369492
fbshipit-source-id: fdc25c3646d8339ae029425b4c45d8631bbee762
Summary:
This is the 6th most common error in our logging, and I just run into it after upgrading XCode. It happens when idb doesn't return any devices.
(because `''.split('\n')` results in `['']` not `[]`)
Reviewed By: jknoxville
Differential Revision: D25368759
fbshipit-source-id: 44b0e3a5dc4cf06ecdf2dff4a5692943e60d4b1d
Summary: Make sure that GKs can be used in pure sandy plugins.
Reviewed By: jknoxville
Differential Revision: D25368358
fbshipit-source-id: c7c6aa4ecf0443cb3b5d90e22e8aca9a73a69389
Summary: Rust default configuration path changed recently which broke transferring of settings between flipper desktop and launcher. This diff fixes it.
Reviewed By: passy
Differential Revision: D25334963
fbshipit-source-id: d6ebea9e5cfa68858a9fc2a51102815d646ab319
Summary: Delegate to launcher on restart after settings changed. This is required to update Flipper after changing release channel.
Reviewed By: passy
Differential Revision: D25331466
fbshipit-source-id: d98e272971b5782d3b9c46e6ba62d883ebbb804c
Summary:
See previous diff, if the plugin `id` on the class definition mismatches with the `package.json`, the navigation in Sandy will use the wrong id (from the meta data) causing the plugin not to open.
Since the `id` exposed on the class is the one that is used to setup the connect on the client, updated the ids in the `package.json` which have afaik no further meaning.
Pinging nikoant to verify that assumption. I can imagine this might impact historical data / plugin distribution?
Reviewed By: passy, nikoant
Differential Revision: D25302542
fbshipit-source-id: 43fe1667604eb7a28f6f9b7d260bc2a1e6e82dd3
Summary:
FluxStores plugin of AdsManager didn't open on Sandy. The underlying reason is that in Sandy the list was based on the plugin id's as exposed in the `package.json`, while in the old left sidebar it was based on the `id` stored on the Plugin class. And apparently they can differ (will fix that in the next diff)
We can release an update of this plugin after it landed
Reviewed By: passy
Differential Revision: D25302357
fbshipit-source-id: 874aab263fad6a83f63edc4a8f7fa7ceceaef70f
Summary: Wired up tracking to all chrome sections and some import UI elements
Reviewed By: jknoxville
Differential Revision: D25219089
fbshipit-source-id: c75bed91894609dafc5fcc6423a5228211fb92d8
Summary:
This wires up tracking directly to the ANT component library for the following components:
1. `Button`
2. `Collapse.Panel`
3. `Tabs`
Other less commonly used elements can be connected in the future if needed.
I played a bit with different patterns, but in testing the patch-package patching give the most reliable results. Alternatives considered:
1. Expect users to explicitly wrap there components, e.g. `<Tracked><Button>Hi</Button></Tracked>`
1. Didn't implement this because it would be very common to forget, and at the moment you want to make some analysis you'll discover there is no interesting data available. I think for tracking we want to have opt-out rather than opt-in
2. The additional wrapping can cause some subtile layout issues due to static field inspection / forwarded refs (e.g. Ant often has an assumption that relevant children types are _directly_ nested under their parent element. For examle `<Tooltip><Tracked><Button>` does not work as expected
2. Expose our own `Button` / `Collapse` / `Tabs` that applies `Tracked` to an underlying Ant component.
1. also suffers from 1.b.
2. It is gonna be quite confusing for other devs that some elements would need to be imported from `flipper-plugin`, ant some from `antd`, and that this is likely to change over time. We could lint against it, but it will be still suboptimal
Reviewed By: jknoxville
Differential Revision: D25196321
fbshipit-source-id: b559356498c3191a283062a88daacb354b0f79f4
Summary: Connect usage tracking to the Flipper core, individual elements will be wrapped in a next diff
Reviewed By: passy
Differential Revision: D25196284
fbshipit-source-id: 103e1d21d2f23fbbc21975fa85082811f6f53348
Summary:
Set up basic primitives for user interaction tracking. I hope the docs and unit tests in this diff are self explanatory :)
In upcoming diffs:
* Wire up to scuba events
* Annotate all important parts of Flipper Chrome
* Investigate if we can wrap important interactions of ANT by default
Reviewed By: jknoxville
Differential Revision: D25120234
fbshipit-source-id: 9849d565d7be27e498cc2b4db33e7d6e6938ee06
Summary:
This diff sets all package version to "0.0.0" except of the root package and changes the bump script to only bump version in the root package. This should reduce possibility of conflicts on release diffs. Anyway we always use the same version for all of our packages, so we can only set it to the root.
Before npm publishing we will set all package versions to the same number as in the root package (we actually already do that) so there will be no differences except we won't need to bump version in more than 100 packages each release.
Reviewed By: mweststrate
Differential Revision: D25162373
fbshipit-source-id: 02fe401bee72845339c67925c130027bdaee559d
Summary: Previously, notifications can be hidden by category or plugin. This diff ports that functionality to Sandy
Reviewed By: mweststrate
Differential Revision: D25021697
fbshipit-source-id: 28bdd1c169fcef4db79c2452db8cbb5f0bce6312
Summary: This diffs add removing all action and simple search (search by matching title and/or detail)
Reviewed By: mweststrate
Differential Revision: D24992828
fbshipit-source-id: 84e59e8de5a6cfd4c6cb4097350dbb87e17271db
Summary:
I converted the rating button to a functional component, and mistakenly moved the effect in the constructor into the render function.
This puts it into an effect with no dependencies so it should only happen once, instead of every render.
Reviewed By: mweststrate
Differential Revision: D25185514
fbshipit-source-id: 48203b01bbd85f3b9ed4dbbb416768c0d5524f70
Summary:
Saw a new version came out. Only breaking change appears
to be that links are now required to be non-empty,
which sounds quite reasonable.
Reviewed By: nikoant
Differential Revision: D25119837
fbshipit-source-id: 758578d4f7f8045b59918f107438f3c8231bb790
Summary: Added a welcome screen so that our users won't feel alienated / overwhelmed by the new Sandy design. With this in place we can start opening the GK to a subset of FB employees in the next release
Reviewed By: passy
Differential Revision: D25088630
fbshipit-source-id: 7337d670928f048a2c2fa60d98ac4bdcefb67c4d
Summary:
This diff will enabling freezing (making immutable) of all data we receive from the device. This prevents dev mistakes causing components not to update or logic being hard to reason about. Also this makes Immer's `produce` faster in the typical case
Since this is potentially a risky change, that might break existing plugin logic, it has been put behind a GK https://www.internalfb.com/intern/gatekeeper/projects/flipper_frozen_data/
I did some quick exploratory testing on all plugins available for Facebook iOS / Android, and the only plugin that caused trouble was Fresco, which is fixed in this diff as well.
Reviewed By: nikoant
Differential Revision: D25055056
fbshipit-source-id: 8525511f4a8a0221740a6e1371ce7f2b757a203e
Summary: `unstablebatched_updates` should be used whenever a non-react originating event might affect multiple components, to make sure that React batches them optimally. Applied it to the most import events that handle incoming device events
Reviewed By: nikoant
Differential Revision: D25052937
fbshipit-source-id: b2c783fb9c43be371553db39969280f9d7c3e260
Summary: Per title, the primary change is that Immer 8 will also freeze automatically in _production_ builds as well.
Reviewed By: nikoant
Differential Revision: D25052621
fbshipit-source-id: 1cb0b083aae82992b57c4a6e9dca0a8bebe903ec
Summary: Part of converting ITSR to use ant design. Gets rid of some custom code.
Reviewed By: mweststrate
Differential Revision: D25055728
fbshipit-source-id: 451f8b0b7c2543eea59e74d5ea35761bc8ebeeba
Summary:
The title bar is going away, so this needs to be moved somewhere when sandy is enabled.
This moves it into the left rail when sandy is enabled, and converts the icon to use a sandy icon and popover.
The contents of the popover haven't yet been converted to use sandy components.
Reviewed By: mweststrate
Differential Revision: D25055282
fbshipit-source-id: 259ed8312c0d4079433cfa7ffb88385184ae16b2
Summary:
I don't quite know how this worked before but we had `Type` both as
a function and a type. I guess because types only exist in TS land it
was okay, but it was confusing nevertheless.
Reviewed By: nikoant
Differential Revision: D25026916
fbshipit-source-id: f4f0351bf7eeec33ef760433157b3713054d9dc7
Summary:
This diff covers notification items to show data stored in the state as well as add button functionality to plugins.
This diff doesn't cover notification search, clear, and setting, which will be covered in next diffs
Reviewed By: mweststrate
Differential Revision: D24986742
fbshipit-source-id: d42cfe8112881a7f0d2158cbce267a4d7c344305
Summary:
Context: https://fb.workplace.com/groups/flippersupport/permalink/1005193786627946/
I believe we can land this without knowing that it works, because iOS support is still disabled by default for non mac devices - you have to enable it in settings to switch it on.
Reviewed By: passy
Differential Revision: D24893757
fbshipit-source-id: c9db515a7807c94a0d5e509017dd4e1796d24f6d
Summary: This prefixes APIs of `flipper-plugin`, that are used by Flipper, but should not be used by plugins directly, with `_`. Also added tests to make sure we are always intentional when extending the exposed APIs
Reviewed By: passy
Differential Revision: D24991700
fbshipit-source-id: ed3700efa188fca7f5a14d5c68250598cf011e42
Summary:
Bumps [flipper-client-sdk](https://github.com/facebook/flipper) from 0.0.2 to 0.0.3.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/facebook/flipper/commits">compare view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/configuring-github-dependabot-security-updates)
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/1668
Reviewed By: mweststrate
Differential Revision: D24981564
Pulled By: passy
fbshipit-source-id: 55431dd6f5ecf6bbb52324890a7efdb28b10350e