Summary: We currently filtering out incompatible versions from marketplace. This diff also add filtering for incompatible installed plugins on Flipper startup to ensure we always load the latest compatible version.
Reviewed By: passy
Differential Revision: D28341891
fbshipit-source-id: 83afc14a3c07e1763e1bd146251e6d3b71a66248
Summary: When crash reporter plugin is not installed in Flipper, it can appear duplicated in "Detected in App" list. This diff fixes that.
Reviewed By: passy
Differential Revision: D28325072
fbshipit-source-id: 92011f1f10c6633fbd31ea886fe53f352057f4f8
Summary:
Fixed a bug when plugin installation status wouldn't be saved between sessions when plugin uninstalled and then re-installed again. Before the fix, after Flipper restart, such plugin was uninstalled again because its package name was not removed from "uninstalledPlugins" state. This was because plugin id was used by mistake instead of name in few places.
To try avoiding this issue in future I've also renamed "uninstalledPlugins" to "uninstalledPluginNames" to make it more clear than package name should be used there rather than ID. As this field is persisted, I also added migration which moves data to the renamed field.
Reviewed By: passy
Differential Revision: D28314447
fbshipit-source-id: fbe3edc258b78fe7fbb0d966f93aabcdf3b66d4b
Summary: I've noticed that Flipper is trying to schedule auto-update for some plugins on every startup even though they are already updated. I found this happens because of a race condition when the auto-updater can be triggered before plugins initialised. This diff fixes that.
Reviewed By: passy
Differential Revision: D28312086
fbshipit-source-id: 66b0bd2aa9dfede1737d565b1e7e7845c940405e
Summary: Currently, when user installs a new plugin which was not installed before that, Flipper always takes the latest available version of it. This is not correct, because the latest version might be incompatible with the currently running version of Flipper. To avoid that, instead of always using just the latest version we will be using the most recent version which is compatible with the current Flipper version.
Reviewed By: passy
Differential Revision: D28306505
fbshipit-source-id: 4258a456d6a5d92cbf48af55c0efb17ecf560b57
Summary:
Changed retrieving of Flipper version. Now it will be always retrieved from package.json. Before this change we used "remote.app.getVersion()" API which instead returned electron version for dev builds, e.g. "11.2.3". This is not convenient, because we now use Flipper version to check plugin compatibility and unrelated Electron version here makes things more complicated. After this change, if version is not properly bumped then "0.0.0" will be used: 1) when running using "yarn start", 2) when local building with "yarn build --mac" without setting new version, 3) when running tests "yarn test".
In addition to that I added a new command-line argument and env var which allow overriding version number for Flipper. This is useful for testing plugin updates, because compatibility between plugins and Flipper is checked by comparing Flipper version with the min version set in the plugin metadata.
Reviewed By: passy
Differential Revision: D28287354
fbshipit-source-id: 2f9482080e3612b95a24300050d98150c6db6cb7
Summary: Retrieve multiple plugin versions so we later can choose a version which is compatible with the current version of Flipper (e.g. if user is on old version of Flipper).
Reviewed By: passy
Differential Revision: D28284121
fbshipit-source-id: 3ed9cffb3e9702fc65d19b73fc8cc162b776b7c9
Summary: Trying to make some bumps a daily habit.
Reviewed By: mweststrate
Differential Revision: D28260273
fbshipit-source-id: 29d163af3e3acc55139b52320992123b72de22c4
Summary: We can't fix the underlying issue but it's quite frustrating when you get an error from Preview or QuickTime after the file was pulled. This improves the messaging a little.
Reviewed By: mweststrate
Differential Revision: D28096087
fbshipit-source-id: 0428fa821a225a02e81574f16d066085e8775251
Summary: Bump a few more devDeps that are safe.
Reviewed By: mweststrate
Differential Revision: D28227971
fbshipit-source-id: 3b35b098230b604930d875ddf8867cfc6f56a9c7
Summary:
The migration to Sandy (D28060888) breaks the existing integration we have with importing Flipper traces from bug reports. Given that, I broke this diff out from that one just to highlight the changes.
`pluginStates2` appears to be the field to use for Sandy traces (rather than `store`, which we were using before)
Differential Revision: D28209561
fbshipit-source-id: 9803e1a60b1b1deba6403b50b4079aac2a19efa6
Summary:
Moved a lot of utility logic in separate files for Android and iOS, to make cleanup in next diffs easier by having a bit smaller files.
Purely a code shuffle, no functional changes
Reviewed By: passy
Differential Revision: D28102399
fbshipit-source-id: 2fd8f6669bdd2804fa8a7e1791c610ae7883eda6
Summary:
Changelog: Fixed application crash notifications not opening the crash log
Crashlog notifications were quite blatantly broken:
1. Because I force all GK's to true locally during testing, and the feature gate is negative, I never had any crash reports in the first place. The GK was empty so removed it.
2. The notifications overview would always cause a NPE when the notification came from a device plugin (it assumed a client to be present). This made the button do nothing and the device name not show up near the notification
3. The OS level notifications would link to the notification screen, which was a static screen in the classic UI and would always render to an empty page in Sandy. Removed that screen from the code base. Instead the click the notification will now trigger the notification action.
Reviewed By: passy
Differential Revision: D28119719
fbshipit-source-id: 5b28dd854260fd479d09e3ee6206301cc669ab40
Summary:
Code blocks are quite common in Flipper, and a bit verbose in Ant, so let's standardize!
Changelog: Standardize CodeBlock component
Reviewed By: passy
Differential Revision: D28117560
fbshipit-source-id: 5a5538a49b59ef40c814d22055fac56e7598cbbb
Summary:
Moving Value/renderValue API to "database" plugin as these APIs used exclusively by this plugin.
Alternative to that could be moving this API to "flipper-plugin" instead, but I think it doesn't make sense to expose public API which is only used in one plugin.
Reviewed By: mweststrate
Differential Revision: D28110483
fbshipit-source-id: 1576444681c1e0531fe45f0c15f442d65a28f803
Summary: Fixed loading of source maps when dev server is running with --fast-refresh flag set. Looks like it was broken after last metro upgrade because it changed the way how module paths are passed to dev server. We also had a hack to workaround bug when requested module paths were malformed, but it looks this hack is not needed now, so I deleted it as well.
Reviewed By: passy
Differential Revision: D28120080
fbshipit-source-id: 03a39c9840da8f4c8c72be6189c0b71c62fac7f0
Summary:
This addresses my biggest gripe with Flipper right now (maybe after it occasionally crashing my entire Mac, but that's beyond our control, sadly). When you try to switch your current device and hover over the picker, move your mouse quickly to where you expect the menu to open, it will immediate close. You have to wait for about 200ms before moving your cursor down into the expanded dropdown menu. "Well, it's only 200ms, Passy, chill." That's fair, but I still think that hovering to open a dropdown is unnatural behaviour. Looking around here in Phabricator, none of the dropdowns behave like this. And they definitely don't just disappear under my cursor if I'm Moving (too) Fast.
Changelog: The app selector no longer reacts on hover events now requites a click
Reviewed By: mweststrate
Differential Revision: D28118657
fbshipit-source-id: 67867d597b21b80a0de87ecbc8c86a7334f81952
Summary:
Changelog: Fixed an issue where Android logs would get stuck
Our adb and rsocket connection are fundamentally unstable; every now and then it looses connection (at least on my machine). This happens both for emulators and real devices.
If the logcat connection closes, it isn't restarted, so occassionaly the the logs would get 'stuck'. Fixed it by automatically restarting the stream if the close wasn't intentional.
Investigated the stack of the disconnects, but it isn't caused on our end, the closures originate from (R)socket itself, so this band aid seems unavoidable.
Using a near-zero timeout does work as well. Gave it a 100ms grace time though, in case starvation is a factor in the original problem. This might cause a few messages to be missed though, but it doesn't seem to happen to often (every few minutes in my case)
Reviewed By: passy
Differential Revision: D28095802
fbshipit-source-id: f22336ad46c04a3d886ff9dbc4d787591ac75eea
Summary:
Trying to get ahead of dependabot by bumping a bunch of things at once
that are minor or patch level bumps.
Reviewed By: muraziz
Differential Revision: D28094201
fbshipit-source-id: b6b53ae2d582686201124b82fed4f436a60b3172
Summary: This diff exposes the createTablePlugin from flipper-plugin, so that createTablePlugin based plugins can be converted to Sandy as well
Reviewed By: jknoxville
Differential Revision: D28031227
fbshipit-source-id: 8e9c82da08a83fddab740b46be9917b6a1023117
Summary: Moved Toolbar to flipper-plugin. No further changes.
Reviewed By: nikoant
Differential Revision: D28027334
fbshipit-source-id: 35de13d87734ae3a8af037166945b1a669106274
Summary: Fixed minor dark mode issue. Will address the ugly scrollbars in dark mode later.
Reviewed By: nikoant
Differential Revision: D28039447
fbshipit-source-id: eb0f545d224decb0334dca68b11277ddab612c2e
Summary: Additional deprecation warnings for components that should be imported from flipper-plugin
Reviewed By: nikoant
Differential Revision: D28027382
fbshipit-source-id: e46a40a950adb615d206bc08334893263c56dd1f
Summary:
Ant'd tabs didn't allow for vertical fill out. Introduced our own tiny wrapper that has `grow` by default.
Also made sure the users last selection is remembered.
Reviewed By: cekkaewnumchai
Differential Revision: D28026345
fbshipit-source-id: 7703bc241cd1427336b7c917bdb5be9f56bba9b9
Summary:
I was a dummy and ran into this. Tried to make it easier
for the next person to figure out what this means.
Reviewed By: mweststrate
Differential Revision: D28026376
fbshipit-source-id: ad3455938ef30b448b475cb990f86351e76628bf
Summary: Dropped the welcome-to-the-Sandy-redesign screen, should be pretty well established by now :)
Reviewed By: nikoant
Differential Revision: D27966658
fbshipit-source-id: 8f8943cbb242ef5625f0c19ffe4aed28e320377f
Summary: Expose a Panel api from Sandy, which is quite similar to the old one, except that it uses Antd, and it will remember the users closed / open preference through sessions, a much requested feature.
Reviewed By: nikoant
Differential Revision: D27966607
fbshipit-source-id: 9b18df377215c1e6c5844d0bf972058c8c574cbb
Summary:
Some styling fixes and minor improvements in DataTable, used by network plugin:
- be able to customise the context menu
- be able to customise how entire rows are copied and presented on the clipboard to be able to deviate from the standard JSON
- deeplink handling was made async, this gives the plugin the opportunity to first handle initial setup and rendering before trying to jump somewhere which is a typical use case for deeplinking
Reviewed By: passy
Differential Revision: D27947186
fbshipit-source-id: a56f081d60520c4bc2ad3c547a8ca5b9357e71a1
Summary: We received questions several times from plugin authors on how to find usage for particular app/platform and I wanted to add that data on plugin usage dashboard, but right now it's impossible. We're only collecting plugin ID as a part of plugin usage analytics. That means it's impossible to filter some plugin usage (e.g. "Network") by particular platform or mobile app. This diff improves plugin usage analytics to collect enhanced data.
Reviewed By: passy
Differential Revision: D27935801
fbshipit-source-id: c2fc7d8cf84f9a28823ae56a1dda7158e0b12f1f
Summary:
Tiny change, hours of debugging. Big thanks to jknoxville for
answering all my stupid questions.
Our number one "error" right now by users affected is
```
Unhandled Promise Rejection:
Error: RSocketTcpClient:
Socket closed unexpectedly.
```
Of course no stacktrace, because JavaScript and Promises.
The underlying problem is that RSocket keeps track of recently used
"receivers" which is every method that has sent a request. When someone disconnects their device or closes an emulator/simulator, the socket's `end` event is treated the same way any other connection error would be: a85a4db041/packages/rsocket-tcp-client/src/RSocketTcpClient.js (L74)
This then causes "errors" like these to appear:
{F609810187}
This could previously be handled in plugin-code by wrapping all `client.call()` invocations in try/catch, which nobody did, meaning we'd get rejected promises everywhere. We can instead handle this centrally and properly disconnect the connection.
Changelog: Severed RSocket connections are no longer treated as an error in plugin code
Reviewed By: jknoxville
Differential Revision: D27910514
fbshipit-source-id: ea9c0726ab0e959b0eb4a5fca67ddaa04a6f1d14
Summary:
This diff moves the core of ElementsInspector to flipper-plugin and decouples it from legacy design system and Electron, without any significant improvements or API changes yet, which will follow later.
Colors and docs will be added later in this stack.
Reviewed By: passy
Differential Revision: D27660300
fbshipit-source-id: 96abfa3b3174fa852cf04ae119c23c3d629fee74
Summary:
Bumps [react-refresh](https://github.com/facebook/react/tree/HEAD/packages/react) from 0.9.0 to 0.10.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/facebook/react/releases">react-refresh's releases</a>.</em></p>
<blockquote>
<h2>v0.10.0</h2>
<h3>React Core</h3>
<h4>New Features</h4>
<ul>
<li>Added warnings to help migrate towards descriptors</li>
<li>Made it possible to server render without React-related markup (<code>data-reactid</code>, <code>data-react-checksum</code>). This DOM will not be mountable by React. <a href="http://facebook.github.io/react/docs/top-level-api.html#react.rendercomponenttostaticmarkup">Read the docs for <code>React.renderComponentToStaticMarkup</code></a></li>
<li>Added support for more attributes:
<ul>
<li><code>srcSet</code> for <code><img></code> to specify images at different pixel ratios</li>
<li><code>textAnchor</code> for SVG</li>
</ul>
</li>
</ul>
<h4>Bug Fixes</h4>
<ul>
<li>Ensure all void elements don’t insert a closing tag into the markup.</li>
<li>Ensure <code>className={false}</code> behaves consistently</li>
<li>Ensure <code>this.refs</code> is defined, even if no refs are specified.</li>
</ul>
<h3>Addons</h3>
<ul>
<li><code>update</code> function to deal with immutable data. <a href="http://facebook.github.io/react/docs/update.html">Read the docs</a></li>
</ul>
<h3>react-tools</h3>
<ul>
<li>Added an option argument to <code>transform</code> function. The only option supported is <code>harmony</code>, which behaves the same as <code>jsx --harmony</code> on the command line. This uses the ES6 transforms from <a href="https://github.com/facebook/jstransform">jstransform</a>.</li>
</ul>
<h2>v0.10.0-rc1</h2>
<p>No release notes provided.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/facebook/react/blob/master/CHANGELOG.md">react-refresh's changelog</a>.</em></p>
<blockquote>
<h2>0.10.0 (March 21, 2014)</h2>
<h3>React Core</h3>
<h4>New Features</h4>
<ul>
<li>Added warnings to help migrate towards descriptors</li>
<li>Made it possible to server render without React-related markup (<code>data-reactid</code>, <code>data-react-checksum</code>). This DOM will not be mountable by React. <a href="https://reactjs.org/docs/top-level-api.html#react.rendercomponenttostaticmarkup">Read the docs for <code>React.renderComponentToStaticMarkup</code></a></li>
<li>Added support for more attributes:
<ul>
<li><code>srcSet</code> for <code><img></code> to specify images at different pixel ratios</li>
<li><code>textAnchor</code> for SVG</li>
</ul>
</li>
</ul>
<h4>Bug Fixes</h4>
<ul>
<li>Ensure all void elements don’t insert a closing tag into the markup.</li>
<li>Ensure <code>className={false}</code> behaves consistently</li>
<li>Ensure <code>this.refs</code> is defined, even if no refs are specified.</li>
</ul>
<h3>Addons</h3>
<ul>
<li><code>update</code> function to deal with immutable data. <a href="https://reactjs.org/docs/update.html">Read the docs</a></li>
</ul>
<h3>react-tools</h3>
<ul>
<li>Added an option argument to <code>transform</code> function. The only option supported is <code>harmony</code>, which behaves the same as <code>jsx --harmony</code> on the command line. This uses the ES6 transforms from <a href="https://github.com/facebook/jstransform">jstransform</a>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/facebook/react/commits/v0.10.0/packages/react">compare view</a></li>
</ul>
</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/2186
Reviewed By: passy
Differential Revision: D27760972
Pulled By: nikoant
fbshipit-source-id: a998232901ee6c02686069d119ef7818be4d7404
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/2172
New script which runs "tsc" for all plugins, receives list of errors and then checks which plugins are affected. It works for shared libs too, e.g. if there is an error in a shared library, then all plugins dependant on it will be counted as affected. For convenience, script saves list of errors affecting each plugin to "tsc-errors.log" in plugin folder.
This script will be used for automatic type-checking plugins against current "stable" and "insiders" versions of Flipper.
An alternative to this implementation would be to simply run "tsc" for each plugin individually, but such implementation takes a lot of time (5+ sec per plugin) and so cannot be effectively used on diffs.
Reviewed By: mweststrate
Differential Revision: D27499765
fbshipit-source-id: fcbbfc94a13e6c7c5beff0c889a929f84c41b2dd
Summary:
Here I'm changing plugin repository structure to allow re-using of shared packages between both public and fb-internal plugins, and to ensure that public plugins has their own yarn.lock as this will be required to implement reproducible jobs checking plugin compatibility with released flipper versions.
Please note that there are a lot of moved files in this diff, make sure to click "Expand all" to see all that actually changed (there are not much of them actually).
New proposed structure for plugin packages:
```
- root
- node_modules - modules included into Flipper: flipper, flipper-plugin, react, antd, emotion
-- plugins
--- node_modules - modules used by both public and fb-internal plugins (shared libs will be linked here, see D27034936)
--- public
---- node_modules - modules used by public plugins
---- pluginA
----- node_modules - modules used by plugin A exclusively
---- pluginB
----- node_modules - modules used by plugin B exclusively
--- fb
---- node_modules - modules used by fb-internal plugins
---- pluginC
----- node_modules - modules used by plugin C exclusively
---- pluginD
----- node_modules - modules used by plugin D exclusively
```
I've moved all public plugins under dir "plugins/public" and excluded them from root yarn workspaces. Instead, they will have their own yarn workspaces config and yarn.lock and they will use flipper modules as peer dependencies.
Reviewed By: mweststrate
Differential Revision: D27034108
fbshipit-source-id: c2310e3c5bfe7526033f51b46c0ae40199fd7586