Commit Graph

3269 Commits

Author SHA1 Message Date
Michel Weststrate
82e65c68dc Make sure plugin name selections are displayed consistently with sidebar, [Flipper] Make sure plugins have the same name everywhere
Summary:
Not all plugin names are created equal in flipper. For example, plugins would bear different names in the sidebar and in the plugin selection when making a support request / flipper trace. Fixed this and also introduced a `getPluginTitle` utility that produces this name consistently.

Plugin listview now also sort their items consitently with the sidebar.

Probably also fixed an error in the flipper export screen, where a correct TS error was supressed.

Reviewed By: jknoxville

Differential Revision: D19499404

fbshipit-source-id: c5b23a170d41d96799eb7899e249f70778717d45
2020-01-27 07:22:32 -08:00
Anton Nikolaev
edd0e01a08 Added another missing icon
Summary: Just commiting another icon added by the script

Reviewed By: jknoxville

Differential Revision: D19578661

fbshipit-source-id: 9da953cec30d6ac1ea68312c060a8ce4c298fac0
2020-01-27 07:08:41 -08:00
Anton Nikolaev
68510b53bf Debugging in VSCode
Summary:
This diff enables debugging in VSCode. Debugging works for both Flipper core and plugin code. To start debugging:
1. yarn start
2. Go to "Debug and Run" tab in VSCode, select task "Attach to Running Renderer" and launch it (or just press F5).
{F227135377}
3. Debugger will be attached and all the breakpoints set in VSCode will be hit.

Reviewed By: passy

Differential Revision: D19578566

fbshipit-source-id: 609766471ad196a2ee8d4086ddb84b7af4ef05ef
2020-01-27 06:14:46 -08:00
Angus Holder
ac8bd8638a Enable using Ctrl+Return to execute a query in the database plugin (#761)
Summary:
Having a key shortcut to execute the query you're typing helps to speed up the edit-run cycle.

## Changelog

In the database SQL execution tab, you can now execute queries with Ctrl+Return instead of pressing the 'Execute' button.
Pull Request resolved: https://github.com/facebook/flipper/pull/761

Test Plan:
I typed a query into the textarea, and while it was focussed, press Ctrl+Return, and the query executed.

Mousing over the 'Execute' button displays a tooltip informing you of this keyboard shortcut.

![image](https://user-images.githubusercontent.com/7407345/73128700-31860880-3fcb-11ea-9a7c-28a55b46a151.png)

Reviewed By: mweststrate

Differential Revision: D19578527

Pulled By: passy

fbshipit-source-id: be131e44e293caa578d48e324fc43b457edb1e4e
2020-01-27 06:07:57 -08:00
Michel Weststrate
434d75f362 Always process messages for navigation plugin
Summary: For the navigation plugin we want to opt-out from the "enabled" and "process messages later" optimizations, because it's events should be immediately processed to reflect the changes in the topbar for navigation purposes

Reviewed By: jknoxville

Differential Revision: D19554297

fbshipit-source-id: 4bd49b5d1327feea6dea52e86d9dbc9d54a5dbee
2020-01-27 04:04:20 -08:00
Michel Weststrate
cedb9617c4 Fixed issue where the location bar wouldn't be updated if there are multiple connected clients
Summary: The location bar doesn't update if there are multiple connected client, if the client we are interested wasn't the first one. The cause of that is that the location bar picked the state of the *first* navigation plugin found, rather than the navigation plugin connected to the selected device and client

Reviewed By: jknoxville

Differential Revision: D19554293

fbshipit-source-id: 46f2a66aa6ba07b510f1f615943eeb6ef8d52622
2020-01-27 04:04:20 -08:00
Michel Weststrate
e9ff9addc6 Fixed broken navigation plugin
Summary: The navigation plugin threw exceptions, as the defaultPersisted state was not mixed into the already stored state, making some fields unreadable

Reviewed By: jknoxville

Differential Revision: D19554291

fbshipit-source-id: 57f045aa1eae10682e44d479b9aecb51f0391b9e
2020-01-27 04:04:20 -08:00
Michel Weststrate
23625f7a89 Change star concept to enabled
Summary:
The 'starring' concept of plugins no longer covers the meaning of 'starring', as unstarred plugins will no longer receive data from background plugins, not be available in support request forms due to a lack of data etc. So this diff renames the feature to 'enabled'.

Also fixed an issue where selecting a non-enabled plugin wouldn't show it in the sidebar if the additional plugins are collapsed.

To make disabled plugins more clear, they are . now always rendered in gray.

The toggle button now delays its effect for better visual feedback

- [x] update side bar styling
- [x] remove bottom bar warning
- [x] details screen
- [ ] only open connection for active plugins (will be done in a next diff)
- [x] check archived / imported devices
- [x] make sure device plugins work correctly
- [x] check without GK's

Reviewed By: jknoxville

Differential Revision: D19470326

fbshipit-source-id: 9160a3434287561f56b1b741d5ba282ab6063ea8
2020-01-27 04:04:19 -08:00
Pascal Hartig
604511715b Add missing copyright headers
Summary: Failing OSS requirements right now.

Reviewed By: nikoant

Differential Revision: D19557540

fbshipit-source-id: 18d0d68816e70492802f41472e15e1ed0cf35e31
2020-01-24 09:03:45 -08:00
John Knox
f773e97c5d cache another icon
Summary: Auto added by yarn start

Reviewed By: mweststrate

Differential Revision: D19554338

fbshipit-source-id: 48fe70f20ddefae9d8ea453b157ffbc11ec20601
2020-01-24 07:08:44 -08:00
Pascal Hartig
3d66df2d86 Cleanup 4/4
Summary: I think that's it. Some more minor changes and removing an unused BUCK file.

Reviewed By: mweststrate

Differential Revision: D19471282

fbshipit-source-id: ceb85111f03a41141dca0bdd445cda12dfbac1c4
2020-01-24 07:00:15 -08:00
Pascal Hartig
2ec539acb1 Cleanup 3/n
Summary: Same treatment for FlipperReactNativeJavaScriptPlugin.

Reviewed By: mweststrate

Differential Revision: D19471257

fbshipit-source-id: b51d92074ae411c089f0010057f2b61ef6500de0
2020-01-24 07:00:15 -08:00
Pascal Hartig
4e77b37831 Cleanup 2/n
Summary:
Some more minor cleanups that don't (well, barely) affect
semantics.

- Fix singleton management in multi-threaded environments.
- Remove double assignment.
- Make all things final where they can be.
- Use ugly Hungarian notation.
- Weaken some types.

Reviewed By: mweststrate

Differential Revision: D19471227

fbshipit-source-id: 18833c3fe940f51b8d4cb3948a63387b8cd9316c
2020-01-24 07:00:14 -08:00
Carmi Grushko
cbb8d97d86 Apply word-wrap:break-word; to detail values
Reviewed By: timur-valiev

Differential Revision: D19554394

fbshipit-source-id: c513c10c77420e74e8f8361440d4753bfc889248
2020-01-24 06:46:38 -08:00
Pascal Hartig
6864556912 Cleanup 1/n
Summary:
Making some changes to make this more idiomatic and abide by
the Flipper/FB standards. This one just removes some unused
variables and annotations.

Reviewed By: jknoxville

Differential Revision: D19470676

fbshipit-source-id: 4beb516f00228b1d33e4e1b42d9bc4f8c29af565
2020-01-24 05:02:07 -08:00
Pascal Hartig
0812568be1 Remove BUCK files
Summary: We won't use them so this is just dead weight that's going to break at some point.

Reviewed By: jknoxville

Differential Revision: D19470548

fbshipit-source-id: 3def22e6f5db2923d5551d7b6a3472cb4364186c
2020-01-24 05:02:06 -08:00
Anton Nikolaev
aab004aa15 Allow disabling iOS development in Settings
Summary:
Currently Android development can be disabled in Settings, but iOS development not. Because of this Doctor always shows warnings to Android-only developers who has no iOS SDK installed. This change makes it possible to disable "iOS development" option in the same way as we already had for Android.

Additionally I changed Doctor warning to show more specific message if only iOS or only Android checks are failed with suggestion to disable the failing platform if it is not required.

Reviewed By: jknoxville

Differential Revision: D19538070

fbshipit-source-id: 234d2c6cf21083f9d6aebd63418aed7f9a78e922
2020-01-23 13:37:03 -08:00
Anton Nikolaev
b625efee3d Doctor complains Android SDK is not installed
Summary:
There are complaints about Android SDK being reported as "not installed" when it is actually installed. To address them, I changed the way how we detect SDK and also added some minimal actionable feedback for each check.

The problem with the previous implementation of Android SDK check via "envinfo" is that the library uses "sdkmanager" tool under the hood, and this tool doesn't work on Java 9+. To fix this I'm changing the way how we assume SDK is installed to simple check for "adb" tool existence.

Actionable feedback is shown on Doctor report when you click to an item.

Reviewed By: jknoxville

Differential Revision: D19517769

fbshipit-source-id: 1c21f1bdcd05c7c0ae3f97b9c3454efa2c861d26
2020-01-23 13:37:02 -08:00
Pritesh Nandgaonkar
f61d578b26 Show tooltip when no plugins are selected
Summary: Shows tooltip when no plugins are selected. Before it used to select all the plugins

Reviewed By: jknoxville

Differential Revision: D19537054

fbshipit-source-id: 567b90f981a2a2ddcf68a1dce902db0a9d6214d2
2020-01-23 10:05:04 -08:00
Michel Weststrate
dc60d33b3a Make sure device plugins show up even when loaded after creating devices
Summary: The device.devicePlugins collection was not updated if new plugins were registered after creating a device. This diff fixes that.

Reviewed By: jknoxville

Differential Revision: D19536777

fbshipit-source-id: 11ed3c3383ae692ce74fd7a21704332fb319b9c4
2020-01-23 08:37:33 -08:00
Pritesh Nandgaonkar
032b594221 Refactor Listview to solve a bug
Summary:
There was a bug in ListView where the selected items where not getting updated.

Bug

In the following video I have selected Inspector and logs plugin from export drop down. When I click on litho support form it should select the default plugins which is Inspector, Mobile Config and Logs. But it only shows Inspector and Logs selected

{F226900949}

To fix it:

I call the callback `onChange` when the listview's row get updated, which will updates the props of the ListView component and hence rerendering it with updated selected rows.

Reviewed By: mweststrate

Differential Revision: D19518762

fbshipit-source-id: 39367590cbdc1d6f88afb467b17b71e13703bde3
2020-01-23 07:40:20 -08:00
Michel Weststrate
426d17b08d Update docs for JS only plugins
Summary: Added docs on how to write React-Native JavaScript based plugins

Reviewed By: passy

Differential Revision: D19344803

fbshipit-source-id: ad1ea66f1031760729fdaea8a7e6c1ef5dcd5439
2020-01-23 07:11:31 -08:00
Michel Weststrate
e306aeb010 Don't die when flipper isn't initialized and a plugin is used
Summary: This diff makes sure that the app doesn't die, or dies in a meaningful way if things are misconfigured.

Reviewed By: passy

Differential Revision: D19468273

fbshipit-source-id: 2471c263391906113446af57d795d1199eb1730e
2020-01-23 07:11:30 -08:00
Michel Weststrate
0fa0899299 Create React Native example project
Summary:
This diff creates a sample React Native project (based on the 0.62-rc.0 template).

This example is created like:
(Documenting this here as in the future this might be easier than upgrading the project itself)

1. Run `npx react-native init ReactNativeFlipperExample --version 0.62.0-rc.0`
2. Follow the installation steps to enable Flipper, that is, call `initializeFlipper(this, getReactNativeHost().getReactInstanceManager());` at the end of the `onCreate` method in `MainApplication.java`
3. Put `FlipperTicTacToe` in the root of the project, and call it from `App.js` as a component
4. install `react-native-flipper` as dependency
5. install `relative-deps` as dev dependency, and set it up as shown in `package.json`. This tool make sure that we build and test this project against the version of react-native-flipper in this repository, rather than against the one on NPM.
6. removed some stuff, like tests and linting, which is just in the way in this repo

This PR does not support iOS, as Flipper + RN iOS is still broken in 0.62.0-rc.0, and the current version of react-native-flipper doesn't support iOS yet either.

Documentation on how to set up Flipper in general is not part of this Diff

_N.B. since this is a **public** project, to be visible and runnable by our OSS community, the build setup is kept plain, vanilla, react-native, and **not** wired up to our normal / internal build processes. This is also the reason that lint suggestions beyond the license headers have been ignored. If any others should be applied, it is probably the official react native template that requires updating_

Reviewed By: passy

Differential Revision: D19449295

fbshipit-source-id: 2aeb6044f8dd01f09a95350c84fff2419d685a65
2020-01-23 04:47:52 -08:00
Michel Weststrate
a9f2b67874 Fix background plugin stats
Summary: Discovered that all gathered plugin stats where empty due to mis-using Object.entries. Fixed that. Also added a accumulated cpuTime metric, which should be great for a uniform trend line.

Reviewed By: jknoxville

Differential Revision: D19517279

fbshipit-source-id: a6df83eea000a5d59fe692a3795fd58ae6457821
2020-01-23 02:04:06 -08:00
Pritesh Nandgaonkar
d31ea742f5 Fix broken URL export
Summary:
Fixes broken export through URL.
Also fixes an issue where we suppress an exception

Reviewed By: mweststrate

Differential Revision: D19517066

fbshipit-source-id: c68b6a1bcbc8b0588e0db9032268033a42b43c61
2020-01-22 10:07:59 -08:00
John Knox
5a19004732 Only show outdated SDK warning for android devices
Summary: This exists to warn people about an incompatibility with old android sdk's, there's no need for the warning on other OS's even if the sdk is old.

Reviewed By: mweststrate

Differential Revision: D19499587

fbshipit-source-id: 5468fffcc0265bb122cf149f49b9af86ddd3c84e
2020-01-22 07:49:48 -08:00
John Knox
e47f6a4ebe Remove duplicated "total" time logging
Summary: This is useless as it's logged as key: total anyway.

Reviewed By: mweststrate

Differential Revision: D19501099

fbshipit-source-id: 08dcf76fbab8065356b34c6ed1524ef83703c46c
2020-01-22 07:46:58 -08:00
John Knox
06218b13f8 Remove NEW_CLIENT_SANITY_CHECK
Summary: This isn't needed anymore as it's taken care of by the Client class when it fails to find it's own matching device.

Reviewed By: mweststrate

Differential Revision: D19499929

fbshipit-source-id: e54dea6e680a9fa3cd3572cdd65434922d51c4ea
2020-01-22 07:46:58 -08:00
Michel Weststrate
a3a3db5363 Improve stats collection for plugins in the background
Summary:
This diff improves two things:
1. Stats are now gathered on every `trackUsage` tick, rather than only when there is a selection
2. The stats now include a delta to compare it with the previous tick

Reviewed By: passy

Differential Revision: D19514231

fbshipit-source-id: 1854c1dc03c63a03db8c7040c185d2629e1b9ea2
2020-01-22 07:10:52 -08:00
Chun-Ho Ng
c8b9dd949b Fix Opening FB4A Database Plugin
Summary:
The FB4A SQLite database plugin has to be opened 4-5 times before it shows a list of databases. This is because some databases are encrypted and can't be opened. In this case the code throws and exception and we do not catch that, causing the whole load process to crash.

Now catching the exception and returning an empty list.

Reviewed By: jknoxville

Differential Revision: D19463876

fbshipit-source-id: af8c9a70dc2761e62088d90ce89f8d16057e8745
2020-01-21 15:58:29 -08:00
Anton Nikolaev
7c03366136 Setitngs: button to reset Android SDK path to default
Summary: Added button to reset Android SDK path to default + fixed default SDK path on Windows which I introduced in a previous diff and which before might be wrongly resolved to roaming data instead of local data folder

Reviewed By: jknoxville

Differential Revision: D19498899

fbshipit-source-id: e10865b528f55ea6b56873bdf9369c4b60dca89f
2020-01-21 10:28:38 -08:00
Timur Valiev
4f63d6435f JS app launcher ui bugfix
Summary: JS App launcher wasn't appearing when no android emulators are installed

Reviewed By: nikoant

Differential Revision: D19499107

fbshipit-source-id: d062d4781747b77b708306b592ea66a1a67b93e4
2020-01-21 09:03:35 -08:00
Mateo Silguero
b0caaa7254 persist favorites queries at localStorage. show parsed values from databases. (#738)
Summary:
on databases section, queries marked as "favorite", are not persisted. With this changes,  they will be saved at localStorage and persist from refresh.

Improves on parse json values from databases.

## Changelog
Pull Request resolved: https://github.com/facebook/flipper/pull/738

Reviewed By: mweststrate

Differential Revision: D19330218

Pulled By: passy

fbshipit-source-id: 673b2d0bbee9b3ef4544defaca0e3c5547a992a2
2020-01-21 08:37:53 -08:00
Hugo Cuvillier
7047354f94 Removal of unused protocol CKRenderWithChildrenComponentProtocol
Summary: Ditto

Reviewed By: kfirapps

Differential Revision: D19496643

fbshipit-source-id: ab6777acb68122f2395919a5afbb30a1ccfafe06
2020-01-21 08:26:19 -08:00
Anton Nikolaev
e178221f44 Default path to Android SDK is wrong on Windows
Summary:
Default path for Android SDK was set to "/opt/android_sdk" disregard the current OS.
On Windows it should be set to "%localappdata%\android\sdk" instead.

Reviewed By: passy

Differential Revision: D19496646

fbshipit-source-id: 86ce7df74b98eef5b7b0a556a5359bec8cb0dbc4
2020-01-21 08:04:50 -08:00
Anton Nikolaev
35d62e70cb Analytics: log both shown and suppressed warnings
Summary: A small enhancement for the Doctor usage report

Reviewed By: passy

Differential Revision: D19496887

fbshipit-source-id: 1f0efb0eb29e2efce60ba4fca3bd6fdc062406ea
2020-01-21 06:41:47 -08:00
Michel Weststrate
94e2230583 Animated chevrons in sidebar
Summary: Sidebar collapsing finally feels right! Also made the sidebar a little bit less cramped by widening it.

Reviewed By: passy

Differential Revision: D19496743

fbshipit-source-id: 8dd93afc8ef542781b1c1598623d1c9cef9b6b66
2020-01-21 06:29:41 -08:00
Michel Weststrate
02e02338e8 Fix Mac plugins not showing up
Summary:
Fixed a bunch of issue in the new sidebar navigation
1) Stop filtering out the host device (collapse it by default instead)
2) Show offline status in title for more clarity
3) Stop sorting devices by name, so that they are sorted in connection order, which feels more consistent
4) Group uninitialised clients together, rather than showing them under every device
5) Rename "device" section to "device plugins", and hide it if there are none
6) some minor margin fixes

Reviewed By: jknoxville

Differential Revision: D19495950

fbshipit-source-id: 513d0a1171016bd3077641f614a6554a132f8180
2020-01-21 04:54:25 -08:00
Anton Nikolaev
0f5556dcf0 Flipper Bump: v0.30.3-SNAPSHOT
Reviewed By: jknoxville

Differential Revision: D19494144

fbshipit-source-id: f4cc98afb0ce10fc65f508dd8a11cf408f01e027
2020-01-21 04:30:33 -08:00
Anton Nikolaev
4d91f6eb60 Flipper Release: v0.30.2
Reviewed By: passy

Differential Revision: D19494145

fbshipit-source-id: d5d0bdf6a033c3de286029adec3e0f6245864a62
2020-01-21 03:56:46 -08:00
Timur Valiev
ff26deedd7 Add default search term in Searchable
Summary: Add a way to provide default search term; similar to default filters

Reviewed By: mweststrate

Differential Revision: D19449561

fbshipit-source-id: 6845ae5d2e058fe68974ac7aa8fd7b45814c2002
2020-01-20 10:19:38 -08:00
Anton Nikolaev
f94446310d ~10% of healthcheck runs failed with error "Cannot fine property length of undefned"
Summary: According to dashboard, ~10% of healthcheck runs failed with error "Cannot find property length of undefned". So here I'm fixing the only place where length property is used by doctor.

Reviewed By: passy

Differential Revision: D19470886

fbshipit-source-id: 3ad88370e5cb652c6f20034ebf5f38fadc46bf53
2020-01-20 09:54:24 -08:00
greenkeeper[bot]
fd83a751c7 Update jsdom in group plugins to the latest version � (#753)
Summary:
## The devDependency [jsdom](https://github.com/jsdom/jsdom) was updated from `15.2.1` to `16.0.1`.
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:** [domenic](https://www.npmjs.com/~domenic)
**License:** MIT

<details>
<summary>Release Notes for Version 16.0.1</summary>

<ul>
<li>Fixed Node v10 and v11 support when <code>runScripts</code> was set.</li>
<li>Fixed the behavior when changing an <code>&lt;input&gt;</code>'s <code>type=""</code> attribute.</li>
<li>Fixed input validation behavior for <code>&lt;input type="range"&gt;</code> when <code>max=""</code> is less than <code>min=""</code>.</li>
</ul>
</details>

<details>
<summary>Commits</summary>
<p>The new version differs by 52 commits.</p>
<ul>
<li><a href="afc85c80df"><code>afc85c8</code></a> <code>Version 16.0.1</code></li>
<li><a href="6472db466a"><code>6472db4</code></a> <code>Fix Node v10 and Node v11 support</code></li>
<li><a href="16c9856649"><code>16c9856</code></a> <code>Improved "expected fail" messages for web platform tests</code></li>
<li><a href="e2dbad8183"><code>e2dbad8</code></a> <code>Add support for  reverse range validation</code></li>
<li><a href="94b40d3ebf"><code>94b40d3</code></a> <code>Implement  type state switch logic</code></li>
<li><a href="c292572cd7"><code>c292572</code></a> <code>Add comment about radio button activation muddiness</code></li>
<li><a href="52109d5b23"><code>52109d5</code></a> <code>Clean up  typeMismatch constraint validation</code></li>
<li><a href="4a374e5b99"><code>4a374e5</code></a> <code>Clean up _defaultStepBase in </code></li>
<li><a href="92e9adbf41"><code>92e9adb</code></a> <code>Consistently use ._value for constraint validation</code></li>
<li><a href="11664cabd4"><code>11664ca</code></a> <code>More consistent applicability checking for  attributes</code></li>
<li><a href="b097c0a000"><code>b097c0a</code></a> <code>Roll Web Platform Tests</code></li>
<li><a href="d240291edb"><code>d240291</code></a> <code>Remove unnecessary dependencies</code></li>
<li><a href="902b69e15a"><code>902b69e</code></a> <code>Version 16.0.0</code></li>
<li><a href="020539ed3f"><code>020539e</code></a> <code>Remove document.origin and add window.origin</code></li>
<li><a href="678141f58e"><code>678141f</code></a> <code>Use mutability as a measure for valueMissing constraint</code></li>
</ul>
<p>There are 52 commits in total.</p>
<p>See the <a href="c3f0f2756b...afc85c80df">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/753

Reviewed By: nikoant

Differential Revision: D19469099

Pulled By: passy

fbshipit-source-id: 78de63ebb15843b27818dcbcbbe78ce5d5964ae9
2020-01-20 07:55:37 -08:00
greenkeeper[bot]
161ba23bae Update metro in group website to the latest version � (#752)
Summary:
## The dependency [metro](https://github.com/facebook/metro) was updated from `0.57.0` to `0.58.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:** [metro-bot](https://www.npmjs.com/~metro-bot)
**License:** MIT

[Find out more about this release](https://github.com/facebook/metro).

 ---

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

Reviewed By: nikoant

Differential Revision: D19469348

Pulled By: passy

fbshipit-source-id: 89c805bef852ca8ee7d181ae8cc1c8f6e0ff351b
2020-01-20 07:53:17 -08:00
Pascal Hartig
83c15219da Add gradle validation (#748)
Summary:
Copied from here: https://github.com/facebook/fresco/pull/2457

Our version is too old to have checksums available, so we first need to merge
https://github.com/facebook/flipper/pull/749.
Pull Request resolved: https://github.com/facebook/flipper/pull/748

Test Plan: GitHub

Reviewed By: mweststrate

Differential Revision: D19447711

Pulled By: passy

fbshipit-source-id: acd1752fa84c14804f0e1012e56763635127d926
2020-01-20 06:04:25 -08:00
Alexander Oprisnik
ad720b1f63 Fix CloseableReference leaks in Flipper plugin
Summary:
When debugging closeable reference leaks, I found that the Flipper plugin doesn't properly close one:

```
2020-01-17 10:45:29.346 27038-27053/com.facebook.wakizashi D/YOLO: LEAK!!:
    java.lang.Throwable
        at com.facebook.common.references.CloseableReference.<init>(CloseableReference.java:158)
        at com.facebook.common.references.DefaultCloseableReference.<init>(DefaultCloseableReference.java:29)
        at com.facebook.common.references.CloseableReference.of(CloseableReference.java:237)
        at com.facebook.common.references.CloseableReference.of(CloseableReference.java:203)
        at com.facebook.common.references.CloseableReference.of(CloseableReference.java:176)
        at com.facebook.imagepipeline.cache.CountingMemoryCache.newClientReference(CountingMemoryCache.java:221)
        at com.facebook.imagepipeline.cache.CountingMemoryCache.get(CountingMemoryCache.java:209)
        at com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin$4.onReceive(FrescoFlipperPlugin.java:204)
        at com.facebook.flipper.android.EventBase.loopForever(Native Method)
        at com.facebook.flipper.android.FlipperThread.run(FlipperThread.java:31)
```

Second leak:
```
2020-01-17 11:04:16.503 28855-28869/com.facebook.wakizashi D/YOLO: LEAK!!:
    java.lang.Throwable
        at com.facebook.common.references.CloseableReference.<init>(CloseableReference.java:147)
        at com.facebook.common.references.DefaultCloseableReference.<init>(DefaultCloseableReference.java:21)
        at com.facebook.common.references.DefaultCloseableReference.clone(DefaultCloseableReference.java:35)
        at com.facebook.common.references.CloseableReference.cloneOrNull(CloseableReference.java:258)
        at com.facebook.common.references.CloseableReference.cloneOrNull(CloseableReference.java:326)
        at com.facebook.imagepipeline.cache.CountingMemoryCacheInspector$DumpInfoEntry.<init>(CountingMemoryCacheInspector.java:32)
        at com.facebook.imagepipeline.cache.CountingMemoryCacheInspector.dumpCacheContent(CountingMemoryCacheInspector.java:101)
        at com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin$3.onReceive(FrescoFlipperPlugin.java:171)
        at com.facebook.flipper.android.EventBase.loopForever(Native Method)
        at com.facebook.flipper.android.FlipperThread.run(FlipperThread.java:31)
```

Reviewed By: passy

Differential Revision: D19445902

fbshipit-source-id: 12a513d9e34fcac0d546a4eac55932956e4e4d5b
2020-01-17 12:32:01 -08:00
Michel Weststrate
1b7a30ae6c Publish react-native-flipper as NPM package
Summary:
This Diff makes the react-native-flipper package available on NPM.

For simplicity and traceability purposes, this package is released every time Flipper is released, under the same version number. Even though there will be often no changes.

Reviewed By: passy

Differential Revision: D19446815

fbshipit-source-id: 485930e57beac42a2f36dc34a8ac82eed2abe785
2020-01-17 08:21:05 -08:00
Rick Hanlon
3b24e41258 Fix hermes chrome debugger for Flipper
Summary: When Flipper upgraded Electron it broke the iframe sandboxing for devtools, the fix is to use a webview (which requires some CSS fixes to render full screen).

Reviewed By: ArchDev

Differential Revision: D19446243

fbshipit-source-id: 7fd0b0fc922aa6c05c24efc20adce1cb61f24c99
2020-01-17 06:33:02 -08:00
Michel Weststrate
c8ebb7caaf Fix layout of clear icon
Summary:
Flipper clear icon was hidden, this fixes it

Also fixed a null pointer exception that would occur when clearing search with the keyboard, and no filters were active

Reviewed By: passy

Differential Revision: D19445833

fbshipit-source-id: 213c28dc8c1e295018e6318f86604d96d2a9b75c
2020-01-17 06:30:10 -08:00