Summary:
Solves this T65385916.
Before this diff the bugreporter showed a disabled UI while waiting for the upload to finish. Its confusing for the user as, it can be seen from the above the task. Thus I added an intermediate UI with a spinner and a text "Submitting..." which makes it clear for the user that we are uploading a bug report.
Reviewed By: mweststrate
Differential Revision: D21017426
fbshipit-source-id: ce12dfbefc8726adfad9ef17abd744cc92c254ed
Summary: Currently Flipper shows empty Changelog with only "pre-history" entry. This is because of path in generation script is wrong now. Flipper shows Changelog.md from desktop/static, so generated entries should be added there rather than to Changelog.md in the root.
Reviewed By: passy
Differential Revision: D21016884
fbshipit-source-id: 8709a2556374ec70bc665eaf0729bb85fd0d913f
Summary:
This diff enables optional [Fast Refresh](https://reactnative.dev/docs/fast-refresh) for Flipper in dev mode. It can be opted-in using additional argument "--fast-refresh": `yarn start --fast-refresh`. I've copy-pasted the most part of implementation from React Native with some minor changes.
I made this optional for now as it works not ideally. In most cases which I checked it works fine, however for some files it falls back to full refresh (e.g. when `desktop/plugins/network/index.tsx` changed) and sometimes doesn't refresh content even after change detected and re-compiled (e.g. when `src/ui/components/searchable/Searchable.tsx` is changed, Network plugin which is dependent on it is not refreshed automatically).
State from redux is restored after fast refresh, but local state in class-based components is cleared. For function-based components local state is also stored, so it's an additional point to make plugins components functional :)
Also, for now there is no UI for Fast Refresh (loading indicator etc), information is just logged to console.
Changelog: Experimental support for Fast Refresh in dev mode can be enabled by `yarn start --fast-refresh`.
Reviewed By: jknoxville
Differential Revision: D20993073
fbshipit-source-id: 65632788df105a85fac0b924b7808120900b349e
Summary: Auto-format for js files was broken on my machine. It seems that there is a conflict between eslint and prettier and the latter is trying to format files after eslint using different rules for that. Option to disable prettier formatting for already formatted files fixed this issue for me.
Reviewed By: jknoxville
Differential Revision: D20994053
fbshipit-source-id: 6e90be7f58f2891ce2143bca8c3d76118b9cfba3
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/998
After this diff all the default plugins (which are distributed with Flipper) will be included into the main app bundle instead of bundling each of them separately and then loading from file system. This is done by auto-generating plugins index in build-time and importing it from Flipper app bundle, so Metro can follow these imports and bundle all the plugins to the app bundle.
This provides several benefits:
1) reduced Flipper bundle size (~10% reduction of zipped Flipper archive), because Metro bundles each of re-used dependencies only once instead of bundling them for each plugin where such dependency used.
2) Faster Flipper startup because of reduced bundle and the fact that we don't need to load each plugin bundle from disk - just need to load the single bundle where everything is already included.
3) Metro dev server for plugins works in the same way as for Flipper app itself, e.g. simple refresh automatically recompiles bundled plugins too if there are changes. This also potentially should allow us to enable "fast refresh" for quicker iterations while developing plugins.
4) Faster build ("yarn build --mac" is 2 times faster on my machine after this change)
Potential downsides:
1) Currently all the plugins are identically loaded from disk. After this change some of plugins will be bundled, and some of them (third-party) will be loaded from disk.
2) In future when it will be possible to publish new versions of default plugins separately, installing new version of such plugin (e.g. with some urgent fix) will mean the "default" pre-built version will still be bundled (we cannot "unbundle" it :)), but we'll skip it and instead load new version from disk.
Changelog: Internals: include default plugins into the main bundle instead producing separate bundles for them.
Reviewed By: passy
Differential Revision: D20864002
fbshipit-source-id: 2968f3b786cdd1767d6223996090143d03894b92
Summary:
Refactored plugins compilation script by splitting it into 3 scripts: 1) search plugins 2) compile plugins 3) watch plugins.
No functional changes in this review, it's just preparation for further changes.
Reviewed By: passy
Differential Revision: D20860443
fbshipit-source-id: 02900430199875574b992e597d09b82d0d7f32ef
Summary:
Treat only packages with "flipper-plugin" keyword as Flipper plugins. This will allow to place lib packages re-used by different plugins into "plugins" folder.
Changelog: Internals: it is now possible to add modules for re-use by different plugins into `desktop/plugins` folder.
Reviewed By: mweststrate
Differential Revision: D20898133
fbshipit-source-id: 8934870350ce42af3dc8060d1494025519ed307e
Summary: We cannot just add internal plugins as workspaces to the root package.json in "sonar/desktop" as they are not open-sourced, so public build will break. Instead, I have created root package.json for internal plugins and added all internal plugins as workspaces there. This means all these plugins will use the single root yarn.lock and installation of their dependencies will be faster. This also means that plugins can declare dependencies to other local packages included into workspaces and they will be symlinked automatically.
Reviewed By: mweststrate
Differential Revision: D20806237
fbshipit-source-id: f8b3327166963dec7da8ac74079682aebe4527e1
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/969
Added all public plugins as workspaces to the root package.json. This means all these plugins will use the single root yarn.lock and installation of their dependencies will be faster. This also means that plugins can declare dependencies to other local packages included into workspaces and they will be symlinked automatically.
Changelog: Internals: plugins added as "yarn workspaces" into the root package.json to simplify dependency management between them
Reviewed By: mweststrate
Differential Revision: D20805231
fbshipit-source-id: e85c62d3195d1ea3c5c60def6ca12318a2b53466
Summary: Adding id field for the currently logged in user in the store's state
Reviewed By: passy
Differential Revision: D20928642
fbshipit-source-id: eff5373bd88ed8fd228193b47649f586cf20b585
Summary: As per the title it adds the CK support to the Flipper's support form.
Reviewed By: jknoxville
Differential Revision: D20943408
fbshipit-source-id: bc8f0ac6a4974fe8258e91d7ac9437931c4d4abd
Summary: Allow optionally to provide the device title to select a plugin in. Currently, there's only support for `flipper://<app>/<plugin_id>`. This allows to add a `?device=<specifier>`.
Reviewed By: mweststrate
Differential Revision: D20920587
fbshipit-source-id: e7df4b510f1adfa9c2c9d072f6aebca1edb89cc0
Summary: When an android package is not an application, the `run-as` command will fail. In this case, the package might be an operating system service package. In this case, it may be possible for the user to run adb as root. Note that Flipper does not restart adbd via `adb root` on behalf of the user; the command is simply retried without `run-as`.
Reviewed By: jknoxville
Differential Revision: D20920582
fbshipit-source-id: 8db86084c3c3a61d8322edb1e34fdfdf48d0412d
Summary:
Added a graph to show how much data is sent to plugins. The tooltip shows a sorted overview of the amount of data.
Will put up a GK so that plugin devs can get this data also more easily
Reviewed By: jknoxville
Differential Revision: D20919321
fbshipit-source-id: f2b78b21ef34551e0ed562b009589d2a5dba9ff3
Summary:
Measure how many byte we receive per plugin, and add this to the plugin stats that are collected
Will add a graph to the flipper dashboard, and probably a small visualization in a next diff as well.
Reviewed By: priteshrnandgaonkar
Differential Revision: D20917583
fbshipit-source-id: bb341531ecf8492080af82c56e73c0ec608f7b36
Summary:
***
☝️ **Important announcement:** Greenkeeper will be saying goodbye 👋 and passing the torch to Snyk on June 3rd, 2020! [Find out how to migrate to Snyk and more at greenkeeper.io](https://greenkeeper.io)
***
## The dependency [electron-devtools-installer](https://github.com/MarshallOfSound/electron-devtools-installer) was updated from `2.2.4` to `3.0.0`.
This version is **not covered** by your **current version range**.
If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.
---
**Publisher:** [marshallofsound](https://www.npmjs.com/~marshallofsound)
**License:** MIT
<details>
<summary>Release Notes for v3.0.0</summary>
<h1><a href="https://urls.greenkeeper.io/MarshallOfSound/electron-devtools-installer/compare/v2.2.4...v3.0.0">3.0.0</a> (2020-04-07)</h1>
<h3>Bug Fixes</h3>
<ul>
<li>make extension store directory recursively (<a href="82479523e2">8247952</a>)</li>
<li>only allow installs from the main process (<a href="fc1d8781b6">fc1d878</a>)</li>
<li>support dynamic application path (<a href="https://urls.greenkeeper.io/MarshallOfSound/electron-devtools-installer/issues/88" data-hovercard-type="pull_request" data-hovercard-url="/MarshallOfSound/electron-devtools-installer/pull/88/hovercard">https://github.com/facebook/flipper/issues/88</a>) (<a href="e9471f9042">e9471f9</a>)</li>
<li>use ES6 standard imports for electron modules. Closes <a href="https://urls.greenkeeper.io/MarshallOfSound/electron-devtools-installer/issues/116" data-hovercard-type="pull_request" data-hovercard-url="/MarshallOfSound/electron-devtools-installer/pull/116/hovercard">https://github.com/facebook/flipper/issues/116</a> (<a href="dc0f6e4391">dc0f6e4</a>)</li>
</ul>
<h3>Features</h3>
<ul>
<li><strong>test:</strong> add mobx to unit tests (<a href="https://urls.greenkeeper.io/MarshallOfSound/electron-devtools-installer/issues/95" data-hovercard-type="pull_request" data-hovercard-url="/MarshallOfSound/electron-devtools-installer/pull/95/hovercard">https://github.com/facebook/flipper/issues/95</a>) (<a href="6d4f699877">6d4f699</a>)</li>
<li>Only allow installs from the main process (<a href="d692149da5">d692149</a>)</li>
</ul>
<h3>BREAKING CHANGES</h3>
<ul>
<li>Only allow installs from the main process</li>
</ul>
<p>The remote is being deprecated and as such we should not rely on it for what is a buggy and very small usability tweak.</p>
</details>
<details>
<summary>Commits</summary>
<p>The new version differs by 22 commits.</p>
<ul>
<li><a href="d692149da5"><code>d692149</code></a> <code>feat: Only allow installs from the main process</code></li>
<li><a href="0f3ebfc9d3"><code>0f3ebfc</code></a> <code>chore: update NPM readme badge</code></li>
<li><a href="ba9648c2b9"><code>ba9648c</code></a> <code>chore: update README badges</code></li>
<li><a href="776912cf7d"><code>776912c</code></a> <code>BREAKING CHANGE: Only allow installs from the main process</code></li>
<li><a href="ae075d13bc"><code>ae075d1</code></a> <code>build: update CFA plugin</code></li>
<li><a href="0dde83b4a7"><code>0dde83b</code></a> <code>build: use latest v10 node for release CI</code></li>
<li><a href="cc8700c784"><code>cc8700c</code></a> <code>build: update version number for CFA</code></li>
<li><a href="9628782f2f"><code>9628782</code></a> <code>build: add CFA</code></li>
<li><a href="7d5f157939"><code>7d5f157</code></a> <code>docs: clean up README</code></li>
<li><a href="6d4f699877"><code>6d4f699</code></a> <code>feat(test): add mobx to unit tests (https://github.com/facebook/flipper/issues/95)</code></li>
<li><a href="dc0f6e4391"><code>dc0f6e4</code></a> <code>fix: use ES6 standard imports for electron modules. Closes https://github.com/facebook/flipper/issues/116</code></li>
<li><a href="82479523e2"><code>8247952</code></a> <code>fix: make extension store directory recursively</code></li>
<li><a href="fc1d8781b6"><code>fc1d878</code></a> <code>fix: only allow installs from the main process</code></li>
<li><a href="a5dfe4c1b1"><code>a5dfe4c</code></a> <code>build: rename prepublish to prepare, closes https://github.com/facebook/flipper/issues/120</code></li>
<li><a href="a5242e1fd8"><code>a5242e1</code></a> <code>build: update dependencies</code></li>
</ul>
<p>There are 22 commits in total.</p>
<p>See the <a href="0b07982a06...d692149da5">full diff</a></p>
</details>
---
<details>
<summary>FAQ and help</summary>
There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).
</details>
---
Your [Greenkeeper](https://greenkeeper.io) bot 🌴
Pull Request resolved: https://github.com/facebook/flipper/pull/988
Test Plan:
{F233368502}
Tested in Flipper
Reviewed By: cekkaewnumchai
Differential Revision: D20889307
Pulled By: passy
fbshipit-source-id: 63ed886cceefe34dc7d4212f25d05c5e13f7dab8
Summary:
* Fixed issue where the test wouldn't be reliable if it fired to quickly since the process has started
* Increased all test timings with a factor 10, to make the test less sensitive to system load
Reviewed By: passy
Differential Revision: D20914978
fbshipit-source-id: a3870e6374e61cf9ec1b11da529077876ef85bf8
Summary:
This adds another field to the exit data to record whether we had a clean exit where the app was closed as it should.
Note that doing a reload inside Flipper will be recorded as an unclean exit.
Reviewed By: passy
Differential Revision: D20915481
fbshipit-source-id: 240192d7a69bf620bfaa316e3e5cb0f45d6a34cc
Summary:
This means that Linux builds have a `flipper` executable
in the directory again.
Reviewed By: cekkaewnumchai
Differential Revision: D20915156
fbshipit-source-id: 9f792bcffef41168fe5a3e43c29b59f37a4cc673
Summary:
# Zero Redux DevTools
Our awesome new Zero Rating SDK is based on a Redux/Saga Library, and part of the reason for it is the amazing DevTools we can add around it.
State & Sagas visibility, manipulation, and even time-machine.
Comes as a Flipper Plugin to Android first, then iOS.
Inspired by JavaScript's [Redux DevTools @ GitHub](https://github.com/reduxjs/redux-devtools).
## This Diff
**Adding UI to our Flipper Desktop App.**
- React components to structure our plugin. Root + Tabs.
- Currently enabled: Actions Tab. with Actions (& state) Details side view
- Currently Disabled: SDK Tab, Sagas Tab.
- added a get "PluginFeatures" command to enable/disable desktop feature based on the app implementation (Fb4a/ FBLite / Wild, etc)
{F232877109}
Reviewed By: egergo
Differential Revision: D20350029
fbshipit-source-id: 000a7fda70026fbc3e121e46a6ac5905af9c807d
Summary:
React component to show Bloks scripts + simple ad-hoc code formatter
built on top of codemirrror https://codemirror.net/
Differential Revision: D20868214
fbshipit-source-id: 7c399347a6595b9aad354bad166bb72890a9ce57
Summary:
I think I accidentally pinned this before. That's not necessary.
Pull Request resolved: https://github.com/facebook/flipper/pull/964
Test Plan: yarn test
Reviewed By: mweststrate
Differential Revision: D20835725
Pulled By: passy
fbshipit-source-id: 627594d4f1a425cf0db410a097c82af6758d7d11
Summary:
***
☝️ **Important announcement:** Greenkeeper will be saying goodbye 👋 and passing the torch to Snyk on June 3rd, 2020! [Find out how to migrate to Snyk and more at greenkeeper.io](https://greenkeeper.io)
***
## The devDependency [types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped) was updated from `24.9.1` to `25.1.5`.
This version is **not covered** by your **current version range**.
If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.
---
**Publisher:** [types](https://www.npmjs.com/~types)
**License:** MIT
[Find out more about this release](https://github.com/DefinitelyTyped/DefinitelyTyped).
---
<details>
<summary>FAQ and help</summary>
There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).
</details>
---
Your [Greenkeeper](https://greenkeeper.io) bot 🌴
Pull Request resolved: https://github.com/facebook/flipper/pull/963
Reviewed By: mweststrate
Differential Revision: D20867651
Pulled By: passy
fbshipit-source-id: 59c686a3bfc1f7807357050a2bd6b18e3a362aef
Summary:
D20559197 inadvertantly broke support for old SDKs by properly handling an
exception that we previously ignored. However, this meant that Android versions
that don't support reverse-proxying will not fail to get registered although
they're otherwise supported.
Changelog: Fix connections on Android devices with older SDKs (19)
Reviewed By: jknoxville
Differential Revision: D20868923
fbshipit-source-id: 409fe20a0875dc26ecc971d33264a1145012d586
Summary: Accept websocket connections from any localhost origin, in addition to the existing chrome extensions support.
Reviewed By: jknoxville
Differential Revision: D20792131
fbshipit-source-id: d3991aa375bfb4e6f492c02dfab9bf72b1f8c412
Summary:
Another day ending in y, another minimist vulnerability. Bumping
to `1.2.3`.
(Note: this ignores all push blocking failures!)
Reviewed By: cekkaewnumchai
Differential Revision: D20860264
fbshipit-source-id: 569abd7e521efef92cd0b31113e0325493645c2a
Summary:
Fixed npm packaging/publishing scripts for "flipper-doctor", "flipper-pkg" and "flipper-babel-transformer".
Also removed scripts for testing and linting, because these packages are tested and linted by root level package.json.
Reviewed By: jknoxville
Differential Revision: D20839959
fbshipit-source-id: 4d9d037d4921fc97356c849054c389dfece05652
Summary:
The url for the getting started page was changed yesterday. (no longer getting-started.html)
This fixes some links that were broken because of it.
Reviewed By: cekkaewnumchai
Differential Revision: D20855343
fbshipit-source-id: 788efb75f3581e4fe6cecd5f69f11dd64b03e7df
Summary: Metro shows cyclic dependencies warnings in dev mode even if they are caused by 3rd party packages installed into node_modules. This produces a lot of noise, but totally unactionable. In this diff I have implemented patch for "metro" package wich disables these unactionable warnings.
Reviewed By: passy
Differential Revision: D20835057
fbshipit-source-id: 2aebc59a0f8c0adfc768ed4c170e5d0b9ced7e0e
Summary: Adding a role and tabIndex because it's clickable.
Reviewed By: mweststrate
Differential Revision: D20814436
fbshipit-source-id: 2d5acc06363df0cce1c24df7e77b1a6eaa98ab63
Summary:
changelog: Add scroll to inspected element in layout plugin
Before this diff, when one inspected an element, one needed to scroll down to see highlighted line for that element. This diff added automatic scroll to inspected element. It will scroll so that the line is in middle of the app.
Also, fix direct state mutation and this error:
```
Public property 'onKeyDown' of exported class has or is using private name 'Element'.
```
Reviewed By: passy, mweststrate
Differential Revision: D20798587
fbshipit-source-id: 763eb63cd51abd73940e301e36e89232033722c3
Summary:
There was a problem for the next diff because ContextMenu doesn't forward reference to child elements which causes no component attached to ref.
This diff forward ref of ContextMenu to its child. Also, there is casting because of genetic functional component used by NotificationHub
Reviewed By: mweststrate
Differential Revision: D20817968
fbshipit-source-id: d0a19a447decca73db53f02ea029f56fc7127e94
Summary:
Launcher was sort of a proxy for cases where we *wanted* to have an update
mechanism but possibly couldn't use it, e.g. Windows at FB.
This makes sure we can also show this in OSS.
Reviewed By: nikoant
Differential Revision: D20770804
fbshipit-source-id: 62d2dddf9cbd22d51098dda65eea50df420a3078
Summary:
Fix issue where not the full sonar repo was search when looking for Diffs with a changelog entry.
(note that we don't use absolute paths as that gaves problems in the past on CI where a sparse checkout happens and the hg root turned out to be different)
Reviewed By: passy
Differential Revision: D20793800
fbshipit-source-id: a77e1602e00127ba2d831a4c6392e2f1984a4fc6
Summary:
Fixed error "SHA-1 for file is not computed" on 3rd party plugin compilation in dev mode. The error started to appear after moving to yarn workspaces.
Changelog: Fixed error "SHA-1 for file is not computed" on 3rd party plugin compilation in dev mode (yarn start).
Reviewed By: mweststrate
Differential Revision: D20789712
fbshipit-source-id: bbc2fcca197955da50ebf2b51a1fd9cb62f79727
Summary: It takes few seconds for ts-node to start even for small scripts. TS_NODE_TRANSPILE_ONLY env var makes loading much faster ~100-200ms.
Reviewed By: mweststrate
Differential Revision: D20769639
fbshipit-source-id: 9b09a4e128e6b9c9651de98d8193b1d3a8f42b64
Summary: This diff adds the capability to show the plugin names for which flipper failed to fetch metadata. These changes are done for both export as URL and export as File. This diff also fixes the logging for the export as a file and logs the result object in scuba.
Reviewed By: jknoxville
Differential Revision: D20724860
fbshipit-source-id: 4c9591267ca05045e0ed084804d96851c9d7636d
Summary: Publish all the public packages (excluding those with "private=true") included as workspaces to "desktop" project.
Reviewed By: jknoxville
Differential Revision: D20765097
fbshipit-source-id: 444541e9a682a90eba02cb3da85ada9bd00d93d0
Summary:
Automatically bump versions for all local npm packages included as workspaces and fix local dependencies correspondingly.
As a part of this I have also aligned versioning for all the packages by using the same version for all of them.
Reviewed By: jknoxville
Differential Revision: D20745632
fbshipit-source-id: 2d438c4b23ee72f7d7c068c5ce161063c7ceb9e5
Summary: Import ws package in a usual way instead of importing it as source code
Reviewed By: jknoxville
Differential Revision: D20724584
fbshipit-source-id: 39cad6e544b71e66560a9351f1e5a0c89be2c152