Commit Graph

2570 Commits

Author SHA1 Message Date
Pascal Hartig
14dd792829 Flipper Bump: v0.26.1-SNAPSHOT
Summary: Back to snapshots.

Reviewed By: jknoxville

Differential Revision: D18007368

fbshipit-source-id: a3c95f78e5d03895c89eb1ea5a0b3485b1057a80
2019-10-18 08:29:46 -07:00
Pascal Hartig
15ce3319f1 Flipper Release: v0.26.0
Summary:
**Highlights**

- New settings panel for configuring Android SDK paths and iOS support.
- Support for taking screenshots and recording videos on Windows.
- Copying an element name in the layout inspector now copies the attributes instead of just a numeric identifier.

Full changelog at https://github.com/facebook/flipper/compare/v0.25.0...v0.26.0

Reviewed By: jknoxville

Differential Revision: D18007369

fbshipit-source-id: ad4069da59f5b2b96090a14c17d57d37a0ca64be
2019-10-18 08:29:46 -07:00
Pritesh Nandgaonkar
65ff3f8ec9 Show support form option for deeplink users
Summary: This diff shows the support form option for the deeplink users too even if they are not part of GK. As I discovered a bug where the user opened the Flipper app thru deeplink and then the screen showed temporarily till the device connected and then the default plugin was displayed. In this case there is no way to navigate back to the form.

Reviewed By: jknoxville

Differential Revision: D17978648

fbshipit-source-id: 23ae3660e499a959733753b49cc987f2e381bf6b
2019-10-18 07:32:33 -07:00
John Knox
781344f7de Fix jest mocking in tests (#592)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/592

Finally we can join the 21st century and use `jest.mock` in tests!

I'm enabling the ts-jest transform to `*/__tests__/*.tsx` files. This takes care of transforming the typescript, and preserves jest mock capabilities.
I have left the existing custom transform on all other files, so they will continue to work as usual.

Caveats:
* Our existing custom transforms will no longer be applied in tests.
  * With our current suite this makes no difference. But bear in mind things like importing directly from 'flipper' instead of the actual files, won't work. However, I don't see this being a problem, as I think they'll only be needed inside the actual product code.

Reviewed By: passy

Differential Revision: D17978753

fbshipit-source-id: df7b312b5dd5592e4aa4f8df605f5952ea3158e9
2019-10-18 07:17:40 -07:00
Michael Evans
cc19cc75ee Move declaration of required permissions into core lib (#593)
Summary:
If we move the permissions into the library itself, the manifest
merger will take care of adding them to consuming applications,
making setup instructions easier.

## Changelog

Move required permission declarations into flipper-core
Pull Request resolved: https://github.com/facebook/flipper/pull/593

Test Plan:
Using aapt we can dump the permissions of a sample app.
`$ANDROID_HOME/build-tools/29.0.2/aapt d permissions sample-debug.apk `
```
package: com.facebook.flipper.sample
uses-permission: name='android.permission.WRITE_EXTERNAL_STORAGE'
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.ACCESS_WIFI_STATE'
uses-permission: name='android.permission.READ_EXTERNAL_STORAGE'
uses-permission: name='android.permission.FOREGROUND_SERVICE
```

Reviewed By: priteshrnandgaonkar

Differential Revision: D18006323

Pulled By: passy

fbshipit-source-id: c4cf28ee698faa3e2b631462f2953976135b299c
2019-10-18 06:43:35 -07:00
Pritesh Nandgaonkar
c57718760d Define custom protocol in package json
Summary: Defines custom protocol in the package json. This adds the custom protocol definition in the Info.plist file.

Reviewed By: passy

Differential Revision: D17983382

fbshipit-source-id: 48d74e676e07ba9cf8c7baaac27d8f74042336a1
2019-10-18 03:40:19 -07:00
Pascal Hartig
818c7ed2c1 Update React to 16.10
Summary: Per title.

Reviewed By: jknoxville

Differential Revision: D17978882

fbshipit-source-id: 68ea07ac81b9b5e651680f9e9d902f5d689c2b16
2019-10-17 08:31:56 -07:00
Pascal Hartig
182b4e1b1f Set stricter limit for body payloads
Summary:
Base64 encoding can easily cause OOMs for large payloads.

In the long-term, it would be great to have a way of streaming these
responses so we don't allocate 50MB chunks of memory at once.

Reviewed By: jknoxville

Differential Revision: D17951353

fbshipit-source-id: a5d7b8242892518590ac95c1d9751f24d20dc40e
2019-10-16 09:29:52 -07:00
Pascal Hartig
9e96f0c7c2 Remove closed task references
Summary: No longer relevant.

Reviewed By: jknoxville

Differential Revision: D17951216

fbshipit-source-id: 2ef2a97c594af7cf9c134555779765872cfa0eb4
2019-10-16 08:08:23 -07:00
greenkeeper[bot]
78b093118d Update dependencies to enable Greenkeeper � (#591)
Summary:
Let’s get started with automated dependency management for flipper 💪

🔒 Greenkeeper has found a `yarn.lock` file in this repository. Greenkeeper supports lockfile updates for public packages. If you use private packages in your repository, please use [greenkeeper-lockfile](https://github.com/greenkeeperio/greenkeeper-lockfile) to make sure these can get updated as well.

This pull request **updates all your dependencies to their latest version**. Having them all up to date really is the best starting point for keeping up with new releases. Greenkeeper will look out for further dependency updates and make sure to handle them in isolation and in real-time, but only after **you merge this pull request**.

**Important: Greenkeeper will only start watching this repository’s dependency updates after you merge this initial pull request**.

📦 📦  Greenkeeper has detected multiple `package.json` files. Since this repo already has a `greenkeeper.json` config file with defined groups, Greenkeeper has only checked whether they’re still valid.

 ---
<details>
<summary>🏷 How to check the status of this repository</summary>

Greenkeeper adds a badge to your README which indicates the status of this repository.

This is what your badge looks like right now 👉  ![Greenkeeper badge](https://badges.greenkeeper.io/facebook/flipper.svg)
</details>
<details>
<summary>🙈 How to ignore certain dependencies</summary>

You may have good reasons for not wanting to update to a certain dependency right now. In this case, you can [change the dependency’s version string in the `package.json` file back to whatever you prefer](https://github.com/facebook/flipper/edit/greenkeeper/initial/package.json).

To make sure Greenkeeper doesn’t nag you again on the next update, add a `greenkeeper.ignore` field to your `package.json`, containing a list of dependencies you don’t want to update.

```js
// package.json
{
  …
  "greenkeeper": {
    "ignore": [
      "package-names",
      "you-want-me-to-ignore"
    ]
  }
}
```
</details>
<details>
<summary>👩‍💻 How to update this pull request</summary>

```bash
  # Change into your repository’s directory
  git fetch --all
  git checkout greenkeeper/initial
  npm install-test
  # Adapt your code until everything works again
  git commit -m 'chore: adapt code to updated dependencies'
  git push https://github.com/facebook/flipper.git greenkeeper/initial
```
</details>
<details>
<summary> How do dependency updates work with Greenkeeper?</summary>

After you merge this pull request, **Greenkeeper will create a new branch whenever a  dependency is updated**, with the new version applied. The branch creation should trigger your testing services and check whether your code still works with the new dependency version. Depending on the the results of these tests Greenkeeper will try to open meaningful and helpful pull requests and issues, so your dependencies remain working and up-to-date.

```diff
-  "underscore": "^1.6.0"
+  "underscore": "^1.7.0"
```

The above example shows an in-range update. `1.7.0` is included in the old `^1.6.0` range, because of the [caret `^` character ](https://docs.npmjs.com/misc/semver#ranges).
When the test services report success Greenkeeper will silently delete the branch again, because no action needs to be taken – everything is fine.

However, should the tests fail, Greenkeeper will create an issue to inform you about the problem immediately.

This way, you’ll never be surprised by a dependency breaking your code. As long as everything still works, Greenkeeper will stay out of your way, and as soon as something goes wrong, you’ll be the first to know.

```diff
-  "lodash": "^3.0.0"
+  "lodash": "^4.0.0"
```

In this example, the new version `4.0.0` is _not_ included in the old `^3.0.0` range.
For version updates like these – let’s call them “out of range” updates – you’ll receive a pull request.

This means that **you no longer need to check for new versions manually** – Greenkeeper will keep you up to date automatically.

These pull requests not only serve as reminders to update: If you have solid tests and good coverage, and the pull requests passes those tests, you can very likely just merge it and release a new version of your software straight away :shipit:

To get a better idea of which ranges apply to which releases, check out the extremely useful [semver calculator](https://semver.npmjs.com/) provided by npm.
</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>

 ---

Good luck with your project and see you soon 

Your [Greenkeeper](https://greenkeeper.io) bot 🌴
Pull Request resolved: https://github.com/facebook/flipper/pull/591

Reviewed By: jknoxville

Differential Revision: D17951583

Pulled By: passy

fbshipit-source-id: 6ad2bfe7d4a9f7ed4920e50af36e194dc5b1cb93
2019-10-16 08:01:03 -07:00
Pascal Hartig
aa1f03a643 Upgrade redux-persist
Summary:
Last one blocking Greenkeeper.

Only change affecting us appears to be where to import from.

Reviewed By: jknoxville

Differential Revision: D17932089

fbshipit-source-id: b913defdabd99721886557d7c92afb8181ca1803
2019-10-16 02:32:31 -07:00
John Knox
498fa2dc85 Fix missing errors from test output
Summary:
We were losing the first argument of every console.error call during tests.
This happens to be useful stuff, like react telling you how to do better testing etc, and explains the weird looking error output from the ConfigField tests.

Reviewed By: passy

Differential Revision: D17931532

fbshipit-source-id: cfeb834a4646ef68ac55f81a269bcfef7a25ea31
2019-10-16 01:11:56 -07:00
Pascal Hartig
c9d1d2c444 Lock down more dependencies
Summary:
Newer rsocket packages are borked; don't have a `main` attribute anymore.
Need to be looked into separately. This is to unblock greenkeeper activation.

Based on https://github.com/facebook/flipper/pull/587/files

Reviewed By: jknoxville

Differential Revision: D17928918

fbshipit-source-id: 3ec38c5740f115883e8534776a96d8a8d6ea6b1e
2019-10-15 07:03:53 -07:00
Pritesh Nandgaonkar
5614444380 Track the source of the supportform
Summary: This diff adds the telemetry to track the source of the support form being launched.

Reviewed By: passy

Differential Revision: D17908752

fbshipit-source-id: 275812992884a471844fda40d1f636815a4a2346
2019-10-15 04:13:38 -07:00
Pascal Hartig
d277e1da9e Show up-to-date image (#585)
Summary:
The previous one was a bit outdated. It's only used in low-res
environments otherwise where that's fine, but let's a more recent
one for the README header.
Pull Request resolved: https://github.com/facebook/flipper/pull/585

Test Plan: eyes

Reviewed By: jknoxville

Differential Revision: D17908742

Pulled By: passy

fbshipit-source-id: 81e3ccf9e1b94bd57d162dd59b0a4dfb8e4366ea
2019-10-15 02:31:10 -07:00
Pascal Hartig
b10a67d443 Show potential errors alongside buttons
Summary:
Instead of replacing the buttons, this shows an error next to
them and gives the opportunity to retry.

Reviewed By: jknoxville

Differential Revision: D17907389

fbshipit-source-id: 15b27802671b39c53b32d01f1d2bcf8c67fd2647
2019-10-14 10:08:28 -07:00
Pascal Hartig
4bdccb22fa Enable greenkeeper
Summary:
Close https://github.com/facebook/flipper/pull/580

This enables Greenkeeper with some caveats:

- I disabled a bunch of upgrades we know currently break:
  - React
  - Emotion
  - Electron/Electron-Builder
- The bot isn't CLA-whitelisted yet, so we won't be able to directly import yet.
- It might actually be better to have automatic tasks created for the dependencies above breaking.
- Something changed in the prop types and required `StatusBar` to have its signature changed.

allow-large-files

Reviewed By: jknoxville

Differential Revision: D17906693

fbshipit-source-id: f73fe231518f56a6f6114f761d5e5e5528d0d487
2019-10-14 09:42:56 -07:00
Pascal Hartig
1d7b194abb Run lint and build step (#583)
Summary:
This should just work, but let's see what CI says.
Pull Request resolved: https://github.com/facebook/flipper/pull/583

Reviewed By: jknoxville

Differential Revision: D17906598

Pulled By: passy

fbshipit-source-id: 5de686c8c9b23b101999da938d6e8f9baff7bc86
2019-10-14 08:37:36 -07:00
Pascal Hartig
a2bdf4e0dd Bump flow
Summary: We still use it in some places. Up to 109 before we get kicked off Sandcastle.

Reviewed By: jknoxville

Differential Revision: D17906687

fbshipit-source-id: 391e29add37b6cf5c5dbb9dd9c0743e130cc4381
2019-10-14 08:28:37 -07:00
Pritesh Nandgaonkar
de17f3905b Close export dialog autmatically for support form
Summary: This diff adds the support to close the dialog automatically for the support form.

Reviewed By: passy

Differential Revision: D17899862

fbshipit-source-id: 9d9cd14556a4cebe60f8cc1d082be3e439998e9c
2019-10-14 08:07:41 -07:00
John Knox
4a8a4aabb6 Purify Glyph component
Summary: A significant proportion of CPU time when doing a target selection in the layout plugin, was spent rendering Glyphs. They shouldn't really be doing anything expensive in render, but since they already are, this will make sure they don't re-render unnecessarily.

Reviewed By: passy

Differential Revision: D17906723

fbshipit-source-id: ece143f65fd46d8582e21455732049368f301186
2019-10-14 07:49:52 -07:00
Pascal Hartig
874e590b96 Upgrade eslint and prettier
Summary: Not a fan of the long lines, but if that's where prettier is going, let's roll with it.

Reviewed By: jknoxville

Differential Revision: D17905599

fbshipit-source-id: c4232d46d2ec0b7c743f6afd8349106c85f013b9
2019-10-14 05:27:27 -07:00
Andres Suarez
54ebb44dda Tidy up Flipper license headers [2/2]
Reviewed By: passy

Differential Revision: D17863710

fbshipit-source-id: 5b249bdd1c06d3a526b250b035b797d0c8e796eb
2019-10-11 13:46:45 -07:00
Andres Suarez
0675dd924d Tidy up Flipper license headers [1/2]
Reviewed By: passy

Differential Revision: D17863711

fbshipit-source-id: 259dc77826fb803ff1b88c88529d7f679d3b74d8
2019-10-11 13:46:45 -07:00
Andres Suarez
29aec8a6ed Relax ESLint header lint
Reviewed By: passy

Differential Revision: D17878532

fbshipit-source-id: 976626d3254a4e570633687424b37fe0d0589707
2019-10-11 13:46:44 -07:00
Pascal Hartig
312fa7ce37 Cache layout icons
Summary: Opened layout, looked at warnings, added icons.

Reviewed By: jknoxville

Differential Revision: D17879910

fbshipit-source-id: 12375173b15c8d2e0b158cae4ded23237ed9c9b6
2019-10-11 10:55:38 -07:00
Pritesh Nandgaonkar
ab121f9d96 Updated the OpenSSL dependency (#577)
Summary:
This PR updates the openssl dependency with OpenSSL-Universal, which ships a fat-binary of libssl and libcrypto with all the architecture.

This PR also updates the travis to cache cocoapods checkout directory.

## Changelog

Updated Flipper-Folly deps
Pull Request resolved: https://github.com/facebook/flipper/pull/577

Test Plan: CI

Reviewed By: jknoxville

Differential Revision: D17877304

Pulled By: priteshrnandgaonkar

fbshipit-source-id: 9d13308108b6665d4bf5dd6145fcaafa2a2a8a13
2019-10-11 07:54:28 -07:00
John Knox
0479309dd1 Don't fail when dir doesn't exist
Summary:
Noticed a bunch of failures [here](https://our.intern.facebook.com/intern/scuba/query/?dataset=flipper_session_event_stats_scuba&drillstate=%7B%22sampleCols%22%3A[%22errors%22%2C%22event%22]%2C%22cols%22%3A[]%2C%22derivedCols%22%3A[%7B%22name%22%3A%22perfect_session%22%2C%22sql%22%3A%22CAST_AS_DOUBLE(no_failures)%22%2C%22type%22%3A%22Numeric%22%7D]%2C%22mappedCols%22%3A[]%2C%22enumCols%22%3A[]%2C%22return_remainder%22%3Afalse%2C%22should_pivot%22%3Afalse%2C%22is_timeseries%22%3Atrue%2C%22hideEmptyColumns%22%3Afalse%2C%22start%22%3A%22-90%20days%22%2C%22samplingRatio%22%3A1%2C%22compare%22%3A%22comparison%22%2C%22axes%22%3A%22linked%22%2C%22bucket%22%3A%221%22%2C%22overlay_types%22%3A[]%2C%22minBucketSamples%22%3A%22%22%2C%22dimensions%22%3A[%22time%22%2C%22event%22]%2C%22scale_type%22%3A%22absolute%22%2C%22num_samples%22%3A%22100%22%2C%22metric%22%3A%22avg%22%2C%22fill_missing_buckets%22%3A%22connect%22%2C%22smoothing_bucket%22%3A%221%22%2C%22top%22%3A20%2C%22markers%22%3A%22%22%2C%22timezone%22%3A%22America%2FLos_Angeles%22%2C%22end%22%3A%22now%22%2C%22time_bucket%22%3A%22604800%22%2C%22compare_mode%22%3A%22normal%22%2C%22aggregateList%22%3A[]%2C%22param_dimensions%22%3A[]%2C%22modifiers%22%3A[]%2C%22order%22%3A%22none%22%2C%22order_desc%22%3Atrue%2C%22filterMode%22%3A%22DEFAULT%22%2C%22constraints%22%3A[[%7B%22column%22%3A%22plugin%22%2C%22op%22%3A%22eq%22%2C%22value%22%3A[%22[%5C%22null%5C%22]%22]%7D%2C%7B%22column%22%3A%22is_headless%22%2C%22op%22%3A%22!substr%22%2C%22value%22%3A[%22[%5C%22true%5C%22]%22]%7D%2C%7B%22column%22%3A%22event%22%2C%22op%22%3A%22substr%22%2C%22value%22%3A[%22[%5C%22getInstalledPlugins%5C%22]%22]%7D]]%2C%22c_constraints%22%3A[[]]%2C%22b_constraints%22%3A[[]]%2C%22metrik_view_params%22%3A%7B%22xaxis_type%22%3A%22auto%22%2C%22should_use_legacy_colors%22%3Afalse%2C%22view%22%3A%22Samples%22%2C%22width%22%3A%222126%22%2C%22height%22%3A%221132%22%2C%22y_max_hint%22%3A%221%22%2C%22yaxis_settings%22%3A[%7B%22yaxis_title%22%3A%22%22%2C%22yaxis_series_name%22%3A%22%22%2C%22yaxis_width%22%3A%220%22%2C%22yaxis_format%22%3A%22%25P%22%7D]%2C%22tooltip_outside%22%3Atrue%2C%22state%22%3A%22published%22%2C%22use_y_axis_hints_as_limits%22%3Atrue%2C%22legend_mode%22%3A%22nongrid%22%2C%22connect_nulls%22%3Atrue%2C%22yaxismin%22%3A0%2C%22title%22%3A%22Operation%20success%20rate%20over%20time%20(human)%22%2C%22tooltip_disabled%22%3Atrue%2C%22timezone_offset%22%3A420%2C%22y_min_hint%22%3A0%2C%22legend_position%22%3A%22none%22%2C%22title_use_v2%22%3Atrue%7D%7D&pool=uber&view=Samples&dashboard_id&tab_id&widget_id&widget_piece_id).

This fixes it.

Reviewed By: passy

Differential Revision: D17877108

fbshipit-source-id: 85586a1ce65033b98d793746c611b44f68e13eff
2019-10-11 06:21:47 -07:00
John Knox
6909a4a315 Add snapshot tests for settings
Summary: Take a snapshot with each field adjusted to prevent accidental changes.

Reviewed By: priteshrnandgaonkar

Differential Revision: D17832181

fbshipit-source-id: 016f99ec032036993a40fea310c6fd9887da6c38
2019-10-10 09:23:47 -07:00
John Knox
ea4c678fac Expose iOS "setting" in settings
Summary:
Adds an iOS "setting" to the settings, but it's automatically set based on xcode-select for minimum required effort.

Helpful text added to tell you how to enable it if it's disabled.

Reviewed By: passy

Differential Revision: D17830940

fbshipit-source-id: 53e1e40c5b96e29b30036259cc774ab14097a1da
2019-10-10 09:23:46 -07:00
John Knox
ea5079ff9c Enable / Disable iOS support depending on xcode-select
Summary:
Queries xcode-select on ios dispatcher startup, to see if it's installed.
If it is, carry on with the ios device tracking, if not, don't bother.

This should stop it from emitting errors trying to track devices when things aren't installed.

I think it should also stop those install prompts from popping up.

Sets it in app state so we can tell the user about it, and maybe gate some other things too.

Reviewed By: passy

Differential Revision: D17830696

fbshipit-source-id: 960d09a9c5267afabf5e5e222379a0a7ed2cc444
2019-10-10 09:23:46 -07:00
John Knox
68881f35fc Use androidEnabled setting in dispatcher
Summary:
Takes the androidEnabled setting and uses it to gate the android dispatcher.
Enables people without android sdk to use flipper (e.g. iOS engineers).

Reviewed By: priteshrnandgaonkar

Differential Revision: D17829810

fbshipit-source-id: 7d25580e65dee93ebfda7c5cc4c4cea03744e2ca
2019-10-10 09:23:46 -07:00
John Knox
16be611792 Add android enable/disable to settings screen
Summary:
The UI could do with a bit more fine tuning, but it's a start.

Fully functional with updating the settings file. But nothing actually uses that setting yet.

Reviewed By: priteshrnandgaonkar

Differential Revision: D17810588

fbshipit-source-id: 791ee60616f3ee73f41813a5a442b08a5e395458
2019-10-10 09:23:45 -07:00
Pritesh Nandgaonkar
e0e0a8f916 Add device argument in the constructor of Client
Summary: Property `device` on Clients for archived device never resolve. As it gets resolved when `addConnection` is called which happens for real non-offline devices. To get around this, I have added an argument to the constructor of the Client, as for offline case we can construct the device before client and can pass it as an argument.

Reviewed By: jknoxville

Differential Revision: D17831261

fbshipit-source-id: a14fb0b65343cccac731077e983026388611d323
2019-10-10 08:22:52 -07:00
Pritesh Nandgaonkar
e31f526618 Send flipper trace as a separate message
Summary:
This diff sends flipper trace as a separate message so that the form can update the state which can be used for validation. If the user doesn't click on "Flipper Trace" then it will show a validation error.

WWW side changes are here D17810526. Merge this diff only when www is landed.

Reviewed By: jknoxville

Differential Revision: D17812023

fbshipit-source-id: 35f17f9e58fc08cde3928072dc66758b1c507bcb
2019-10-10 08:22:52 -07:00
John Knox
7dd6f9a81f ToggleButton: Return component instead of fragment
Summary:
This should be an encapsulated component, not returning the building blocks of one.
So I'm changing the default to return a single component that contains the fragment previously returned.

Now elements appear side by side, are vertically aligned, and onClick works on the label as well, by default. This doesn't break anything in any of the uses inside the flipper code base, because only one used a label (regex search in Searchable.tsx), and these properties are all desirable there.

This could potentially break any plugins that aren't included in the flipper codebase, if they already have a label and don't layout the elements side by side. There are probably no such cases.

Reviewed By: passy

Differential Revision: D17810386

fbshipit-source-id: 588d7ed3243a9f0e5bcad805a3480393c031ff55
2019-10-10 05:21:40 -07:00
Pritesh Nandgaonkar
dfc4f74ed3 Deeplink support
Summary: This diff adds the support to deeplink to the litho form.

Reviewed By: passy

Differential Revision: D17792341

fbshipit-source-id: b146993163b14df000c499236da48b7e8066f457
2019-10-08 12:01:09 -07:00
Pritesh Nandgaonkar
f924b0ae1b Add support manager to display an error screen or litho form
Summary:
This diff shows the error screen when one of the following condition is met:

- Selected device is not android
- No clients are active for selected device
-  At least there is one client which supports inspector plugin.

For this I have added a SupportRequestManager class which loads the error screen or the litho form based on the above condition.

The UI is super basic. Will improve the design based on your feedback in the coming diffs.

Reviewed By: jknoxville

Differential Revision: D17790596

fbshipit-source-id: 2afc917c93c6e7321399633c5bf9d27a703742ee
2019-10-08 12:01:09 -07:00
Pritesh Nandgaonkar
e5ddb5d709 Show support form in all the cases
Summary: Earlier we used to show the support form only when selected device was android. But this won't work because, I am planning to add a deeplink support for the form, so that the user can directly open flipper from workplace. Because of this we will have to show the litho support form always. In case  when the selected device is not android, we will show an error screen with possible solutions to open the litho support form.

Reviewed By: passy

Differential Revision: D17787686

fbshipit-source-id: 13e15041238d8746f947563bb3c2ea3cec205a5e
2019-10-08 12:01:09 -07:00
Mateo Silguero
ee13541587 react native integration tutorial (#567)
Summary:
Integrate Flipper with React Native, is a bit different than a native app. I wrote this tutorial inspired by nparashuram 's blog. http://blog.nparashuram.com/2019/09/using-flipper-with-react-native.html

## Changelog

Flipper + React Native Documentation
Pull Request resolved: https://github.com/facebook/flipper/pull/567

Reviewed By: jknoxville

Differential Revision: D17809429

Pulled By: passy

fbshipit-source-id: a1172d36775f80f1ac849913cb855390d353ade0
2019-10-08 09:04:48 -07:00
Pascal Hartig
208752b15e Fix glyph centering
Summary:
Before:

{F216059409}
(info circle!)

After:

{F216059417}

Reviewed By: jknoxville

Differential Revision: D17808879

fbshipit-source-id: 4408ba11919e70958f2d8123f913973d106996a7
2019-10-08 08:45:06 -07:00
Pascal Hartig
04e12a28a0 Refactor PluginInstaller component
Summary:
- Made side-effecting elements injectable via props.
- Added default props so usage doesn't change.
- Added testing-library/react snapshot test that waits for test data to appear in the list.

One slightly annoying part here is that this now that we have an `autoHeight` prop which is only useful for testing it as it prevents a problem with a height-detection in the test runner. We could even change the default as it doesn't affect the display in prod, but this still feels slightly cleaner.

Reviewed By: jknoxville

Differential Revision: D17808510

fbshipit-source-id: 2ae70886c58282d5bdc98ba4215e8248e4c7f159
2019-10-08 08:45:06 -07:00
Pascal Hartig
3730c523ec Add explicit StubLogger option for tests
Summary:
A bit ugly to have test-only code in prod logic,
but we don't need any of the logger logic in tests
and by pulling out the `StubLogger`, we can avoid
loading Electron during tests.

Reviewed By: jknoxville

Differential Revision: D17808479

fbshipit-source-id: d2295d7bbca2f09c3f23389ad9443648757d8d03
2019-10-08 08:45:05 -07:00
Pascal Hartig
d86b8caa2d Add react testing library
Summary:
The existing rendering library doesn't work properly
with hooks. This one provides some pretty powerful
DOM-based testing APIs like waiting for elements to
appear and clicking, which we can use in various
areas.

Reviewed By: jknoxville

Differential Revision: D17787423

fbshipit-source-id: 9eb12f34ae2bc76b679fd28ee25262ce01a5e772
2019-10-08 08:45:05 -07:00
John Knox
13ac64e0b9 Sort icons
Summary: You can do this in VSCode by selecting the lines, Cmd-Shift-P, "Sort Lines Ascending".

Reviewed By: passy

Differential Revision: D17710137

fbshipit-source-id: 3cef628b24dd86d4e307bd30761049c30cbc8f68
2019-10-08 06:22:20 -07:00
s1rius
86eb24b02c Work with custom SharedPreferences implementation (#571)
Summary:
see https://github.com/facebook/flipper/issues/450
If we want to control a custom SharedPreferences, we can create a Class as SharedPreferencesDescriptor's Subclass, override the getSharedPreferences() function to return a custom SharedPreferences instance.

## Changelog
add getSharedPreferences() function in SharedPreferencesDescriptor Class
Pull Request resolved: https://github.com/facebook/flipper/pull/571

Test Plan: No

Reviewed By: jknoxville

Differential Revision: D17738675

Pulled By: passy

fbshipit-source-id: d227e7d6461194f7a01ae7b2ba53434dd71fc0d2
2019-10-08 01:51:21 -07:00
Pascal Hartig
8f719b17e3 Add instrumentation, fix typo
Summary:
- plugns -> plugins
- Report platform failures from second invocation.

Reviewed By: jknoxville

Differential Revision: D17787179

fbshipit-source-id: 041325f572dd839bd268612269f3774518a409b2
2019-10-08 00:23:29 -07:00
Pascal Hartig
4d1e7dc80f Add comment about error handling
Summary:
Added some notes to T55169042.

Also limited the acceptable result types.

Reviewed By: jknoxville

Differential Revision: D17787130

fbshipit-source-id: 19cefdde5ab195080281e9f2e26f5a236dd59629
2019-10-08 00:23:29 -07:00
Pascal Hartig
ca8df6d680 Remove "no file" error dialog
Summary:
This is a programming error, not something that users
should ever be exposed to. This logs an error instead
and just doesn't show anything.

The big benefit is that the component no longer
needs to deal with `file` potentially being undefined.

Reviewed By: jknoxville

Differential Revision: D17786913

fbshipit-source-id: 32a357381e64cd9237ad4a0112c346d7121634ef
2019-10-08 00:23:28 -07:00
Pascal Hartig
36abf6e38c Add tests for pending dialog
Summary:
The benefits of having things nicely encapsulated.
Not super sophisticated, but better than nothing.

Reviewed By: jknoxville

Differential Revision: D17786832

fbshipit-source-id: 0b321e8a4e56188b0eab86515bd777ed3e3e8cb7
2019-10-08 00:23:28 -07:00