Commit Graph

2596 Commits

Author SHA1 Message Date
Anton Nikolaev
c0f902f81a Upgrade to emotion v10
Summary: React 16 is not compatible with react-emotion 9 (it prints warnings, see also https://github.com/emotion-js/emotion/issues/644). So we should upgrade to 10.

Reviewed By: mweststrate

Differential Revision: D18905889

fbshipit-source-id: c00d2dbbadb1c08544632cb9bfcd63f2b1818a25
2019-12-11 09:43:24 -08:00
Pritesh Nandgaonkar
c3dfcbe601 Show the plugins from the redux store only belonging to the selected app
Summary: It fixes the bug, where currently we show all active persistent plugins for the export functionality irrespective of the fact that the plugin is active for the selected client. With this diff we will only show active persistent plugins for the selected client.

Reviewed By: mweststrate

Differential Revision: D18890247

fbshipit-source-id: e567da0ccf04e051ca0eabb497a6bd72cc8a0d76
2019-12-11 06:27:22 -08:00
Michel Weststrate
5429d1f235 Make it possible to generate regression tests for Flipper plugins
Summary:
This Pull request makes it possible to automatically generate regression tests for plugins. The idea here is to record all incoming states for a specific plugin, the start state of the plugin, and the enstate of the plugin.

By replaying the same events in a test, the same plugin should result in the same end state. This will make it easy to test regressions and refactorings on real life scenarios. Execution time is recorded as well.

The API's are exposed as

- `flipperStartPluginRecording()`
- `flipperStopPluginRecording()`

This process generates both a data snapshot and unit test.

Reviewed By: passy

Differential Revision: D18907455

fbshipit-source-id: 923f814f534ccfa6aa2ff2bfa2f80bee41a1c182
2019-12-11 05:53:22 -08:00
greenkeeper[bot]
99547168fc Update live-plugin-manager to the latest version � (#679)
Summary:
## The dependency [live-plugin-manager](https://github.com/davideicardi/live-plugin-manager) was updated from `0.13.2` to `0.14.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:** [davideicardi](https://www.npmjs.com/~davideicardi)
**License:** ISC

<details>
<summary>Release Notes for v0.14.0</summary>

<ul>
<li>compatibility with recent node versions</li>
</ul>
</details>

<details>
<summary>Commits</summary>
<p>The new version differs by 3 commits.</p>
<ul>
<li><a href="5fb7e8a1ed"><code>5fb7e8a</code></a> <code>0.14.0</code></li>
<li><a href="d141cbfd4d"><code>d141cbf</code></a> <code>fix: node v12 support+update dependencies</code></li>
<li><a href="62ff0ef291"><code>62ff0ef</code></a> <code>Enable esModuleInterop (https://github.com/facebook/flipper/issues/16)</code></li>
</ul>
<p>See the <a href="bda77f970a...5fb7e8a1ed">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/679

Reviewed By: mweststrate

Differential Revision: D18910892

Pulled By: passy

fbshipit-source-id: a7b7e3b1fed0c2ab3bc6dd6ba3b6b14c5cddd51c
2019-12-11 05:50:42 -08:00
greenkeeper[bot]
0febcd44ac chore(package): update uglify-js to version 3.7.2 (#690)
Summary:
Fix https://github.com/facebook/flipper/issues/682
Pull Request resolved: https://github.com/facebook/flipper/pull/690

Reviewed By: mweststrate

Differential Revision: D18929815

Pulled By: passy

fbshipit-source-id: 3e792b14e956702cd36d169dea0fc5048ed90322
2019-12-11 05:27:59 -08:00
Michel Weststrate
16b2addbc2 Enable null coalescing operator
Summary: Enable using the `??` operator in plugin code

Reviewed By: passy

Differential Revision: D18906291

fbshipit-source-id: b0a9b29ebb2896ede10540ba2e4cfd937fb99c7d
2019-12-11 03:46:48 -08:00
Michel Weststrate
382330bfaf Convert to TypeScript
Summary: Before looking into performance bottlenecks, I thought it wise to upgrade to TypeScript as that is where all plugins are heading

Reviewed By: jknoxville

Differential Revision: D18829689

fbshipit-source-id: 4c515f240d742f77e89f3cbdff500c69afb3ac06
2019-12-11 03:46:48 -08:00
Pritesh Nandgaonkar
938f9542ee Fix the issue where perf events were not getting logged
Summary: I noticed a bug where the export data perf events were not logged. The issue was that, it used the `Logger.getTrackTimeSince` method which used the `performance` from `perf-hooks` and not an ordinary performance object available in the global scope. So just importing performance from perf-hooks solved the issue.

Reviewed By: mweststrate

Differential Revision: D18887666

fbshipit-source-id: 66c24f47b95b25d2f3703c16c70cbe8b35fe0ec3
2019-12-10 08:21:28 -08:00
Pritesh Nandgaonkar
41a5fa2ba0 Use cached artefacts for iOS travis tests (#685)
Summary:
Updates travis iOS tests to use already built artefacts by not clean building it.
## Changelog
Pull Request resolved: https://github.com/facebook/flipper/pull/685

Test Plan: Travis Tests

Reviewed By: passy, mweststrate

Differential Revision: D18890270

Pulled By: priteshrnandgaonkar

fbshipit-source-id: 0b686b82e8418d1135667321d8e4580e4e3fc4fc
2019-12-10 07:45:42 -08:00
Nicolas Charpentier
201203ab84 Refresh Getting Started with the latest React Native integration (#676)
Summary:
Sync the Getting Started section about React Native integration with the latest changes in https://github.com/facebook/react-native/pull/27426.

## Changelog

Refresh Getting Started with the latest React Native integration
Pull Request resolved: https://github.com/facebook/flipper/pull/676

Test Plan: Tested in RN's template.

Reviewed By: mweststrate

Differential Revision: D18853584

Pulled By: passy

fbshipit-source-id: d001046106743b68d2f08b084c7618d8f768dea1
2019-12-10 06:07:03 -08:00
Mateo Silguero
c4730c3e49 Parse all values on json fields (#678)
Summary:
I want to get a better visualisation of the databases values from a device, like the localStorage from ReactNative.

## Changelog

Iterate on the object value to parse all values from a json
Pull Request resolved: https://github.com/facebook/flipper/pull/678

Test Plan:
before:
<img width="1185" alt="Captura de Pantalla 2019-12-06 a la(s) 19 57 13" src="https://user-images.githubusercontent.com/25598400/70362212-e4a37280-1862-11ea-8b8b-a96edfece5c9.png">

after:
<img width="1185" alt="Captura de Pantalla 2019-12-06 a la(s) 19 55 52" src="https://user-images.githubusercontent.com/25598400/70362211-e4a37280-1862-11ea-8d16-00691c0f21c4.png">

Reviewed By: nikoant

Differential Revision: D18874887

Pulled By: passy

fbshipit-source-id: 679519fe2746a698e41ba015fd811a342c96c4fd
2019-12-10 06:04:19 -08:00
Anton Nikolaev
f9c89c09ae Null ref exception during build on Windows VM
Summary: https://pxl.cl/STmd

Reviewed By: passy

Differential Revision: D18883703

fbshipit-source-id: ff4ee954ee253d46683f162f26c0de734c6acbb3
2019-12-09 10:01:32 -08:00
Pritesh Nandgaonkar
0c13943139 Allow user to copy the row attributes in the layour inspector
Summary: Allows user to copy the row attributes.

Reviewed By: passy

Differential Revision: D18811929

fbshipit-source-id: 62335a7c0b5f1557704c0d8d9ea258b4c7cbfdcf
2019-12-09 05:10:06 -08:00
Pascal Hartig
3696697c6b Increase xcodebuild timeout (#684)
Summary:
Until we have a better solution
Pull Request resolved: https://github.com/facebook/flipper/pull/684

Reviewed By: nikoant

Differential Revision: D18881940

Pulled By: passy

fbshipit-source-id: 44960f6602da8e50c5c9cb4fc35e5009fb21e9d5
2019-12-09 05:01:17 -08:00
Pascal Hartig
b4b70ef02b Fix yarn reset
Summary:
Reordering the commands to work now that we have `rifraf` as part of the
execution.

Reviewed By: cekkaewnumchai

Differential Revision: D18882603

fbshipit-source-id: 099c5801a0d4e165b69e42785df2667946fe0620
2019-12-09 04:59:33 -08:00
Pascal Hartig
008a003a4d Add tests for healthchecks reducer
Summary:
Quite a bit of complex slicing going on there, so I think
this is quite useful to guard against future breakages.

Reviewed By: jknoxville

Differential Revision: D18853033

fbshipit-source-id: 36b17b8ce208cb320a193bceed86c89e010107e4
2019-12-06 08:00:53 -08:00
greenkeeper[bot]
83c3cf3688 Greenkeeper/@types/react 16.9.14
Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/672

Reviewed By: jknoxville

Differential Revision: D18834245

Pulled By: passy

fbshipit-source-id: 352561d95c9489df6b675910a4c64548d93b4f30
2019-12-06 07:47:26 -08:00
John Knox
8e0a4a5e42 Fix clicking on native notification
Reviewed By: passy

Differential Revision: D18831700

fbshipit-source-id: 4cdaed3893fc6162a16ac2c1a8a9ee2ef1a0805c
2019-12-06 07:27:35 -08:00
Pascal Hartig
0c7b03cad3 Add tests for settings reducer
Summary: yiss_tests

Reviewed By: jknoxville

Differential Revision: D18851134

fbshipit-source-id: 53ffb9b516773df19c258e7d819962e3cd523751
2019-12-06 06:32:20 -08:00
Pascal Hartig
425d4b9024 Greenkeeper/eslint plugin relay 1.4.1 (#674)
Summary:
Fix https://github.com/facebook/flipper/issues/654
Pull Request resolved: https://github.com/facebook/flipper/pull/674

Reviewed By: jknoxville

Differential Revision: D18851150

Pulled By: passy

fbshipit-source-id: 6a9125c6dad047af9a0605167ecfe83d978a2a48
2019-12-06 06:29:42 -08:00
John Knox
c2370f7faf Speed up re-connect after re-opening app
Summary:
The problem is that whenever an app is shutdown, and then reopened, the flipper dir gets reset when getting the CSR for connecting to flipper.
This causes the first connection attempt to fail always, and it goes through the whole cert exchange, taking longer than necessary.

Fixes it by loading the csr from disk if it's not loaded yet, without blowing away the whole certs state.

A side effect of this would be that as long as some file exists where the csr lives, flipper state would never get reset, so it wouldn't be able to fix itself automatically anymore. To keep that working, I've made `resetFlipperDir()` public and am calling it explicitly when starting certificate exchange. This should ensure that we still reset when we need to, but not unnecessarily.

The reason it went wrong is that getCSR used to be called only at cert exchange, when resetting and generating a new one was always desirable. However, when we shipped the fix for changeable android serials, it started to be used as a normal getter.

Reviewed By: timur-valiev

Differential Revision: D18834806

fbshipit-source-id: 56ca7e03e1aa9011f836bc9c021cf3048f7dc1e4
2019-12-06 05:29:22 -08:00
Pascal Hartig
cde949e3a1 Fix double-parsing of process config
Summary: This had been there for way too long.

Reviewed By: mweststrate

Differential Revision: D18834089

fbshipit-source-id: 563aa04876910a7544a7f62865b146b933dbf570
2019-12-06 03:50:32 -08:00
John Knox
1a389202ca Change client to not produce plugin keys manually
Summary: I **think** this is the last part of the codebase doing manipulation of strings to produce plugin keys etc.

Reviewed By: passy

Differential Revision: D18831990

fbshipit-source-id: db449d78230adbca66e78f041381a34d9b249a45
2019-12-05 11:45:37 -08:00
Michel Weststrate
7f916f8a7b Gather plugin stats to improve performance
Summary: This diff makes it possible to gather stats of plugin usage, and print them from the console by issuing `window.flipperPrintPluginBackgroundStats()`.

Reviewed By: jknoxville

Differential Revision: D18811590

fbshipit-source-id: 4219923f7fd90187c7ec50a9aa68d7b817e3db8f
2019-12-05 09:30:33 -08:00
John Knox
0bf905e02f Replace all manual pluginKey parsing with a utility
Summary:
Ok this diff got a bit bigger than expected, but I think it makes it easier to understand what "plugin keys" are, and makes them less prone to error.

Previously pluginKeys were composed of: clientId#pluginName, where clientId was itself: app#os#device#device_id

But also, there were some plugin keys where the clientId was a device_id.

Now you deconstruct a plugin key, and will get a tagged object with type: 'device' or 'client', and the properties that they each have.

There is now no custom parsing of these afaik, let's keep it that way.

Since it took me a while to figure out what all these IDs are, I've documented it a bit in clientUtils.

Reviewed By: passy

Differential Revision: D18811848

fbshipit-source-id: eed2e2b5eedafb9e27900dbcf79a389fcaffae95
2019-12-05 07:37:57 -08:00
Pascal Hartig
2a1e939a0b Greenkeeper/eslint 6.7.0 (#671)
Summary:
Checking if this still causes problems.
Pull Request resolved: https://github.com/facebook/flipper/pull/671

Reviewed By: mweststrate

Differential Revision: D18829501

Pulled By: passy

fbshipit-source-id: 3805533ac637e34818a59ce182c694468c5a9d10
2019-12-05 07:17:33 -08:00
John Knox
d73551a440 Add artificial crash button to sample app
Summary: Lets you test the crash reporter more easily

Reviewed By: passy

Differential Revision: D18830402

fbshipit-source-id: fca57a05f121ca4219aaaf4e2b8bfeca9b46a4a9
2019-12-05 06:45:33 -08:00
Anton Nikolaev
006003ae6b Add tests for client-id / app name parsing
Summary: Add tests for client-id / app name parsing. We've had a lot of bugs here in the past. Get some good test coverage so we have some assurance the shared utils for it won't be broken.

Reviewed By: jknoxville

Differential Revision: D18830269

fbshipit-source-id: 07c9755bbeae28c48580f44453d4010d6d3830b0
2019-12-05 06:30:04 -08:00
Chaiwat Ekkaewnumchai
94ce34066b Fix Log-in Outside Lighthouse Crash The App
Summary:
The `error` was not recognized as a string and React was not happy about it.

Change the `error` to a string explicitly. Also, add space between the error and the form box.

Reviewed By: jknoxville

Differential Revision: D18829862

fbshipit-source-id: 0474d411a95bab4bc4f62a3f3d3839029938a9e6
2019-12-05 05:46:17 -08:00
John Knox
186af77f62 Add error logging to client Id construction
Summary: Just in case anything is broken, this will be helpful

Reviewed By: nikoant

Differential Revision: D18811849

fbshipit-source-id: 53947102dea38e526b4f565396f85fedf4ff2a15
2019-12-05 05:42:58 -08:00
Chaiwat Ekkaewnumchai
d4acdf8504 Delete Notification Plugin Code
Summary: Delete dead code as we change to static view

Reviewed By: passy

Differential Revision: D18810148

fbshipit-source-id: 17b5a2355abb39a711a95b4ffcd0bcd387259787
2019-12-05 03:26:28 -08:00
Chaiwat Ekkaewnumchai
07487e8122 Change NotificationsHub to StaticView
Summary:
- Point the Noitifications to the static view
- Add function to check activeness of static view
- Add `SupportRequestDetails` to type (needed?)

Reviewed By: mweststrate

Differential Revision: D18810149

fbshipit-source-id: a33f61f521f3db0dd2a73e56d99b12d029b46a57
2019-12-05 03:26:28 -08:00
Pascal Hartig
8df91d198f Codemod deprecated React APIs
Summary: Performed with `react-codemod rename-unsafe-lifecycles`. I'll taskify the components next. This change means that things will still work with React 17 but only if we opt-out from "strict mode".

Reviewed By: mweststrate

Differential Revision: D18810459

fbshipit-source-id: 6954f4e7bb91dbd7fc8b839895308fc193cc4aa0
2019-12-04 10:12:23 -08:00
John Knox
c95ecf6b3e Unifying use of clientID utils
Summary:
Fixes a couple of typo's and merges two very similar functions into one.
Now that there's a single way to create a clientID, we can get more strict about what it is and what it isn't.

Reviewed By: passy

Differential Revision: D18809741

fbshipit-source-id: 9a68e45bead38cc2917a6d4cd2cf461c309f3ede
2019-12-04 08:40:09 -08:00
Pritesh Nandgaonkar
e1e2978b19 Add copy cell option in network plugin
Summary: Puts a context menu in the sidebar for the network plugin. Before, user was not able to select the text from sidebar

Reviewed By: passy

Differential Revision: D18808544

fbshipit-source-id: bdbc86972cd1d508e9b7d96da9df5c8e53bec991
2019-12-04 08:12:05 -08:00
Matt Galloway
d37c64c329 Flipper | Fix potential for deadlock when stopping Flipper
Summary:
There was an interesting problem in Flipper which I encountered. On closing our app we would deadlock. This was happening when joining the Flipper thread.

Upon investigation I found that it happened only when Flipper was not connected to the app. And digging in I found that it's because we are continually trying to connect the `FlipperClient` to the Flipper app when there is no connection. This works great, but it continues even if you have asked Flipper to terminate. So this meant that the `EventBase` never gets chance to shutdown, as it keeps getting new work to do.

The fix is to add a flag to `FlipperConnectionManagerImpl` to say if the conection is started or not. Then, if it's not started and we get a request to retry connection, then we will fail it.

Reviewed By: jknoxville

Differential Revision: D18780622

fbshipit-source-id: cce82cbb5c54e6d92ea16644c8a247bd2578ae26
2019-12-04 07:33:10 -08:00
John Knox
15e1b25098 Centralize clientId creation
Summary: One step towards getting away from constructing and destructing clientIds manually everywhere by splitting and joining #'s. Which has been VERY error prone in the past.

Reviewed By: passy

Differential Revision: D18809442

fbshipit-source-id: bd4d89d3eb3d59694aa735b19dbd73d122e59ba0
2019-12-04 07:18:13 -08:00
John Knox
ab5892c60e Fix initial window focus bug
Summary:
When launching flipper release build, the initial window focus was wrong, so it appeared unfocussed.
Clicking away and then back to the window would fix it.

This should set the initial focus to be correct from the start.

Task has more details.

Reviewed By: mweststrate

Differential Revision: D18808306

fbshipit-source-id: 2c5828d0b3298594dc30f956bb14141e6cff5918
2019-12-04 06:51:53 -08:00
Anton Nikolaev
26632890d6 Network trace search not working for response body
Summary: This diff fixes the issue with occasionally not workin search by response body in Network plugin

Reviewed By: mweststrate

Differential Revision: D18784394

fbshipit-source-id: 5927919d919625e214fddd1a8b32522694b714ec
2019-12-04 05:33:06 -08:00
greenkeeper[bot]
d9f17d9a51 Update flow-bin to the latest version � (#670)
Summary:
## The devDependency [flow-bin](https://github.com/flowtype/flow-bin) was updated from `0.112.0` to `0.113.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:** [gkz](https://www.npmjs.com/~gkz)
**License:** MIT

[Find out more about this release](https://github.com/flowtype/flow-bin).

 ---

<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/670

Reviewed By: jknoxville

Differential Revision: D18808209

Pulled By: passy

fbshipit-source-id: 8c51437d1dfbadd0c07d7f96d510dd5dc1ca868f
2019-12-04 05:12:06 -08:00
Pascal Hartig
ffd21e2387 Make build scripts work on windows
Summary: There's no rm on Windows.

Reviewed By: nikoant

Differential Revision: D18808178

fbshipit-source-id: 0449617dd15db4a00787d1c1a99429b81a31ffa5
2019-12-04 04:45:23 -08:00
Pritesh Nandgaonkar
971fa32392 Flipper Bump: v0.30.1-SNAPSHOT
Summary: Sanpshot

Reviewed By: mweststrate

Differential Revision: D18807900

fbshipit-source-id: a3719eb2196efe5fb4299d70d1adfa9d024e04f7
2019-12-04 04:03:47 -08:00
Pritesh Nandgaonkar
b9ed6022f9 Flipper Release: v0.30.0
Summary:
## Changelog

- Release of the redesigned Support Form

Reviewed By: mweststrate

Differential Revision: D18807901

fbshipit-source-id: 7a8b0775480d9acb6152e9e84425da8256b09964
2019-12-04 04:03:46 -08:00
Michel Weststrate
5d124e2764 Always use new support form
Summary: See D18783129, we now want to always link to the new form

Reviewed By: passy

Differential Revision: D18807766

fbshipit-source-id: 2389470b12dc36159cab5d61dbb67dfb56c2408f
2019-12-04 04:01:46 -08:00
Pascal Hartig
199e7e3268 Pin "secure" version of ws
Summary:
This is causing our OSS requirements to fail because
the dependency resolution causes ws 1.x to be pulled in,
which has a security vuln. Not in any exploitable code paths
for us, ruining a perfectly good otherwise green checkmark.

Reviewed By: jknoxville

Differential Revision: D18807775

fbshipit-source-id: e2391d957183ba25ec8ad02854c4e821ec8dc3aa
2019-12-04 03:59:21 -08:00
Michel Weststrate
c16625c278 Add explanation banner
Summary: Add a quick banner to give some more context on the bug report feature

Reviewed By: jknoxville

Differential Revision: D18807556

fbshipit-source-id: b2de614ccfd30a22f418b60d6f08066c57759deb
2019-12-04 02:55:39 -08:00
Michel Weststrate
1c4addd736 Fix: Litho support form links to the old support form
Summary: See title

Reviewed By: jknoxville

Differential Revision: D18807448

fbshipit-source-id: 7167d18953440377ee739cf0db03a8fb600112a9
2019-12-04 02:55:39 -08:00
Michel Weststrate
5c680ff325 Fix alignment of uploading progress and overflow of video preview
Summary: Nuf said

Reviewed By: jknoxville

Differential Revision: D18782822

fbshipit-source-id: b17723694e8528408b77f27467132bf83695a84a
2019-12-04 02:55:38 -08:00
Michel Weststrate
3dbc9acf54 Make sure first client is selected when importing traces
Summary: When importing a flipper trace, while the user was on a static view, the first client would not be selected automatically

Reviewed By: passy

Differential Revision: D18782482

fbshipit-source-id: 6f59e06dead62ffe42acdd36232b92dffd3e30d6
2019-12-04 02:55:38 -08:00
Pritesh Nandgaonkar
d12733f3fd Remove old support form GK
Summary: Removes old GK of the flipper support form

Reviewed By: passy

Differential Revision: D18783129

fbshipit-source-id: dcb55abf4af863e25273648e0482c00e3d16e322
2019-12-03 10:49:15 -08:00