Commit Graph

3082 Commits

Author SHA1 Message Date
Pascal Hartig
fee93e6cff Flipper Bump: v0.32.1-SNAPSHOT
Summary: oh_snaptu

Reviewed By: nikoant

Differential Revision: D20067793

fbshipit-source-id: d097603a3efc822b276dd6de07cb3fa108853409
2020-02-24 06:53:42 -08:00
Pascal Hartig
6c72fa3dbb Flipper Release: v0.32.0
Summary:
== Highlights ==

- Android: Theme information for Application, Activity and View descriptors are now visible in the Layout plugin. (6f4de969fb)
- App Visualiser: When importing an archived device, you can now see and inspect the last screen of the app. (20db85adf4)

== Fixes ==

- Fix `FlipperKit` warnings in XCode. (972277b031)
- Upgrade Folly to v2020.02.17.00 (GH809)
- Several performance improvements, originally caused by unnecessary rerenders.
- Crash reports weren't scrollable. (e1e8bb841c)
- Kill orhpaned instruments processes. (GH819)

Reviewed By: nikoant

Differential Revision: D20067792

fbshipit-source-id: 3f0ebcb03881373fd909f513e5d82e23a5f9f1f1
2020-02-24 06:53:42 -08:00
Anton Nikolaev
f6cc7c93ef Typescriptify the main process code (5/N)
Summary: Use dev bundling for "yarn start"

Reviewed By: jknoxville

Differential Revision: D20034300

fbshipit-source-id: a46c75074c969f5a4958f498c5c0e15aab808552
2020-02-24 05:23:47 -08:00
Anton Nikolaev
bd0c7bb58f Typescriptify the main process code (4/N)
Summary: Skip the main process code bundling when nothing changed

Reviewed By: mweststrate

Differential Revision: D20030261

fbshipit-source-id: 78de87377afe7e768627059425c51081239687dd
2020-02-24 05:23:47 -08:00
Anton Nikolaev
89180d0b07 Typescriptify the main process code (3/N)
Summary: Fixed yarn commands "lint" and "reset" considering the new static folder structure

Reviewed By: mweststrate

Differential Revision: D19972963

fbshipit-source-id: 323cc87598e14ccea30aa7dc5fc8c10a2e0c2db7
2020-02-24 05:23:46 -08:00
Anton Nikolaev
0c778af679 Typescriptify the main process code (2/N)
Summary: Converted main.js and setup.js to typescript

Reviewed By: mweststrate

Differential Revision: D19972273

fbshipit-source-id: f777be737da4233de4d7df3d549206efabfeeadf
2020-02-24 05:23:46 -08:00
Anton Nikolaev
18c259dc22 Typescriptify the main process code (1/N)
Summary:
As a first step I've configured bundling for the main process code using Metro. For now I haven't converted anything to ts, just made that possible.

The bundle is just produced into the "static" directory. To avoid too many changes I kept the "static" folder as it is, but probably non-static code should be moved from there.

Also installed modules from "node_modules" for the main process are not bundled to avoid potential issues with node native modules.

Reviewed By: mweststrate

Differential Revision: D19960982

fbshipit-source-id: efbd426254e2b37c913c5f5f75f042c50ccee2f3
2020-02-24 05:23:45 -08:00
Chaiwat Ekkaewnumchai
b5256abd0c Upgrade electron
Summary:
Tried to upgrade both electron and electron-builder but failed due to Windows binary build stuck.

Upgraded only electron for now. electron-builder will be upgraded separately

Reviewed By: nikoant

Differential Revision: D19877865

fbshipit-source-id: a2282c2f4062e6b470cdcba2e9e693419bfeaec4
2020-02-24 03:24:59 -08:00
Chaiwat Ekkaewnumchai
e5f8b93426 Add Icon
Reviewed By: nikoant

Differential Revision: D20035269

fbshipit-source-id: 902479068b2ecf9731bc90dd91222d5765120d6c
2020-02-24 03:22:35 -08:00
John Knox
51f62ff602 Fix artifact path in android-sample.yml (#820)
Summary:
This workflow is currently building the android app and then trying to upload the mac app (which isn't built) which is failing.

I think it should be uploading the android app instead.
Pull Request resolved: https://github.com/facebook/flipper/pull/820

Reviewed By: passy

Differential Revision: D20035055

Pulled By: jknoxville

fbshipit-source-id: 08367d464a045b47cf1b8b5395fd2151793a23cf
2020-02-24 02:16:59 -08:00
John Knox
20db85adf4 Add archived device visualizer
Summary:
Adds a visual indicator of layout nodes when using an archived device.

The "device" window isn't movable for some reason. I've tried the movable and draggable attributes but with no luck. It would obviously be good to fix that but I think its probably shippable as is, and I don't have any more ideas about how to do it.

Reviewed By: passy

Differential Revision: D19885719

fbshipit-source-id: 186ba38c85afee18ce111e30187bdccd9b919025
2020-02-21 07:19:13 -08:00
John Knox
c2dfa6ca6b Kill orphaned instruments processes (#819)
Summary:
Fix https://github.com/facebook/flipper/issues/808
Kills any orphaned Instruments processes belonging to the user.

In some cases, we've seen interactions between Instruments and the iOS
simulator that cause hung instruments and DTServiceHub processes. If
enough instances pile up, the host machine eventually becomes
unresponsive. Until the underlying issue is resolved, manually kill any
orphaned instances (where the parent process has died and PPID is 1)
before launching another instruments run.

Taking the same approach as done by flutter here.

Reviewed By: passy

Differential Revision: D20030005

Pulled By: jknoxville

fbshipit-source-id: aa80be78c80f7797e88bf29b15f90d4aad0c66e4
2020-02-21 06:53:44 -08:00
Michel Weststrate
4aec81b059 Fix issue where messages where not queued for non-selected apps
Summary: When determing whether to queue a message, the logic checked if the plugin is enabled on the currently selected app, rather than checking if it is enabled for the receiving app. This diff fixes that.

Reviewed By: passy

Differential Revision: D20000055

fbshipit-source-id: 665f0a650dcee8f7f46aa56f399a4f7d0d0aa1e0
2020-02-21 04:46:23 -08:00
Andrey Mishanin
adce24d343 Displaying identifier for root views
Summary: Adding the new "Identity" section to CK root views' description.

Reviewed By: cuva

Differential Revision: D19948784

fbshipit-source-id: f5e7fe51afd387a476f6500db32b8b5149594007
2020-02-21 04:25:16 -08:00
Pritesh Nandgaonkar
233b6d6a4e Update getting started guide
Summary:
Updated documentation for RN.

This fixes the documentation issue posted here https://github.com/facebook/flipper/issues/816

Reviewed By: mweststrate

Differential Revision: D20007620

fbshipit-source-id: 118e62450ad0c99346277d5205d637b7ecbae5c6
2020-02-21 04:23:22 -08:00
Anton Nikolaev
e1e8bb841c Cannot scroll with crash report
Summary: Fixed scroll for crash reported plugin

Reviewed By: mweststrate

Differential Revision: D19975593

fbshipit-source-id: 756c017e8a6e5e5e1309be5787bc88dd2ac97bca
2020-02-21 03:51:19 -08:00
Pascal Hartig
05a1c70bc7 Set up separate cli tool
Summary:
Discussed that we want this to be both a library and a CLI
tool. Also added a README stub.

Reviewed By: nikoant

Differential Revision: D19969788

fbshipit-source-id: 2c54935ce5953d2053c7bdf601debe0e5e911647
2020-02-21 03:51:19 -08:00
Pascal Hartig
eaf253e60f Enable greenkeeper (#813)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/813

^

Reviewed By: nikoant

Differential Revision: D19969789

fbshipit-source-id: 6bc10acc12707fcbea618580e57bf15e5fe7987e
2020-02-21 03:51:19 -08:00
Pascal Hartig
e54b8f06f8 Bump all packages
Summary: Enabling greenkeeper in the next diff.

Reviewed By: nikoant

Differential Revision: D19969790

fbshipit-source-id: 9a81c0505429512dc2e70523ab0b87eb0c6a2050
2020-02-21 03:51:18 -08:00
Michel Weststrate
64b06ba6f6 Fixed some issues with too many devices showing up in the sidebar
Summary:
Device management was inconsistent so far, this diff addresses the following issues

* pending a subtle timing issue, a physical android device might also show up as emulator, so effectively the device would be shown twice, but with the same content
* Metro devices now behave more like the android devices: offline devices are replaced if it comes online again
* Generalized this logic; the reducer now forces serials to be unique
* Fixed issue where a Metro device that disconnected due to a connection failure would be archived twice
* Use the metro connection url as serial, to have a slightly more future proof serial

Reviewed By: jknoxville

Differential Revision: D19996385

fbshipit-source-id: 0f6e3ddc6444542553d25cc3b592591652d688f2
2020-02-20 12:56:24 -08:00
John Knox
c262ab4e14 Change positionOnScreen to positionOnScreen{X,Y}
Summary:
Nested subobjects work but aren't very well typed in the layout plugin.
So changing it to help flipper work with it.
From:
```
positionOnScreen: {x: 234, y: 456},
```
to
```
positionOnScreenX: 234,
positionOnScreenY: 456,
```

Reviewed By: passy

Differential Revision: D19998161

fbshipit-source-id: 4e4d7ced3cb37c527bbdf65549ec436311a8c2b8
2020-02-20 11:25:05 -08:00
Pascal Hartig
35eeebffd0 Revert D19987003: Add theme information for Application, Activity and View descriptors
Differential Revision:
D19987003

Original commit changeset: c9b51311d287

fbshipit-source-id: c4536cfbb5e2a4fd198b5039067d89b2b8b5b92b
2020-02-20 05:15:03 -08:00
Michel Weststrate
ea1c21c8c3 Fix key warnings
Summary: Fixed a bunch of key errors in the network plugin, when a plugin is selected

Reviewed By: passy

Differential Revision: D19980275

fbshipit-source-id: 0ae61ed3b655c03d11c848d3502f455a409dcdcf
2020-02-20 04:39:35 -08:00
Michel Weststrate
2dad8809c4 Fix performance issues [1/N]
Summary:
This issue fixes a bunch of performance issues:

* The introduction of a context menu around every _row_ in D18808544 breaks the internal contract between lists and rows that react-window has, causing empty element to appear during scrolling, and some optimizations not working. Fixed by wrapping the context menu at the right level
* Every time a new row is created for the listview, it gets fresh event handlers and column configurations. THis has been fixed by precomputing the column configuration and avoiding the need to close over the row data in the event handlers
* Added some stricter immutable typings to make sure we don't break the immutable contract somewhere
* Fix the introduction of on the fly styling generation, which isn't needed

Reviewed By: passy

Differential Revision: D19853595

fbshipit-source-id: dc82b6586889f4e8c7a437cfdc27a50dc33ba2a2
2020-02-20 04:39:35 -08:00
Michel Weststrate
a05b8d1ba2 Prevent extensive logging of failed network requests
Summary:
If the browser makes a network request, and it fails, this is _always_ logged to the console, despite any error handling being in place. (see https://stackoverflow.com/questions/43012334/silence-neterr-connection-refused)

This diffs doesn't use the browser network stack, but the node network stack instead, which doesn't suffer from the same fate.

Reviewed By: passy

Differential Revision: D19995684

fbshipit-source-id: 4ffc12b820620c5310c140c1a3af63e5d2053a50
2020-02-20 04:33:02 -08:00
Pascal Hartig
474ff78bd8 Enable greenkeeper (#814)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/814

Per title.

Reviewed By: nikoant

Differential Revision: D19969813

fbshipit-source-id: f439c4d6496d4a88d70ef192bb544e5dfa6f9e2b
2020-02-20 04:30:50 -08:00
Hilal Alsibai
6f4de969fb Add theme information for Application, Activity and View descriptors
Summary: This will query for and display all of the associated theme information for each of the descriptors.

Reviewed By: passy

Differential Revision: D19987003

fbshipit-source-id: c9b51311d28712a1af76c45a434bfb25d28d5c54
2020-02-20 04:08:58 -08:00
Michel Weststrate
97f9b2494d Fix tooltips causing entire app to rerender
Summary:
Hovering a tooltip container would cause the full application to re-render. (Even if there isn't an actual tooltip!).

Fixed it by killing legacy context code, and using proper fragments rather than returning arrays.

Reviewed By: priteshrnandgaonkar

Differential Revision: D19969775

fbshipit-source-id: 59f6470d03b6c476305681fde7bbe3f0dca063aa
2020-02-19 22:17:24 -08:00
Michel Weststrate
07e5d7faf7 Don't subscribe to entire store. Don't cause rerender on every store change
Reviewed By: passy

Differential Revision: D19968715

fbshipit-source-id: 74e5ca9d2f68c6fa4e04771e7ad7ba1fecb207f3
2020-02-19 22:17:24 -08:00
greenkeeper[bot]
27c0a03ac2 Update @types/rsocket-core to the latest version � (#811)
Summary:
## The devDependency [types/rsocket-core](https://github.com/DefinitelyTyped/DefinitelyTyped) was updated from `0.0.4` to `0.0.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/811

Reviewed By: mweststrate

Differential Revision: D19969478

Pulled By: passy

fbshipit-source-id: b813bafdb5b0e9f72db16c11c822748383098a5a
2020-02-19 08:26:11 -08:00
Pascal Hartig
47471d2def Upgrade folly to v2020.02.17.00 (#809)
Summary:
# Summary

Folly became once again incompatible with the Android NDK, which caused our CI to fail to produce sample APK builds on release. I managed to repro this on my machine and it's working again now.

Sadly, I had to patch another file manually because something about the template parameter inference wasn't working ...

# Notes

This was done by first bumping the version, then going through the compiler errors and simply removing the lines that the C++ compiler in the NDK had trouble inferring the types for. We were lucky in that the exported symbols this affected weren't actually used, so I copied over the file to `overrides/Folly/` and set up another copy rule in Gradle.

# Meta

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

Test Plan:
```
./gradlew :sample:assembleDebug
```

Internal, external CI.

Reviewed By: mweststrate

Differential Revision: D19948797

Pulled By: passy

fbshipit-source-id: b2e98d3a5c89b0fc77c157683cde90997232fee0
2020-02-19 05:04:41 -08:00
Pascal Hartig
a0cd6e3adb Build Android sample app with GitHub Actions (#810)
Summary:
Getting really pissed off with Travis and this has significantly shorter queue times.

Mind that this probably won't work until the Folly PR is merged.
Pull Request resolved: https://github.com/facebook/flipper/pull/810

Test Plan: CI

Reviewed By: mweststrate

Differential Revision: D19951126

Pulled By: passy

fbshipit-source-id: ed51ad5ec6d4df3a59784dbd31e7c1667593d04f
2020-02-19 04:36:21 -08:00
Pritesh Nandgaonkar
972277b031 Fix warnings of FlipperKit in iOS
Summary:
This diff fixes the warnings raised from FlipperKit. Also this diff updates the deployement target of FlipperKit  to iOS 10. Even wilde assumes the min deployment OS version to be iOS 10. In layout plugin we use [UIAccessibiltyTraiTabBar](https://developer.apple.com/documentation/uikit/uiaccessibility/uiaccessibilitytraits/1648592-tabbar), which assumes iOS 10 and above.

Partially fixes https://github.com/facebook/flipper/issues/803

Still there are some warnings which are coming from the dependencies outside of Flipper.

Reviewed By: passy

Differential Revision: D19941558

fbshipit-source-id: 31809fedb9aa297bc318b5af72e29e8444f0142f
2020-02-18 12:47:21 -08:00
Pritesh Nandgaonkar
bd388f73e4 CLANGFORMAT the remaining files of xplat/sonar
Summary:
As per title.
Ran `arc lint -a --take CLANGFORMAT --paths-cmd 'hg files ./'` from xplat/sonar

Reviewed By: zertosh

Differential Revision: D19943131

fbshipit-source-id: c1dc10b27389fd6f54f055803519dac6bf0e7997
2020-02-18 05:27:56 -08:00
Pritesh Nandgaonkar
7db8d300a8 Run CLANGFORMAT on SonarKitTests
Summary: This diff runs CLANGFORMAT lint on SonarKitTests. I have added CLANGFORMAT as the lint engined for objc files in xplat/sonar. Right now the iOS folder is not formatted according to CLANGFORMAT.

Reviewed By: cekkaewnumchai

Differential Revision: D19942169

fbshipit-source-id: d4a51dd4ffba3acb30177345c51eb469124f9f5f
2020-02-17 10:49:19 -08:00
Pritesh Nandgaonkar
0e4250b4af Run CLANGFORMAT on sample
Summary: This diff runs CLANGFORMAT lint on sample. I have added CLANGFORMAT as the lint engined for objc files in xplat/sonar. Right now the iOS folder is not formatted according to CLANGFORMAT.

Reviewed By: passy

Differential Revision: D19942174

fbshipit-source-id: bef3e67bf31f13bb52417c81c4c330d6c258872d
2020-02-17 10:49:19 -08:00
Pritesh Nandgaonkar
e8b20d5b15 Run CLANGFORMAT on plugins
Summary:
This diff runs CLANGFORMAT lint on plugins. I have added CLANGFORMAT as the lint engined for objc files in xplat/sonar. Right now the iOS folder is not formatted according to CLANGFORMAT.

Ran `arc lint -a --paths-cmd "find ./iOS/Plugins -type f" --verbose`

Reviewed By: passy

Differential Revision: D19942173

fbshipit-source-id: 8b975b0a344df073b02d69cd1f9ee5629af2799d
2020-02-17 10:49:18 -08:00
Pritesh Nandgaonkar
a19a430eee Run CLANGFORMAT for FlipperKitTestUtils
Summary:
This diff runs CLANGFORMAT lint on FlipperKitTestUtils. I have added CLANGFORMAT as the lint engined for objc files in xplat/sonar. Right now the iOS folder is not formatted according to CLANGFORMAT.
Ran `arc lint -a --paths-cmd "find ./iOS/FlipperKitTestUtils -type f" --verbose`

Reviewed By: passy

Differential Revision: D19942175

fbshipit-source-id: a5067100e604aad438fef1842157217a8cd1734c
2020-02-17 10:49:18 -08:00
Pritesh Nandgaonkar
38478842df Run CLANGFORMAT for FlipperKitTests
Summary:
This diff runs CLANGFORMAT lint on FlipperKitTestUtils. I have added CLANGFORMAT as the lint engined for objc files in xplat/sonar. Right now the iOS folder is not formatted according to CLANGFORMAT.
Ran `arc lint -a --paths-cmd "find ./iOS/FlipperKitTests -type f" --verbose`

Reviewed By: passy

Differential Revision: D19942172

fbshipit-source-id: 58322ef6a3a93f9666b3114e872a3a81a3c1cb35
2020-02-17 10:49:18 -08:00
Pritesh Nandgaonkar
36deab1d52 Run CLANGFORMAT on FBDefines
Summary:
This diff runs CLANGFORMAT lint on FlipperKitTestUtils. I have added CLANGFORMAT as the lint engined for objc files in xplat/sonar. Right now the iOS folder is not formatted according to CLANGFORMAT.
Ran `arc lint -a --paths-cmd "find ./iOS/FBDefines -type f" --verbose`

Reviewed By: passy

Differential Revision: D19942171

fbshipit-source-id: a5e33c7dce2bee8ed29a58f72f5cf5935391f499
2020-02-17 10:49:17 -08:00
Pritesh Nandgaonkar
ca513cf370 Run CLANGFORMAT on FlipperKit folder
Summary:
This diff runs CLANGFORMAT lint on FlipperKit. I have added CLANGFORMAT as the lint engined for objc files in xplat/sonar. Right now the iOS folder is not formatted according to CLANGFORMAT.
Ran `arc lint -a --paths-cmd "find ./iOS/FlipperKit -type f" --verbose`

Reviewed By: passy

Differential Revision: D19942170

fbshipit-source-id: af677323af4edb761f61f8f7e289cab743aa31f2
2020-02-17 10:49:17 -08:00
greenkeeper[bot]
127eec5fa1 Update fix-path in group website to the latest version � (#804)
Summary:
## The dependency [fix-path](https://github.com/sindresorhus/fix-path) was updated from `2.1.0` 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:** [sindresorhus](https://www.npmjs.com/~sindresorhus)
**License:** MIT

<details>
<summary>Release Notes for v3.0.0</summary>

<h3>Breaking</h3>
<ul>
<li>Require Node.js 10  <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="41133a9fa6/hovercard" href="41133a9fa6"><tt>41133a9</tt></a></li>
</ul>
<h3>Enhancements</h3>
<ul>
<li>Add TypeScript definition (<a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="522596993" data-permission-text="Issue title is private" data-url="https://github.com/sindresorhus/fix-path/issues/12" data-hovercard-type="pull_request" data-hovercard-url="/sindresorhus/fix-path/pull/12/hovercard" href="https://urls.greenkeeper.io/sindresorhus/fix-path/pull/12">https://github.com/facebook/flipper/issues/12</a>)  <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="096036c297/hovercard" href="096036c297"><tt>096036c</tt></a></li>
</ul>
<p><a class="commit-link" href="https://urls.greenkeeper.io/sindresorhus/fix-path/compare/v2.1.0...v3.0.0"><tt>v2.1.0...v3.0.0</tt></a></p>
</details>

<details>
<summary>Commits</summary>
<p>The new version differs by 5 commits.</p>
<ul>
<li><a href="8f12bec72e"><code>8f12bec</code></a> <code>3.0.0</code></li>
<li><a href="41133a9fa6"><code>41133a9</code></a> <code>Require Node.js 10</code></li>
<li><a href="096036c297"><code>096036c</code></a> <code>Add TypeScript definition (https://github.com/facebook/flipper/issues/12)</code></li>
<li><a href="df806209a2"><code>df80620</code></a> <code>Require Node.js 8</code></li>
<li><a href="e208dd064d"><code>e208dd0</code></a> <code>Create funding.yml</code></li>
</ul>
<p>See the <a href="b9fa7c4ce9...8f12bec72e">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/804

Reviewed By: mweststrate

Differential Revision: D19938234

Pulled By: passy

fbshipit-source-id: b012360396d476d610e79136904052ec7395076d
2020-02-17 08:26:17 -08:00
Michel Weststrate
6b3a09e28e Flipper Bump: v0.31.3-SNAPSHOT
Summary: Releasing Flipper 0.31.2 as preview for the improved React Native support (blog post will follow)

Reviewed By: cekkaewnumchai

Differential Revision: D19939346

fbshipit-source-id: 20f352e5f2d700a6e02b7562d228732525b192a4
2020-02-17 06:21:46 -08:00
Michel Weststrate
7d92e3ee58 Flipper Release: v0.31.2
Summary: Releasing Flipper 0.31.2 as preview for the improved React Native support (blog post will follow)

Reviewed By: cekkaewnumchai

Differential Revision: D19939347

fbshipit-source-id: 4bff1aabdd4e63003de9c9c0af2002ed67504da1
2020-02-17 06:21:46 -08:00
Lucas Bento
9c873bd034 Add troubleshooting content about swift errors in React Native build (#794)
Summary:
Going through the `Getting Started` tutorial with `"react-native": "0.61.5"` makes the app crash when you build it, in order to get it working you must add a `.swift` file to the project.

## Changelog

Add troubleshooting content about swift errors in React Native build
Pull Request resolved: https://github.com/facebook/flipper/pull/794

Reviewed By: passy

Differential Revision: D19852986

Pulled By: mweststrate

fbshipit-source-id: 16bc44ad573dc20b90f57777ea1c9cfca7c7c4c9
2020-02-17 06:21:46 -08:00
Michel Weststrate
15cde55981 Convert Hermesdebugger to device plugin
Summary:
This diff exposes the Hermes debugger as a device plugin, for similar reasons as we did with React Devtools.

Also replaced an ugly hack with another just as ugly hack (rendering outside the React tree to preserve the state of the chrome devtools when switching to another plugin and coming back), that behaves at least correctly when resizing etc instead of doing absolute styling

Reviewed By: passy

Differential Revision: D19905082

fbshipit-source-id: 1e80c55fc9c5b1f8a9292f0ba1ef66b0b007b7fc
2020-02-17 03:41:14 -08:00
Michel Weststrate
1383260a7c Expose React Devtools as a Metro plugin
Summary:
This diff turns the DevTools plugin from a normal plugin in a device plugin. The reason for that can be seen at the end of the test plan in the first stack of this diff: Regardless on which client you open the devtools, you are always looking at the react tree of the app that happens to listen at the appropriate port, unrelated to the actively selected app. This diff moves the plugin from being a client plugin to a device plugin, a Metro device plugin to be precisely, as of the latter there is only one and they should typically correspond (which is why we can trigger reload as done in the previous diff)

Currently we have a Flipper plugin inside the iOS / Android apps with one purpose: to select different ports to listen to on different devices. But this functionality was never implemented, nor seems there to be much demand for. So these plugin don't offer any actual value. The widely used standalone version of the react devtools (https://www.npmjs.com/package/react-devtools) doesn't offer port customization either, so this limitation seems to be acceptable.

To make sure that this change is backward compatible, we make sure to show the metro device if we find metro, regardless whether it is new enough to support log forwarding and reload commands (previously we only showed the device if it has the /events endpoint).

The only case I can think of we are killing with this approach is where people are debugging a RN app, but with having metro running. I doubt that is an actual case, but probably rickhanlonii knows more about that.

Furthermore this diff makes sure that the devTools can connect to physical android devices. Also, making it to the end of this explanation means that you have done most of the reviewing for this diff. The actual code diff is shorter.

Reviewed By: passy

Differential Revision: D19878605

fbshipit-source-id: 3f33e59d4f6e4cce39102420f38afee10018999f
2020-02-17 03:41:13 -08:00
Michel Weststrate
56297d0cfc Automatically cause reload to trigger devTools
Summary:
To connect to the React Devtools, the app has to be reload (or the dev menu opened).
This diff does force a reload if the React Devtools don't connect timely

Reviewed By: passy

Differential Revision: D19878172

fbshipit-source-id: 0b3e22f70c9d24dae1fdbf0cc351d23367654ae1
2020-02-17 03:41:13 -08:00
Michel Weststrate
3849807d6b Show status of connection, so that user knows what is happening
Summary: In many cases the React DevTools fail to show up for RN. usually that is because the app didn't enter devMode yet. This diff adds the necessary logic to query the state of the DevTools and communicate back the current connection status

Reviewed By: passy

Differential Revision: D19878127

fbshipit-source-id: f5c3f5a92b23c87c87d778a468122210325eed17
2020-02-17 03:41:13 -08:00
Pritesh Nandgaonkar
14ebfb8439 Make network plugin a required plugin
Summary: Makes network plugin a required plugin for Graphql grps

Reviewed By: jonathoma

Differential Revision: D19905736

fbshipit-source-id: f72fddd5e04ce9b1670715d731dc86a8d4a19cc5
2020-02-15 08:13:48 -08:00