Commit Graph

3988 Commits

Author SHA1 Message Date
Igor Strebezhev
0100224833 Highlight code in the README.md (#1540)
Summary:
Thanks for `flipper` ;)

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

Reviewed By: nikoant

Differential Revision: D23817144

Pulled By: passy

fbshipit-source-id: 97a0b6ba12169bae4a7df821051704adc411bc89
2020-09-21 10:32:45 -07:00
Anton Nikolaev
187fd25fc8 Fix loading of Sandy plugins packaged by flipper-pkg
Summary:
Flipper cannot load Sandy plugins packaged by flipper-pkg, because the latter only expose default export, but Sandy API is using named exports instead ("Component" and "plugin").

This change fixes this by exposing both default and named exports from plugin package.

Reviewed By: passy

Differential Revision: D23815769

fbshipit-source-id: 1dd273b2e7b98bd01148506037066c41ffd19eb8
2020-09-21 09:45:41 -07:00
Pascal Hartig
7aaf5585a2 Fix Android device connection for Kitkat
Summary:
Probably more than just KitKat, but we got a specific report in
https://fburl.com/f88cvz4c for 4.4. ABI lists are not included
in the probs and unfortunately TS doesn't resolve this to a
`string | undefined` as it should.

{F336605489}

Reviewed By: jknoxville

Differential Revision: D23815568

fbshipit-source-id: b6af928f85549d0c973feb0d83a324252ce0f654
2020-09-21 09:24:37 -07:00
Paco Estevez Garcia
6c377ade5c Bump Litho to 0.38.0
Summary: Updates Litho deps in Flipper

Reviewed By: muraziz

Differential Revision: D23768422

fbshipit-source-id: 858f3a632d3f725c9bcd037e646a4951640b0442
2020-09-18 09:21:31 -07:00
James Harmon
0a06d6c546 Add button to copy highlighted requests to routes (mock requests) (#1447)
Summary:
Add feature to Network mocks in the Network Plugin which would allow a user to highlight network requests and copy into new routes (mocks).

For many production apps, network requests can contain many headers (easily 20 or more) and a large amount of data  returned in the response (1000's of characters).  Creating mocks for these manually is time consuming and error prone.

It would be better to make mocks automatically by allowing the user to highlight desired requests and have them automatically copied into new routes, also copying the headers and the response data.

Changelog: [network] Allow user to create new mock routes by highlighting existing network requests in the Network plugin

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

Test Plan:
Tested this change manually by running through the following scenario using the sample Android app:

1). Run a GET request from the Sample app.  Verify that the request/response is correct.  Highlight the request to be copied.

![request-screen](https://user-images.githubusercontent.com/337874/89750945-baf6b700-da93-11ea-86f6-3ec600e1727d.png)

2). Go to the Mock dialog by clicking on the "Mock" button

![mock-screen](https://user-images.githubusercontent.com/337874/89750979-e8436500-da93-11ea-9dde-8717436a03bb.png)

3).  Click on "Copy Highlighted Call" to create a mock Route from the selected request.  Verify that the "data" and "headers" tab panels are correct.

![mock-screen-2](https://user-images.githubusercontent.com/337874/89751029-132db900-da94-11ea-9419-6294a304f232.png)

![mock-screen-3](https://user-images.githubusercontent.com/337874/89751053-29d41000-da94-11ea-85db-a034a20e5c18.png)

Close the Dialog

4).  Run the request again from the sample app and verify that a mock request is returned with the correct data.

![response-mock-1](https://user-images.githubusercontent.com/337874/89751083-4cfebf80-da94-11ea-8523-192ebdc869f6.png)

![response-mock-2](https://user-images.githubusercontent.com/337874/89751092-58ea8180-da94-11ea-85fe-82b7a660789f.png)

Reviewed By: cekkaewnumchai

Differential Revision: D23027793

Pulled By: mweststrate

fbshipit-source-id: 197fd5c3d120a20b6bc5d9121ae781923d69b748
2020-09-18 07:26:31 -07:00
Pascal Hartig
ddc9c3e243 Back out "Back out "[flipper][PR] Use interface SupportSQLiteDatabase in Android Databases Plugin""
Summary: jknoxville helped me debug this. The underlying problem was that we didn't include a dependency which is transitive in gradle land. We swallowed the exception and just returned an empty list. I left an error log in there to make future debugging easier. For reference, this was the error:

Reviewed By: cekkaewnumchai

Differential Revision: D23759727

fbshipit-source-id: 244510d2765913bf4c89458e336889c3c6838fc4
2020-09-17 10:30:16 -07:00
Michel Weststrate
54d36876b6 Upgrade to Electron 10 (#1532)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/1532

Upgrade to Electron 10, in an attempt to fix random hard Electron crashes. Didn't fix it, but given the changelog of Electron with all the bug fixes, seems to be a good idea nonetheless :)

Changelog: Flipper now uses Electron 10

Reviewed By: nikoant

Differential Revision: D23565000

fbshipit-source-id: 3f07b8cf8c438147bde5314698d20046ac9f94cf
2020-09-17 09:44:27 -07:00
Paco Estevez Garcia
0d7cac3952 Add Playground link in Yoga layouts
Summary:
Adds a link to the Yoga playground atop all properties of Yoga-based views.

We could make the playground match the properties below if I figure out the hashing mechanism the website uses. This is a start.

Reviewed By: muraziz

Differential Revision: D23758538

fbshipit-source-id: 6a3f206914aa9962e55852df548f8026783506e9
2020-09-17 09:44:27 -07:00
Paco Estevez Garcia
7307ed7014 Add 'Copy expanded child elements' to Layout Inspector
Summary:
As requested in https://fburl.com/dpuz2cew

This diff adds a new popup menu option to copy the info of all the expanded elements in a view/component tree.

It does it by moving the copy function to the layer where all elements are available.

The diff also replaces `Copy` to a call to the same function.

Reviewed By: muraziz

Differential Revision: D23757826

fbshipit-source-id: 3f70c85267f928f7153db75ed8f4eaa3fac669e7
2020-09-17 09:44:27 -07:00
Pascal Hartig
2fbd5f6576 Fix node-fetch, node-forge sec vulns (#1530)
Summary:
You know the drill.

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

Test Plan: Checked that `yarn.lock` references the respective new versions.

Reviewed By: nikoant

Differential Revision: D23733338

Pulled By: passy

fbshipit-source-id: abf9812b977542a8b297b88ea16c7c01a062898b
2020-09-17 05:03:27 -07:00
Anton Nikolaev
48ac2df956 Remove dependencies not required anymore from 'static' package
Summary:
I've already removed support for plugin format v1 and thus compilation on startup is not needed anymore and many dependencies can be safely removed.

I actually already removed them before that, but it looks like automerge returned them back somehow.

Reviewed By: mweststrate

Differential Revision: D23735001

fbshipit-source-id: 7b1ae655738a35e388f818fb27f80c5a0e8327de
2020-09-17 04:27:06 -07:00
Michel Weststrate
694d4e0e33 Expose theme from JavaScript
Summary:
This diff fixes two problems when further theming Flipper:

1. All shades of gray where defined in terms of black/white + transparency. Converted all colors to non transparent to make sure they stack well.
2. The color theme defined in less aren't available as javascript colors. It is possible to achieve that through setting up a babel parser that parses the less files and exposes them to JS. But since we have modern stack, figured that exposing all theme variables as CSS variables as well is a much simpler setup.

Reviewed By: passy

Differential Revision: D23756558

fbshipit-source-id: e92be1f66b11c2c9c400fc1622cb8a493cc4c2a5
2020-09-17 04:05:09 -07:00
Michel Weststrate
ef4379e847 Implemented basic Flipper theme, [Flipper] Setup initial layout and siderail
Summary:
This setups the first bits of the Sandy Layout, and has a styled siderail according to the design, that does absolutely nothing.

{gif:0sa60r8c}

Reviewed By: cekkaewnumchai

Differential Revision: D23655313

fbshipit-source-id: e30278aeae0913e231ad105a9afb55c74c6a3370
2020-09-17 04:05:09 -07:00
Michel Weststrate
2d2a8bd675 Introduce dark theme
Summary: Adds support for switching dark mode on the fly. Also added the option to apply certain settings without restarting Flipper, as that isn't needed in all cases.

Reviewed By: cekkaewnumchai

Differential Revision: D23625854

fbshipit-source-id: 82175ba10524daf1b48a65feec8c610460df9418
2020-09-17 04:05:09 -07:00
Michel Weststrate
908a8bab1e Setup Ant.design
Summary:
allow-large-files

This makes the Ant.design component library available to Flipper

The CSS setup is unconventional, in the sense that the normal way to do this is to use a webpack loader to dynamically load the right less files, and a babel transform to automatically import the style sheets.

Since we use Metro, which is not very suitable for transforming non-JS(like) files, I figured that the simplest thing is to pre-compile the entire less theme. Which should be fine since we shouldn't be changing the less files very often, and since we don't ship a website, it is probably not too bad to have the full ANT theme for now in there, even though we don't use all components. It is 600 K of css. In the next diff the CSS is loaded conditionally, only if Sandy is enabled.

If the CSS turns out to be too big we can optimise this later to only import CSS for components we use by doing some Metro magic, but it doesn't seem to be trivial (that is, I couldn't get in to work in < 2 hours).

Reviewed By: cekkaewnumchai

Differential Revision: D23625855

fbshipit-source-id: 3ba810b2221dc0c7b719f66310e590c7748cf239
2020-09-17 04:05:08 -07:00
Anton Nikolaev
16a640b7ee Reload instead of restart to apply plugin changes
Summary:
Now full restart is not required for applying plugin changes (install/uninstall/update). So this diff changes the behavior to use reload instead of restart in Plugin Manager and Auto Update Manager. It is much faster than full restart.

Changelog: faster reload after plugin install/uninstall/update.

Reviewed By: jknoxville

Differential Revision: D23706701

fbshipit-source-id: b2dcaf7768a5d47b3c967c17e090fa74884b3850
2020-09-17 03:07:14 -07:00
Anton Nikolaev
df0508e826 Enable asar
Summary: Enable asar which should further improve startup time and bundle size

Reviewed By: passy

Differential Revision: D23705524

fbshipit-source-id: 161d28e4c3995615166171ab4926ec011a4b5dfb
2020-09-17 03:07:14 -07:00
GitHub
1c91ebeead Automated: Update Podfile.lock (#1529)
Summary:
This is an automated PR to update the Podfile.lock.
- Make sure that the Podfile.lock contains latest FlipperKit and Flipper pod versions.
- Also make sure that all the dependencies are updated to the latest one.
- This is auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request)

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

Reviewed By: nikoant

Differential Revision: D23733948

Pulled By: passy

fbshipit-source-id: 57d3eeafee518a92fca6dc31a87b5b65c291cae8
2020-09-17 02:42:41 -07:00
Frieder Bluemle
3d3dc2ea7a Fix repo name in Podfile (#1528)
Summary:
A few people reported issues due to the previous repo name (`Sonar`) being referenced in the Podfile.

- https://github.com/facebook/react-native/issues/27565
- https://github.com/facebook/react-native/issues/29251
- https://github.com/facebook/flipper/issues/1321

This PR updates it to the current name (`flipper`). Please let me know if these updates are also needed for the files under `Specs/Flipper/**/Flipper.podspec` (not sure what the purpose is).

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

Reviewed By: nikoant

Differential Revision: D23730546

Pulled By: passy

fbshipit-source-id: b4d776f44a054f3fe8b793ca36a8fbc8835e5d04
2020-09-16 06:37:56 -07:00
Anton Nikolaev
f03d5d94ed Remove plugin compilation and loading from startup hot path
Summary:
- Removed compilation on startup which is not required anymore after switching to plugin spec v2.
- Removed from Node process ("static" package) all the dependencies which are not required anymore:  e.g. metro, babel etc.
- Plugin loading code from node process moved to browser process and made asyncronous.

Some expected benefits after these changes:
1) Reduced size of Flipper bundle (~4.5MB reduction for lzma package in my tests) as well as startup time. It's hard to say the exact startup time difference as it is very machine-dependent, and on my machine it was already fast ~1500ms (vs 5500ms for p95) and decreased by just 100ms. But I think we should definitely see some improvements on "launch time" analytics graph for p95/p99.
2) Plugin loading is async now and happens when UI is already shown, so perceptive startup time should be also better now.
3) All plugin loading code is now consolidated in "app/dispatcher/plugins.tsx" instead of being splitted between Node and Browser processes as before. So it will be easier to debug plugin loading.
4) Now it is possible to apply updates of plugins by simple refresh of browser window instead of full Electron process restart as before.
5) 60% less code in Node process. This is good because it is harder to debug changes in Node process than in Browser process, especially taking in account differences between dev/release builds. Because of this Node process often ended up broken after changes. Hopefully now it will be more stable.

Changelog: changed the way of plugin loading, and removed obsolete dependencies, which should reduce bundle size and startup time.

Reviewed By: passy

Differential Revision: D23682756

fbshipit-source-id: 8445c877234b41c73853cebe585e2fdb1638b2c9
2020-09-16 06:32:58 -07:00
Anton Nikolaev
75e7261d1e Remove support for plugin format v1
Summary:
Do not list plugins packaged with format v1 in Plugin Manager.

Changelog: removed support for plugins packaged using legacy format (v1), so they won't appear in Plugin Manager anymore.

Reviewed By: passy

Differential Revision: D23681402

fbshipit-source-id: 1c9496ba6b739069d67228a0f4250f2f01aabd4d
2020-09-16 06:32:58 -07:00
Anton Nikolaev
e48707151a Move the code related to plugin loading / installation to "flipper-plugin-lib"
Summary:
Sorry for so long diff, but actually there are no functional changes, just refactoring to make further changes of Plugin Manager easier to understand.

I've de-coupled the code related to plugin management from UI code and moved it from PluginInstaller UI component (which will be replaced soon by new UI) to "flipper-plugin-lib".  So pretty much everything related to plugin discovery and installation now consolidated in this package.

Additionally, this refactoring enables re-using of plugin management code in "flipper-pkg", e.g. to create CLI command for plugin installation from NPM, e.g.: `flipper-pkg install flipper-plugin-reactotron`.

Reviewed By: passy

Differential Revision: D23679346

fbshipit-source-id: 82e7b9de9afa08c508c1b228c2038b4ba423571c
2020-09-16 06:32:58 -07:00
generatedunixname89002005306973
72ff87d7cd Flipper Snapshot Bump: v0.57.1-SNAPSHOT
Summary: Releasing snapshot version 0.57.1-SNAPSHOT

Reviewed By: passy

Differential Revision: D23729542

fbshipit-source-id: e668315a91447f1cfe2e29a60f3d7e5f7b4a9c4a
2020-09-16 04:27:08 -07:00
generatedunixname89002005306973
2fcab458bf Flipper Release: v0.57.0
Summary: Releasing version 0.57.0

Reviewed By: passy

Differential Revision: D23729543

fbshipit-source-id: 0156c0214b3665815ca648e995b78bb7cb2eba42
2020-09-16 04:27:08 -07:00
Pascal Hartig
bb176577e9 Back out "Use interface SupportSQLiteDatabase in Android Databases Plugin"
Summary: This broke DB opening in FB apps. Will try to fix and reland this, but need to unblock people first.

Reviewed By: cekkaewnumchai

Differential Revision: D23705962

fbshipit-source-id: 3c9ff3a74e5a6d34e6cb2c75e7e2cec749b5a60e
2020-09-15 17:05:24 -07:00
John Knox
09e3c7a80f Add chocolatey as a way to install openssl for windows (#1527)
Summary:
We've had several reports that Chocolatey-provided openssl works well with Flipper, so recommending it here.

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

Reviewed By: passy

Differential Revision: D23705926

Pulled By: jknoxville

fbshipit-source-id: c582b2319caf1aa67890c1fefc66730dc1047ecd
2020-09-15 10:26:25 -07:00
dependabot[bot]
a5fbe167b9 Bump react-native-flipper from 0.54.0 to 0.56.0 in /react-native/ReactNativeFlipperExample (#1526)
Summary:
Bumps [react-native-flipper](https://github.com/facebook/flipper) from 0.54.0 to 0.56.0.
<details>
<summary>Commits</summary>
<ul>
<li><a href="a47ac961f7"><code>a47ac96</code></a> Flipper Release: v0.56.0</li>
<li><a href="1b80877f1a"><code>1b80877</code></a> Implement requestResponse for websocket connection (<a href="https://github-redirect.dependabot.com/facebook/flipper/issues/1510">https://github.com/facebook/flipper/issues/1510</a>)</li>
<li><a href="7a7a88bfde"><code>7a7a88b</code></a> Use interface SupportSQLiteDatabase in Android Databases Plugin (<a href="https://github-redirect.dependabot.com/facebook/flipper/issues/1196">https://github.com/facebook/flipper/issues/1196</a>)</li>
<li><a href="e13d63ea6f"><code>e13d63e</code></a> Bump http-proxy from 1.18.0 to 1.18.1 in /website (<a href="https://github-redirect.dependabot.com/facebook/flipper/issues/1516">https://github.com/facebook/flipper/issues/1516</a>)</li>
<li><a href="fdf9570cb7"><code>fdf9570</code></a> Fix sandbox plugin initialisation</li>
<li><a href="aeebec5cd7"><code>aeebec5</code></a> Prepare for rustfmt 2.0</li>
<li><a href="142eb8f9ea"><code>142eb8f</code></a> Add doc markers to code</li>
<li><a href="f33d4b3f9e"><code>f33d4b3</code></a> Add internaldocs-fb-helpers lib</li>
<li><a href="d4d2937c80"><code>d4d2937</code></a> Fix setting layoutParams fromLayout Editor</li>
<li><a href="842fe6df5c"><code>842fe6d</code></a> Add picker for ViewDescriptor</li>
<li>Additional commits viewable in <a href="https://github.com/facebook/flipper/compare/v0.54.0...v0.56.0">compare view</a></li>
</ul>
</details>
<br />

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

Reviewed By: mweststrate

Differential Revision: D23680998

Pulled By: passy

fbshipit-source-id: ad4f35f407acc8d8d76037d6907b5a26adb6d544
2020-09-15 09:25:01 -07:00
dependabot[bot]
48270af383 Bump eslint-plugin-react-hooks from 4.1.0 to 4.1.2 in /flipper-js-client-sdk (#1525)
Summary:
Bumps [eslint-plugin-react-hooks](https://github.com/facebook/react/tree/HEAD/packages/eslint-plugin-react-hooks) from 4.1.0 to 4.1.2.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/facebook/react/blob/master/packages/eslint-plugin-react-hooks/CHANGELOG.md">eslint-plugin-react-hooks's changelog</a>.</em></p>
<blockquote>
<h2>4.1.2</h2>
<ul>
<li>Fix a crash with the TypeScript 4.x parser. (<a href="https://github.com/eps1lon">eps1lon</a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/19815">#19815</a>)</li>
</ul>
<h2>4.1.1</h2>
<ul>
<li>Improve support for optional chaining. (<a href="https://github.com/pfongkye">pfongkye</a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/19680">#19680</a>)</li>
<li>Fix a false positive warning for TypeScript parameters. (<a href="https://github.com/NeoRaider">NeoRaider</a> in <a href="https://github-redirect.dependabot.com/facebook/react/pull/19751">#19751</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/facebook/react/commits/HEAD/packages/eslint-plugin-react-hooks">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=eslint-plugin-react-hooks&package-manager=npm_and_yarn&previous-version=4.1.0&new-version=4.1.2)](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/1525

Reviewed By: mweststrate

Differential Revision: D23680993

Pulled By: passy

fbshipit-source-id: ab8af15cc7a1e5dbd221948a80abab5eef22a221
2020-09-15 04:58:34 -07:00
Pascal Hartig
bb807243ae Revert "fbjni 0.0.4 (#1428)" (#1524)
Summary:
This reverts commit 97adea5423.

This is to address https://github.com/facebook/flipper/issues/1514.

Waiting for RN to upgrade fbjni on their end before un-reverting.

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

Reviewed By: mweststrate

Differential Revision: D23678287

Pulled By: passy

fbshipit-source-id: a89f3f625690fc8f97d7e05f5cfdea729d1fe03d
2020-09-14 08:03:12 -07:00
Anton Nikolaev
d468d94363 Back out "Show FB internal instructions by default on "Getting Started" page"
Summary: Unfortunately optional require does not work with docusaurus bundler configuration in case file not exist, so open source build is failing now. I'm backing out this commit until solution for dynamic imports in docusaurus found.

Reviewed By: mweststrate

Differential Revision: D23679198

fbshipit-source-id: 9be008f19b5945d17ec31614a8d2cb80bad9ca2e
2020-09-14 07:34:41 -07:00
Anton Nikolaev
643a656cd9 Back out "Merge internal and external troubleshooting pages into one with optional internal-only content"
Summary: Unfortunately optional require does not work with docusaurus bundler configuration in case file not exist, so open source build is failing now. I'm backing out this commit until solution for dynamic imports in docusaurus found.

Reviewed By: mweststrate

Differential Revision: D23679147

fbshipit-source-id: 7934e0a7decf128c1914f52645adaf4617c97eea
2020-09-14 07:34:41 -07:00
Anton Nikolaev
8425db7b8b Merge internal and external troubleshooting pages into one with optional internal-only content
Summary: Merged internal and external troubleshooting pages into one with optional internal-only content

Reviewed By: mweststrate

Differential Revision: D23651656

fbshipit-source-id: 330dd4b5cb49ae403a0a3760c1e23e30e56ad190
2020-09-14 03:52:28 -07:00
Anton Nikolaev
12d7b48443 Show FB internal instructions by default on "Getting Started" page
Summary:
Show internal instructions for Flipper setup by default on "Getting Started" page. This is a follow up to https://fb.workplace.com/groups/flippersupport/permalink/955763464904312/.

I used tabs component to show both internal and external content in tabs. By default, internal content is shown, but it is possible to also switch to external.

Reviewed By: jknoxville

Differential Revision: D23649955

fbshipit-source-id: c4f956e0ee9fec69cf861d96a447f934f746dd7f
2020-09-11 09:51:30 -07:00
GitHub
1f62ce32bf Automated: Update Podfile.lock (#1522)
Summary:
This is an automated PR to update the Podfile.lock.
- Make sure that the Podfile.lock contains latest FlipperKit and Flipper pod versions.
- Also make sure that all the dependencies are updated to the latest one.
- This is auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request)

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

Reviewed By: mweststrate

Differential Revision: D23600088

Pulled By: passy

fbshipit-source-id: 4634b682d50d448b2f31b6bddee4d0022c6da890
2020-09-10 09:26:54 -07:00
Timur Valiev
2b13899782 websocket connection - make it work with new js sdk
Summary:
we used to send plugins list with connect command, now we can respond to getPlugins request with new api.
we still support old clients

Reviewed By: jknoxville

Differential Revision: D23625139

fbshipit-source-id: 37a24d0c83cd879d93287dd3a3d4d5d2f9477b34
2020-09-10 08:18:14 -07:00
Timur Valiev
1d55b35dfd v0.0.3 - bug fixes
Summary:
couple of bug fixes:
1) we don't want to init plugins on connect - let's wait for init command from flipper
2) on disonnect - "this" didn;t work well with .map() so i switched to old school loop

Reviewed By: jknoxville

Differential Revision: D23623946

fbshipit-source-id: cb3f579a8ee14fedfbe19895f31f77f9e08775d2
2020-09-10 08:18:14 -07:00
Michel Weststrate
0e6546b93a Lazily build copyText and deserialize request bodies
Summary:
This diff tries to address T74467181, where Flipper (Electron) crash hard with a segfault. Although I failed to find the root issue, I noticed that this typically happened when switching to the network plugin after a long time.

Switching the network plugin causes all rows to be rebuild, and during the process all request and response bodies are deserialized which can take very long and fully blocks Flipper making it totally unresponsive.

This diff fixes that issue, by making sure the lately added lazy evaluation of copyText is used, and that requests aren't deserialized during row generation, which is only needed for full body search purposes, by making that lazily as well.

While at it fixed D21929666 (which I never finished) as well, which is a Sandy prerequisite, since it coupled the generic search table to hardcoded networking concepts like request and response. "body" search, has now been rebranded "contents" search. That is generic and makes sense in both the network and qpl plugin. Probably will make these labelings better customisable when revisiting the grids in Sandy

N.B. I thought the issue might maybe that during the blocking process the garbage collector can't run, and the process would OOM. But that doesn't seem the case (or at least not without some other factor contribution as well), as in a quick test I can trivally allocate 30 GB of memory (making the system swap), but still the process runs stably. So even with this diff I can't satisfactory explain the crash, but at least it avoids a common circumstance in which they happen, and it significantly improves the user experience.

changelog: [Network] Fixed issue where Flipper would hang for seconds or even crash when opening the Network plugin

Reviewed By: jknoxville

Differential Revision: D23599338

fbshipit-source-id: 52164fe6997b879c91907e0afe42e08ca3f315b4
2020-09-10 05:55:54 -07:00
Noa Leibman
4f2f02d4e6 Adding custoum zebra-color to TableRow
Summary: When using TableRow, you can define both backgroudColor & zebraBackgroudColor to get a cusomized zebra look to your table.

Reviewed By: jknoxville

Differential Revision: D23623221

fbshipit-source-id: df68fa015c0cd99b5f44baedb56e952c20b2dd68
2020-09-10 05:26:06 -07:00
Chaiwat Ekkaewnumchai
1efb682737 Add Opt-in Switch to Sandy UI
Summary:
With the new design from vpileggi, this diff separated a new app UI to the current one.

This diffs show the toggle switch to enable Sandy UI for devs who are in `flipper_sandy` GK. When toggled, it will bring Sandy UI up.

Reviewed By: mweststrate

Differential Revision: D23599398

fbshipit-source-id: d85c707e0fe7726a418b3551cedb36e455fb7d14
2020-09-10 02:13:04 -07:00
generatedunixname89002005306973
deeb7a75d5 Flipper Snapshot Bump: v0.56.1-SNAPSHOT
Summary: Releasing snapshot version 0.56.1-SNAPSHOT

Reviewed By: jknoxville

Differential Revision: D23597789

fbshipit-source-id: d8bbd22ca3beb4e4f677ced973730c4303183545
2020-09-09 06:46:54 -07:00
generatedunixname89002005306973
a47ac961f7 Flipper Release: v0.56.0
Summary: Releasing version 0.56.0

Reviewed By: jknoxville

Differential Revision: D23597790

fbshipit-source-id: e0f141eebe81e46619c71c8174fb78b1aaf2c035
2020-09-09 06:46:54 -07:00
Rakha Kanz Kautsar
1b80877f1a Implement requestResponse for websocket connection (#1510)
Summary:
This allow websocket client to receive and reply messages from desktop client.

## Changelog

Implement requestResponse for websocket connection, allowing websocket client to receive and reply messages from desktop client

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

Test Plan:
Tested with custom websocket client, allow communicating getPlugins, init, deinit, etc.
But I think it's better to have dedicated unit tests for this (currently there's none?), let me know what you think.

Reviewed By: passy

Differential Revision: D23499396

Pulled By: jknoxville

fbshipit-source-id: fb445c0634afd46a525fc52da33b487da4e591fe
2020-09-09 06:43:53 -07:00
a.artikov
7a7a88bfde Use interface SupportSQLiteDatabase in Android Databases Plugin (#1196)
Summary:
This change will allow to use various SQLiteDatabase implementations: standard Android implementation, [requery/sqlite-android](https://github.com/requery/sqlite-android) and so on. See issue https://github.com/facebook/flipper/issues/1183

## Changelog
Android Databases Plugin: `SqliteDatabaseConnectionProvider` returns `SupportSQLiteDatabase` instead of `SQLiteDatabase`.

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

Test Plan: Check that Databases Plugin shows correct data on the sample Android application.

Reviewed By: mweststrate

Differential Revision: D23294272

Pulled By: passy

fbshipit-source-id: c07ebeb869ab01d41281f75541cbb3411f0ebae0
2020-09-09 04:26:07 -07:00
dependabot[bot]
e13d63ea6f Bump http-proxy from 1.18.0 to 1.18.1 in /website (#1516)
Summary:
Bumps [http-proxy](https://github.com/http-party/node-http-proxy) from 1.18.0 to 1.18.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/http-party/node-http-proxy/blob/master/CHANGELOG.md">http-proxy's changelog</a>.</em></p>
<blockquote>
<h2><a href="https://github.com/http-party/node-http-proxy/compare/1.18.0...v1.18.1">v1.18.1</a> - 2020-05-17</h2>
<h3>Merged</h3>
<ul>
<li>Skip sending the proxyReq event when the expect header is present <a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/1447"><code>[https://github.com/facebook/flipper/issues/1447](https://github.com/http-party/node-http-proxy/issues/1447)</code></a></li>
<li>Remove node6 support, add node12 to build <a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/1397"><code>[https://github.com/facebook/flipper/issues/1397](https://github.com/http-party/node-http-proxy/issues/1397)</code></a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="9b96cd7251"><code>9b96cd7</code></a> 1.18.1</li>
<li><a href="335aeeba2f"><code>335aeeb</code></a> Skip sending the proxyReq event when the expect header is present (<a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/issues/1447">https://github.com/facebook/flipper/issues/1447</a>)</li>
<li><a href="dba39668ba"><code>dba3966</code></a> Remove node6 support, add node12 to build (<a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/issues/1397">https://github.com/facebook/flipper/issues/1397</a>)</li>
<li>See full diff in <a href="https://github.com/http-party/node-http-proxy/compare/1.18.0...1.18.1">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=http-proxy&package-manager=npm_and_yarn&previous-version=1.18.0&new-version=1.18.1)](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)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebook/flipper/network/alerts).

</details>

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

Reviewed By: passy

Differential Revision: D23573694

Pulled By: jknoxville

fbshipit-source-id: cd29e2ad1d78f170c0397ec81b1a9e1d773c0e81
2020-09-08 11:03:53 -07:00
John Knox
fdf9570cb7 Fix sandbox plugin initialisation
Summary: Fixes https://github.com/facebook/flipper/issues/1515

Reviewed By: passy

Differential Revision: D23572769

fbshipit-source-id: a541e2b4f626f520f39d21c3bf05d43ed919feb8
2020-09-08 08:33:34 -07:00
David Tolnay
aeebec5cd7 Prepare for rustfmt 2.0
Summary:
Generated by formatting with rustfmt 2.0.0-rc.2 and then a second time with fbsource's current rustfmt (1.4.14).

This results in formatting for which rustfmt 1.4 is idempotent but is closer to the style of rustfmt 2.0, reducing the amount of code that will need to change atomically in that upgrade.

 ---

*Why now?* **:** The 1.x branch is no longer being developed and fixes like https://github.com/rust-lang/rustfmt/issues/4159 (which we need in fbcode) only land to the 2.0 branch.

 ---

Reviewed By: zertosh

Differential Revision: D23568784

fbshipit-source-id: 7401066bfc99390686eb3fd9dc6f9888ccef9487
2020-09-07 20:50:27 -07:00
John Knox
142eb8f9ea Add doc markers to code
Summary: Referencing these from the wiki should be better than copy-pasting so we know they are up-to-date

Reviewed By: passy

Differential Revision: D23564251

fbshipit-source-id: ad90fcaa88c3c638212a277ce49a5faa41cd07df
2020-09-07 06:40:30 -07:00
John Knox
f33d4b3f9e Add internaldocs-fb-helpers lib
Summary:
This adds a new npm package "internaldocs-fb-helpers", and shows example usage in the flipper package.

This will stop everyone from having to inline the function definitions everywhere as is currently the case.

(It's using the old internaldocs name, to match the existing docusaurus-plugin-internaldocs-fb package - I don't think that's a big deal.)

It currently exports two methods:

* `fbContent(internalContent, publicContent)`
  * Allows you to return internal or external content based on build variant.
  * Has named args so you don't accidentally put internal stuff in the external arg.

* `isInternal(): boolean`
  * Not strictly necessary, but helps if you want to write your docs using an boolean variable rather than a switching function every time.

* `fbInternalOnly(internalContent)`
  * Convenience method for when you want internal content, or nothing.

I could have put these inside the existing docusaurus plugin, but that has docu v2 as a peer dependency, and I want these helpers to work on v1 as well, so made it a standalone package.

Reviewed By: passy

Differential Revision: D23474462

fbshipit-source-id: 22e5be6de2f3233deb298f1542a06e3575b6555a
2020-09-07 03:41:10 -07:00
Paco Estevez Garcia
d4d2937c80 Fix setting layoutParams fromLayout Editor
Summary:
The function `setLayoutParams` expects the values to be set to be at array position 0+, and they were on position 1+ instead.

This effectively prevented users from setting LayoutParameters.

Reviewed By: muraziz

Differential Revision: D23538531

fbshipit-source-id: cc828363ee8d7408d1df29d98c37b09893826bb1
2020-09-06 12:58:24 -07:00
Paco Estevez Garcia
842fe6df5c Add picker for ViewDescriptor
Summary: This diff uses the new picker defined in EnumMapping for regular Android View properties.

Reviewed By: muraziz

Differential Revision: D23538532

fbshipit-source-id: be5b776453e7322fb13a5f9e6a66a1f8d1243e79
2020-09-06 12:58:24 -07:00