Commit Graph

4328 Commits

Author SHA1 Message Date
Pritesh Nandgaonkar
7358711e07 Enable screenshot for physical devices
Summary: Uses idb to get screenshot for physical devices.

Reviewed By: jknoxville

Differential Revision: D24017656

fbshipit-source-id: 89ffd17259d6f94d03a1442ffb341b79797f260b
2020-09-30 10:10:27 -07:00
generatedunixname89002005306973
a92aa126ae Flipper Snapshot Bump: v0.60.1-SNAPSHOT
Summary: Releasing snapshot version 0.60.1-SNAPSHOT

Reviewed By: priteshrnandgaonkar

Differential Revision: D24017296

fbshipit-source-id: d9d7c2381fc1384608d4311a7da485f020829ae1
2020-09-30 09:28:54 -07:00
generatedunixname89002005306973
8054f6446f Flipper Release: v0.60.0
Summary: Releasing version 0.60.0

Reviewed By: priteshrnandgaonkar

Differential Revision: D24017297

fbshipit-source-id: ff193e95edc7d236c204bddf83aba56a7f009469
2020-09-30 09:28:54 -07:00
Pritesh Nandgaonkar
7574cee733 check for the null
Summary: This fixes the bug mentioned [here](https://fb.workplace.com/groups/flippersupport/permalink/976743249473000/)

Reviewed By: nikoant

Differential Revision: D24016091

fbshipit-source-id: 1ce49d850b6562fb9f09b9e640185316efc927c6
2020-09-30 07:35:28 -07:00
generatedunixname89002005306973
b2261ba1c5 Flipper Snapshot Bump: v0.59.1-SNAPSHOT
Summary: Releasing snapshot version 0.59.1-SNAPSHOT

Reviewed By: priteshrnandgaonkar

Differential Revision: D23985340

fbshipit-source-id: d8dafc28ca0b0243052abf23a3213ae92287e3eb
2020-09-30 04:25:21 -07:00
Joshua Selbo
0b2e5f6454 Upgrade Robolectric from 4.3.1 -> 4.4
Summary: Changelog: [Internal]

Reviewed By: jiawei-lyu

Differential Revision: D23718455

fbshipit-source-id: 39c684722db1269e2179cf9680cb728be1171afb
2020-09-29 18:41:20 -07:00
generatedunixname89002005306973
c0e8cef466 Flipper Release: v0.59.0
Summary: Releasing version 0.59.0

Reviewed By: priteshrnandgaonkar

Differential Revision: D23985341

fbshipit-source-id: a477f9c05f7a62db3a59758c8c5fe06651ffa6f2
2020-09-29 08:11:39 -07:00
Anton Nikolaev
bc39e72fd9 Automatically select plugin after auto-update
Summary: Select reloaded plugin automatically

Reviewed By: mweststrate

Differential Revision: D23987545

fbshipit-source-id: bf54ca54e4aa46b987d57e76fbc4f3e9e5fc336e
2020-09-29 04:26:25 -07:00
Petr Bela
b3ca84fc1b Instructions for React Native 0.63 (#1546)
Summary:
The instructions for React Native were outdated. In RN0.63, most of the setup has been moved to a helper method.

## Changelog

* Updated instructions for React Native 0.63 (petrbela)

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

Test Plan: N/A

Reviewed By: mweststrate

Differential Revision: D23961759

Pulled By: passy

fbshipit-source-id: db89d2b9836da1959ff46683d76c23aea8e2a2fd
2020-09-29 02:36:20 -07:00
Pascal Hartig
75e80272a6 Remove stray console.log
Summary: Don't think is meant to stick around?

Reviewed By: jknoxville

Differential Revision: D23960901

fbshipit-source-id: 79115c8711745f3cd08dc93c9bb6f03f87154bf3
2020-09-28 07:23:17 -07:00
Anton Nikolaev
80c7c76ef9 Reload single device plugin on auto-update
Summary: The same as D23729972 (0982dc06a0), but now it is also possible to reload device plugins independently.

Reviewed By: jknoxville

Differential Revision: D23960058

fbshipit-source-id: 01e0edb29a62ed173dfe6f5946466269adee453a
2020-09-28 04:47:08 -07:00
Anton Nikolaev
1b4c08b282 Show plugin version as title in sidebar
Summary: Show plugin version on hover to easily check the current version without opening Plugin Manager

Reviewed By: mweststrate

Differential Revision: D23730582

fbshipit-source-id: 580da6ccd38c10b13dd9c438d4cf8d6ba8719644
2020-09-28 02:51:47 -07:00
Anton Nikolaev
0982dc06a0 Reload single plugin on auto-update
Summary: Implemented a way for re-loading single plugin on auto-update. This make it possible to apply update without full Flipper restart.

Reviewed By: mweststrate

Differential Revision: D23729972

fbshipit-source-id: ed30f7cde5a0537945db0b5bb6969ae8fde42cb6
2020-09-28 02:51:47 -07:00
Anna Murawska
5e979403a0 Show FB-internal announcements only in internal changelog (#1544)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/1544

Added Facebook changelog file

Reviewed By: nikoant

Differential Revision: D23930322

fbshipit-source-id: bb6be359d36188f142d342604e50010170086610
2020-09-28 02:42:00 -07:00
Chaiwat Ekkaewnumchai
95ae7a8bce Fix Tree View Misbehavior
Summary: The misbehavior came from undefined height and width inside `Sidebar` component. This is fixed by put it in the container that expands through whole `Sidebar`.

Reviewed By: Andrey-Mishanin

Differential Revision: D23954008

fbshipit-source-id: 9c096a8f3141a012a2a1ab32c2d5e689e7bde396
2020-09-28 02:03:09 -07:00
Michel Weststrate
ecf4cff7cf Fix most lint warnings
Summary:
I noticed that after the typescript upgrade, I got several weird positives from ESLint (like unused parameters in a type definition, which are obviously always unused, e.g. `type onClick = (e: Event) => void`). After some investigation, it turned out these warnings are generated by eslint, but that those rules should be performaned by typescript/eslint instead. For future reference to which rules this applies:

https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/README.md#extension-rules

Updated the config, and while at it, fixed all warnings in our codebase, except for `react-hooks/exhaustive-deps` warnings, since those require semantic changes.

This reduces the amount of eslint warnings from 86 to 39.

Reviewed By: passy

Differential Revision: D23905630

fbshipit-source-id: 0557708fd9ec6b17840a3c191e7d3baf225bdf23
2020-09-28 01:42:48 -07:00
Michel Weststrate
aaabe1cc82 Introduce AppInspect
Summary:
This diff introduces the AppInspect pane.

I didn't get very fare, and it is markup only, but while at it made a bunch of other improvement in the component lib, so figured to prematurely submit to don't make the diffs too big.

Improvements
- Separated sidebar and Layout.X, as it was to much responsibility for one component, and made customization hard. Also caused state loss when switching between resizable and not.
- Setup a basic top level selection. Maybe will move it into redux in the future, but for now it suffices.
- Introduced Layout.Horizontal and `Layout.Vertical` as alternative to Ant design's space. The reason is that the latter can't stretching children, which we use quite frequently. (that is because they use wrappers to create spacing, but since we run on Electron, we can use CSS `gap` instead, which handles that much more elegantly).
- Fixed issue where gutter handle could disappear when dragging to far.

Reviewed By: cekkaewnumchai

Differential Revision: D23867265

fbshipit-source-id: e872b7f48b868e255f2c34d45e811b8ed93d0b00
2020-09-28 01:42:48 -07:00
John Knox
2cbcbd1480 Include os version in metrics
Summary: May be useful for stability signals, or general bug correlation down the line.

Reviewed By: nikoant

Differential Revision: D23904843

fbshipit-source-id: ca31722b58d4657a9600fe5ce16ea3b5efd2c870
2020-09-25 09:52:05 -07:00
Pritesh Nandgaonkar
32de8c31c3 move bloks plugin to ntstate plugin
Summary: Send data to NT/Bloks plugin instead of Bloks plugin. There are changes on the distillery side as well D23873230, which needs to land together with this diff.

Differential Revision: D23903952

fbshipit-source-id: 2b748e73116f10d69ec1cf810075882bb8fa09a6
2020-09-25 07:39:36 -07:00
John Knox
359f7ad639 Fix system app detection regex
Summary:
Previously system apps have given "... is not an application" messages.
But now we can see others: https://android.googlesource.com/platform/system/core/+/master/run-as/run-as.cpp#226

So expanding the regex to catch both.
Context: https://fb.workplace.com/groups/flippersupport/permalink/970770066736985/

Reviewed By: passy

Differential Revision: D23930268

fbshipit-source-id: 1b85018da3e468563198d64af607d1129273c0d6
2020-09-25 06:21:29 -07:00
Pascal Hartig
c282184d9f Run generate-changelog with xplat node
Summary: This way we don't need to depend on Sandcastle configurations. amurawska pointed out that the header in `generate-changelog.js` indicates it must be run with Node 6, but trying to do so actually raises a Syntax error.

Reviewed By: mweststrate

Differential Revision: D23904875

fbshipit-source-id: 264f3b16d64ebfbae6afb0028715f67624166499
2020-09-25 03:54:04 -07:00
dependabot[bot]
d77aaf5cad Bump prettier from 2.1.0 to 2.1.2 in /flipper-js-client-sdk (#1539)
Summary:
Bumps [prettier](https://github.com/prettier/prettier) from 2.1.0 to 2.1.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/prettier/prettier/releases">prettier's releases</a>.</em></p>
<blockquote>
<h2>2.1.2</h2>
<p><a href="https://github.com/prettier/prettier/blob/master/CHANGELOG.md#212">{emoji:1f517}Changelog</a></p>
<h2>2.1.1</h2>
<p><a href="https://github.com/prettier/prettier/blob/master/CHANGELOG.md#211">{emoji:1f517}Changelog</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/prettier/prettier/blob/master/CHANGELOG.md">prettier's changelog</a>.</em></p>
<blockquote>
<h1>2.1.2</h1>
<p><a href="https://github.com/prettier/prettier/compare/2.1.1...2.1.2">diff</a></p>
<h4>Fix formatting for directives in fields (<a href="https://github-redirect.dependabot.com/prettier/prettier/pull/9116">#9116</a> by <a href="https://github.com/sosukesuzuki">sosukesuzuki</a>)</h4>

<pre lang="graphql"><code># Input
type Query {
  someQuery(id: ID!, someOtherData: String!): String! deprecated isAuthenticated
  versions: Versions!
}
<h1>Prettier stable</h1>
<p>type Query {
someQuery(id: ID!, someOtherData: String!): String!
<a href="https://github.com/deprecated">deprecated</a>
<a href="https://github.com/isAuthenticated">isAuthenticated</a>
versions: Versions!
}</p>
<h1>Prettier master</h1>
<p>type Query {
someQuery(id: ID!, someOtherData: String!): String!
<a href="https://github.com/deprecated">deprecated</a>
<a href="https://github.com/isAuthenticated">isAuthenticated</a>
versions: Versions!
}</p>
<p></code></pre></p>
<h4>Fix line breaks for CSS in JS (<a href="https://github-redirect.dependabot.com/prettier/prettier/pull/9136">#9136</a> by <a href="https://github.com/sosukesuzuki">sosukesuzuki</a>)</h4>

<pre lang="js"><code>// Input
styled.div`
  // prettier-ignore
  media (aaaaaaaaaaaaa) {
	z-index: ${(props) =&gt; (props.isComplete ? '1' : '0')};
  }
`;
styled.div`
  ${props =&gt; getSize(props.$size.xs)}
  ${props =&gt; getSize(props.$size.sm, 'sm')}
  ${props =&gt; getSize(props.$size.md, 'md')}
`;
<p>&lt;/tr&gt;&lt;/table&gt; ... (truncated)
</code></pre></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="8eb8f9ed2d"><code>8eb8f9e</code></a> Release 2.1.2</li>
<li><a href="f75844a453"><code>f75844a</code></a> Fix changelog</li>
<li><a href="9153bf20ac"><code>9153bf2</code></a> Build(deps): Bump yaml-unist-parser from 1.3.0 to 1.3.1 (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/9169">#9169</a>)</li>
<li><a href="ec1b419307"><code>ec1b419</code></a> YAML: Fix printing doubles a blank line before a comment (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/9143">#9143</a>)</li>
<li><a href="ab9474eacc"><code>ab9474e</code></a> Fix line breaks for CSS in JS (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/9136">#9136</a>)</li>
<li><a href="d5da779cb1"><code>d5da779</code></a> GraphQL: Fix formatting for directives in fields (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/9116">#9116</a>)</li>
<li><a href="a836319711"><code>a836319</code></a> Bump Prettier dependency to 2.1.1</li>
<li><a href="18bcaefc77"><code>18bcaef</code></a> Release 2.1.1</li>
<li><a href="ebe9e07716"><code>ebe9e07</code></a> Vue: Fix format on self-closing and empty blocks (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/9055">#9055</a>)</li>
<li><a href="5a12f52bbe"><code>5a12f52</code></a> Replace changelog versions in ./scripts/draft-blog-post.js (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/9058">#9058</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/prettier/prettier/compare/2.1.0...2.1.2">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=prettier&package-manager=npm_and_yarn&previous-version=2.1.0&new-version=2.1.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/configuring-github-dependabot-security-updates)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

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

Reviewed By: mweststrate

Differential Revision: D23876327

Pulled By: cekkaewnumchai

fbshipit-source-id: 97c82809776213991f742a60050727ecc1b8f3ff
2020-09-24 18:45:01 -07:00
dependabot[bot]
4cb178218c Bump react-native-flipper from 0.56.0 to 0.57.0 in /react-native/ReactNativeFlipperExample (#1537)
Summary:
Bumps [react-native-flipper](https://github.com/facebook/flipper) from 0.56.0 to 0.57.0.
<details>
<summary>Commits</summary>
<ul>
<li><a href="2fcab458bf"><code>2fcab45</code></a> Flipper Release: v0.57.0</li>
<li><a href="bb176577e9"><code>bb17657</code></a> Back out &quot;Use interface SupportSQLiteDatabase in Android Databases Plugin&quot;</li>
<li><a href="09e3c7a80f"><code>09e3c7a</code></a> Add chocolatey as a way to install openssl for windows (<a href="https://github-redirect.dependabot.com/facebook/flipper/issues/1527">https://github.com/facebook/flipper/issues/1527</a>)</li>
<li><a href="a5fbe167b9"><code>a5fbe16</code></a> Bump react-native-flipper from 0.54.0 to 0.56.0 in /react-native/ReactNativeF...</li>
<li><a href="48270af383"><code>48270af</code></a> Bump eslint-plugin-react-hooks from 4.1.0 to 4.1.2 in /flipper-js-client-sdk ...</li>
<li><a href="bb807243ae"><code>bb80724</code></a> Revert &quot;fbjni 0.0.4 (<a href="https://github-redirect.dependabot.com/facebook/flipper/issues/1428">https://github.com/facebook/flipper/issues/1428</a>)&quot; (<a href="https://github-redirect.dependabot.com/facebook/flipper/issues/1524">https://github.com/facebook/flipper/issues/1524</a>)</li>
<li><a href="d468d94363"><code>d468d94</code></a> Back out &quot;Show FB internal instructions by default on &quot;Getting Started&quot; page&quot;</li>
<li><a href="643a656cd9"><code>643a656</code></a> Back out &quot;Merge internal and external troubleshooting pages into one with opt...</li>
<li><a href="8425db7b8b"><code>8425db7</code></a> Merge internal and external troubleshooting pages into one with optional inte...</li>
<li><a href="12d7b48443"><code>12d7b48</code></a> Show FB internal instructions by default on &quot;Getting Started&quot; page</li>
<li>Additional commits viewable in <a href="https://github.com/facebook/flipper/compare/v0.56.0...v0.57.0">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=react-native-flipper&package-manager=npm_and_yarn&previous-version=0.56.0&new-version=0.57.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/configuring-github-dependabot-security-updates)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

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

Reviewed By: mweststrate

Differential Revision: D23876572

Pulled By: cekkaewnumchai

fbshipit-source-id: 37fa5e66f6feb60701762f43a349dbe3b6eec1fd
2020-09-24 11:17:28 -07:00
Michel Weststrate
aea04dd0cf Add Flipper logs to leftrail
Summary:
This adds support for flipper logs in Sandy, including some theme adjustments.

Did remove storage and showing of debug messages, as I noticed it tends to crash Flipper after a while since there are so many. Also added a fixed limit of only remembering last 1000

Also converted Toolbar and button with dropdown items to Sandy.

Reviewed By: cekkaewnumchai

Differential Revision: D23824528

fbshipit-source-id: b89d1182d4f14682251dbb482d93c2c009ddc7a4
2020-09-24 05:58:29 -07:00
Michel Weststrate
191df465b7 Updated to typescript 4
Summary:
allow-large-files

Updated to typescript 4. Note that this is no new major, the way TS numbers is that 4.0 is simply the number after 3.9 (so they refuse to use 3.10).

Primarily reason is that it allows us to use `/** deprecated */`. although there are definitely more interesting improvements

Reviewed By: passy, nikoant

Differential Revision: D23869445

fbshipit-source-id: 54e251b398b8698d9b18898ce66c3203b32aa356
2020-09-24 05:58:29 -07:00
GitHub
9f43f01501 Automated: Update Podfile.lock (#1542)
Summary:
This is an automated PR to update the Podfile.lock.
- Make sure that the Podfile.lock contains latest FlipperKit and Flipper pod versions.
- Also make sure that all the dependencies are updated to the latest one.
- This is auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request)

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

Reviewed By: mweststrate

Differential Revision: D23888791

Pulled By: cekkaewnumchai

fbshipit-source-id: 75e0de6ea8f4d356fc1d3fca88127351d9164bba
2020-09-24 03:44:31 -07:00
Chaiwat Ekkaewnumchai
bfe76e54fe Introduce Sandy Welcome Screen
Summary:
Per title

~~Note: `useStore.tsx` is copied from D23783500 (e7fdd8332d). This should be merged correctly in case the diff is landed before.~~

Reviewed By: mweststrate

Differential Revision: D23784302

fbshipit-source-id: adb5678c1b2614e3af4278889529c3fa79335bef
2020-09-23 17:59:46 -07:00
Chaiwat Ekkaewnumchai
93c897820b Change Typography Size
Summary:
Typography on Sandy! The designed typography is [here in Figma](https://www.figma.com/file/4e6BMdm2SuZ1L7FSuOPQVC/Flipper?node-id=238%3A172)

Current deflects
- cannot find component for 'body - small' and 'meta'
- don't know how to set 'link secondary hover' as designed

Reviewed By: mweststrate

Differential Revision: D23869256

fbshipit-source-id: efb1475749cebad529b502458d1b15bd445bb346
2020-09-23 17:59:46 -07:00
generatedunixname89002005306973
869d62b8c9 Flipper Snapshot Bump: v0.58.1-SNAPSHOT
Summary: Releasing snapshot version 0.58.1-SNAPSHOT

Reviewed By: cekkaewnumchai

Differential Revision: D23872447

fbshipit-source-id: b59d905c06bfae55a526e52cee71e3dc14bce81b
2020-09-23 12:06:38 -07:00
generatedunixname89002005306973
32315c2d97 Flipper Release: v0.58.0
Summary: Releasing version 0.58.0

Reviewed By: cekkaewnumchai

Differential Revision: D23872448

fbshipit-source-id: b74483db292311719a0231f9b2fed78122e9f339
2020-09-23 12:06:38 -07:00
Pascal Hartig
bc0bcda300 Fix license headers for less files
Summary: Failing OSS requirements due to missing headers right now: P143086435

Reviewed By: mweststrate

Differential Revision: D23843532

fbshipit-source-id: 759daefbec641d59adff6ecee8d06dd90c7a6b5b
2020-09-23 09:46:21 -07:00
John Knox
390df577ae Print out CSR mismatches when no matching one can be found
Summary:
We're seeing some CSR mismatches when they aren't expected. Adding logging to print out what is being found, to see if it's any OS-specific encoding issues or something like that, or completely different CSRs, etc.

URL encoded in case there are differences in non printable characters.

Reviewed By: nikoant

Differential Revision: D23867267

fbshipit-source-id: f406a396c808687b6b84561eb1def61b565aee34
2020-09-23 08:39:40 -07:00
Michel Weststrate
a0d46bbb53 Use Ant design for buttons if Sandy is enabled
Summary: The Flipper `Button` component now uses Ant.design under the hood if available. This is detected using context

Reviewed By: cekkaewnumchai

Differential Revision: D23813166

fbshipit-source-id: 489a34d55c0b69d7b5bcd30f4275b89d0bb22c0d
2020-09-22 12:03:40 -07:00
Michel Weststrate
b256bc68fa convert buttons to React hooks
Summary: Converted Buttons to hooks, to make it easier to use context in the future. No further changes.

Reviewed By: cekkaewnumchai

Differential Revision: D23812921

fbshipit-source-id: 3739ad49e734dbe4d903a23d58da7cc267f6e109
2020-09-22 12:03:40 -07:00
Michel Weststrate
fdd2151532 Settings panel
Summary:
This enables opening the settings panel from Sandy. Created a small code switch in layouting to make sure it looks ok in both sandy and native dialog. Inside the settings no new components are used yet, which will be done in next diffs.

Also removed the close button from temporarily titlebar as settings are now accessible from Sandy chrome

Reviewed By: cekkaewnumchai

Differential Revision: D23812321

fbshipit-source-id: f8888373632786bb75f6dad635d300729b5086dc
2020-09-22 12:03:39 -07:00
Michel Weststrate
1c3df6ed8e Copied utilities to temporarily toolbar
Summary: This copies several utilities from the old title bar to the new one. We will have to revisit this in the future as it will eventually disappear. But in the mean time it makes sure version info and performance graphs are shown

Reviewed By: cekkaewnumchai

Differential Revision: D23824366

fbshipit-source-id: 0e495cd6d70db6a38da6df52b47ffee4bcb6f69f
2020-09-22 12:03:39 -07:00
Paco Estevez Garcia
7acdfc196f Depend on litho-editor-flipper
Summary: FlipperEditor has migrated to `litho-editor-flipper`, so this diff fixes the dependency tree and deletes the file.

Reviewed By: muraziz

Differential Revision: D23380023

fbshipit-source-id: 75f5f037dc392194212fc156499f090c381999bd
2020-09-22 11:34:32 -07:00
Anton Nikolaev
dfbf66408a Fix search by query in Plugin Manager
Summary: I accidently broke search by query in a previous diff, so fixing it here

Reviewed By: passy

Differential Revision: D23842187

fbshipit-source-id: 9fcc7a46048ff99e1bf26c8a70ef0240b38018cb
2020-09-22 10:35:55 -07:00
Michel Weststrate
e7fdd8332d Made sidebars toggleable
Summary:
Implemented a first button: make main menu collapsible.

Also introduced some additional utilities and hooked up startup performance logging

Reviewed By: cekkaewnumchai

Differential Revision: D23783500

fbshipit-source-id: 2456fd781a52d497facbaccfabe885e4f8c408c5
2020-09-21 11:53:21 -07:00
Michel Weststrate
95638af321 Build main layout
Summary: This diff introduces the. main sections and restyled resizable panes according to the Figma design

Reviewed By: cekkaewnumchai

Differential Revision: D23758349

fbshipit-source-id: 7f09574f6b5fb54551141c13667c664e1769f09a
2020-09-21 11:53:21 -07:00
Igor Strebezhev
0100224833 Highlight code in the README.md (#1540)
Summary:
Thanks for `flipper` ;)

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

Reviewed By: nikoant

Differential Revision: D23817144

Pulled By: passy

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

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

Reviewed By: passy

Differential Revision: D23815769

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

{F336605489}

Reviewed By: jknoxville

Differential Revision: D23815568

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

Reviewed By: muraziz

Differential Revision: D23768422

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

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

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

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

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

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

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

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

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

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

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

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

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

Close the Dialog

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

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

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

Reviewed By: cekkaewnumchai

Differential Revision: D23027793

Pulled By: mweststrate

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

Reviewed By: cekkaewnumchai

Differential Revision: D23759727

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

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

Changelog: Flipper now uses Electron 10

Reviewed By: nikoant

Differential Revision: D23565000

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

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

Reviewed By: muraziz

Differential Revision: D23758538

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

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

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

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

Reviewed By: muraziz

Differential Revision: D23757826

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

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

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

Reviewed By: nikoant

Differential Revision: D23733338

Pulled By: passy

fbshipit-source-id: abf9812b977542a8b297b88ea16c7c01a062898b
2020-09-17 05:03:27 -07:00