Commit Graph

4830 Commits

Author SHA1 Message Date
Robert A Barclay
025b51a284 Fixes the Flipper-RSocket podspec to exclude .txt and .md files (#2079)
Summary:
Fixes the Flipper-RSocket podspec similar to the [RSocket podpec](https://github.com/facebook/flipper/pull/1438) to exclude the .md and .txt files from the compilation, which is throwing a warning.

Removal of these warnings:

```
warning: no rule to process file '<redacted>/ios/Pods/Flipper-RSocket/rsocket/benchmarks/CMakeLists.txt' of type 'text' for architecture 'arm64' (in target 'Flipper-RSocket' from project 'Pods')
warning: no rule to process file '<redacted>/ios/Pods/Flipper-RSocket/rsocket/benchmarks/README.md' of type 'net.daringfireball.markdown' for architecture 'arm64' (in target 'Flipper-RSocket' from project 'Pods')
warning: no rule to process file '<redacted>/ios/Pods/Flipper-RSocket/rsocket/README.md' of type 'net.daringfireball.markdown' for architecture 'arm64' (in target 'Flipper-RSocket' from project 'Pods')
```

## Changelog

Fix Flipper-RSocket podspec to exclude .txt and .md files from being included in the compilation

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

Reviewed By: passy

Differential Revision: D27230095

Pulled By: priteshrnandgaonkar

fbshipit-source-id: 0876901aaad1a3b4e8093ed4ccf1cc845e18032a
2021-03-22 18:28:57 -07:00
dependabot[bot]
f5b729d91c Bump fresco from 2.2.0 to 2.3.0 (#2055)
Summary:
Bumps [fresco](https://github.com/facebook/fresco) from 2.2.0 to 2.3.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/facebook/fresco/releases">fresco's releases</a>.</em></p>
<blockquote>
<h2>Version 2.3.0</h2>
<h1>Highlights</h1>
<ul>
<li>
<p><strong>Bumped Fresco's minSdk to 14.</strong> We did not remove any Gingerbread-specific code yet, but will do so soon. 091e8b7c4cd11a6cc5b535dd84d8e21a1e243ac0</p>
</li>
<li>
<p>Proper nullability annotations for some classes by using new Infer annotations - this improves Kotlin support and null-safety.</p>
</li>
<li>
<p>Improved Java-only Fresco setup. 4a9961559c8240cbb88eeecf2303f956d0185120</p>
</li>
<li>
<p>Lots of debug logging improvements: More reliable image origin, new MEMORY_BITMAP_SHORTCUT origin, more debug information available. These are available via <code>ImagePerfData#getExtraData()</code></p>
</li>
<li>
<p>Added experimental option to recover from OOMs: f43d5990600c9ac6c3a18e14e4d3c260cf78b462</p>
</li>
<li>
<p>Added option to force a single image pipeline instance: 5f5c076fe26b17a849498c27c7541550c3ef3984</p>
</li>
<li>
<p>Disk cache support for the Fresco Flipper images plugin.</p>
</li>
<li>
<p>Bumped SoLoader version to 0.9.0.</p>
</li>
<li>
<p>Use <code>buildSrc</code> for Fresco's internal dependency management.</p>
</li>
<li>
<p>WIP: Lots of improvements for our new Fresco Vito UI components.</p>
</li>
</ul>
<p>Pull requests:</p>
<ul>
<li>Fixed resource leak problem while using BlurPostProcessor. Thanks <a href="https://github.com/FrancescoJo"><code>@​FrancescoJo</code></a> for the PR.</li>
<li>Make sure there is at least one overlay in GenericDraweeHierarchy. Thanks <a href="https://github.com/dengweichao"><code>@​dengweichao</code></a> for the PR.</li>
<li>Removed unused padding value. Thanks <a href="https://github.com/erenulas"><code>@​erenulas</code></a> for the PR.</li>
</ul>
<h1>Cleanup</h1>
<ul>
<li>Removed Drawee-Volley module. If you're using Drawee-Volley, you can still continue using it by just copying the files removed with 7c2517edee7d4080fab0daf54fd4ac4eca6a8497 into your project. We did not significantly change these in a long time, so this has been stable.</li>
<li>Removed OkHttp2 image pipeline artifact. See deba7d1c3c218377a5b67e58f269914d8f8a88be</li>
</ul>
<p>Full changelog: <a href="https://github.com/facebook/fresco/compare/v2.2.0...v2.3.0">https://github.com/facebook/fresco/compare/v2.2.0...v2.3.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="bbc795aa96"><code>bbc795a</code></a> Minor: remove StringDef usage</li>
<li><a href="c74abcdfa8"><code>c74abcd</code></a> Bump version to 2.3.0</li>
<li><a href="0de3d2c23e"><code>0de3d2c</code></a> Update recover-from-OOM experiment setup</li>
<li><a href="a9a2d71f2d"><code>a9a2d71</code></a> Add working range prefetching for FrescoVitoImage2Spec</li>
<li><a href="f43d599060"><code>f43d599</code></a> Add option to attempt a recover from OOM to DecodeProducer</li>
<li><a href="a771005806"><code>a771005</code></a> Daily <code>arc lint --take GOOGLEJAVAFORMAT</code></li>
<li><a href="b002d8eab4"><code>b002d8e</code></a> Use concurrent version of list in image perf monitor</li>
<li><a href="3c96d444a8"><code>3c96d44</code></a> Vito2: Add support for animated image auto play</li>
<li><a href="a1ced14444"><code>a1ced14</code></a> allow probing disk cache when image is fetched from network</li>
<li><a href="22a74867bb"><code>22a7486</code></a> HttpUrlConnectionNetworkFetcher: specify arbitrary request headers</li>
<li>Additional commits viewable in <a href="https://github.com/facebook/fresco/compare/v2.2.0...v2.3.0">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.facebook.fresco:fresco&package-manager=gradle&previous-version=2.2.0&new-version=2.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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

Reviewed By: passy

Differential Revision: D27230358

Pulled By: priteshrnandgaonkar

fbshipit-source-id: 4fa283d75933b485676956b17474dd0ad3db3d66
2021-03-22 17:23:12 -07:00
dependabot[bot]
da25b49428 Bump espresso-intents from 3.1.0 to 3.3.0 (#2056)
Summary:
Bumps espresso-intents from 3.1.0 to 3.3.0.

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.test.espresso:espresso-intents&package-manager=gradle&previous-version=3.1.0&new-version=3.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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

Reviewed By: passy

Differential Revision: D27230354

Pulled By: priteshrnandgaonkar

fbshipit-source-id: 18b7113a6463b486ae1e2c9023a986388d75776f
2021-03-22 17:23:12 -07:00
dependabot[bot]
5ec274e740 Bump mockito-core from 2.26.0 to 3.8.0 (#2059)
Summary:
Bumps [mockito-core](https://github.com/mockito/mockito) from 2.26.0 to 3.8.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/mockito/mockito/releases">mockito-core's releases</a>.</em></p>
<blockquote>
<h2>v3.8.0</h2>
<p><!-- raw HTML omitted --><!-- raw HTML omitted --><em>Changelog generated by <a href="https://github.com/shipkit/shipkit-changelog">Shipkit Changelog Gradle Plugin</a></em><!-- raw HTML omitted --><!-- raw HTML omitted --></p>
<h4>3.8.0</h4>
<ul>
<li>2021-02-22 - <a href="https://github.com/mockito/mockito/compare/v3.7.18...v3.8.0">1 commit(s)</a> by Tim van der Lippe</li>
<li>Publish new minor version to Maven central [(<a href="https://github.com/mockito/mockito/issues/2213">#2213</a>)](<a href="https://github.com/mockito/mockito/pull/2213">mockito/mockito#2213</a>)</li>
</ul>
<h2>v3.7.18</h2>
<p><!-- raw HTML omitted --><!-- raw HTML omitted --><em>Changelog generated by <a href="https://github.com/shipkit/shipkit-changelog">Shipkit Changelog Gradle Plugin</a></em><!-- raw HTML omitted --><!-- raw HTML omitted --></p>
<h4>3.7.18</h4>
<ul>
<li>2021-02-15 - <a href="https://github.com/mockito/mockito/compare/v3.7.17...v3.7.18">1 commit(s)</a> by Ryan Tandy</li>
<li>Fixes <a href="https://github.com/mockito/mockito/issues/2204">#2204</a>: Ignore Groovy methods annotated with Internal [(<a href="https://github.com/mockito/mockito/issues/2207">#2207</a>)](<a href="https://github.com/mockito/mockito/pull/2207">mockito/mockito#2207</a>)</li>
<li>Groovy 3.0 internal methods are not ignored as they should be [(<a href="https://github.com/mockito/mockito/issues/2204">#2204</a>)](<a href="https://github.com/mockito/mockito/issues/2204">mockito/mockito#2204</a>)</li>
</ul>
<h2>v3.7.17</h2>
<p><!-- raw HTML omitted --><!-- raw HTML omitted --><em>Changelog generated by <a href="https://github.com/shipkit/shipkit-changelog">Shipkit Changelog Gradle Plugin</a></em><!-- raw HTML omitted --><!-- raw HTML omitted --></p>
<h4>3.7.17</h4>
<ul>
<li>2021-02-15 - <a href="https://github.com/mockito/mockito/compare/v3.7.16...v3.7.17">1 commit(s)</a> by dependabot[bot]</li>
<li>Bump junit from 4.13.1 to 4.13.2 [(<a href="https://github.com/mockito/mockito/issues/2205">#2205</a>)](<a href="https://github.com/mockito/mockito/pull/2205">mockito/mockito#2205</a>)</li>
</ul>
<h2>v3.7.16</h2>
<p><!-- raw HTML omitted --><!-- raw HTML omitted --><em>Changelog generated by <a href="https://github.com/shipkit/shipkit-changelog">Shipkit Changelog Gradle Plugin</a></em><!-- raw HTML omitted --><!-- raw HTML omitted --></p>
<h4>3.7.16</h4>
<ul>
<li>2021-02-11 - <a href="https://github.com/mockito/mockito/compare/v3.7.15...v3.7.16">1 commit(s)</a> by Rafael Winterhalter</li>
<li>Add API for clearing mocks. [(<a href="https://github.com/mockito/mockito/issues/2194">#2194</a>)](<a href="https://github.com/mockito/mockito/pull/2194">mockito/mockito#2194</a>)</li>
</ul>
<h2>v3.7.15</h2>
<p><!-- raw HTML omitted --><!-- raw HTML omitted --><em>Changelog generated by <a href="https://github.com/shipkit/shipkit-changelog">Shipkit Changelog Gradle Plugin</a></em><!-- raw HTML omitted --><!-- raw HTML omitted --></p>
<h4>3.7.15</h4>
<ul>
<li>2021-02-05 - <a href="https://github.com/mockito/mockito/compare/v3.7.13...v3.7.15">2 commit(s)</a> by dependabot[bot]</li>
<li>Bump versions.junitJupiter from 5.7.0 to 5.7.1 [(<a href="https://github.com/mockito/mockito/issues/2199">#2199</a>)](<a href="https://github.com/mockito/mockito/pull/2199">mockito/mockito#2199</a>)</li>
<li>Bump junit-platform-launcher from 1.7.0 to 1.7.1 [(<a href="https://github.com/mockito/mockito/issues/2198">#2198</a>)](<a href="https://github.com/mockito/mockito/pull/2198">mockito/mockito#2198</a>)</li>
</ul>
<h2>v3.7.14</h2>
<p><!-- raw HTML omitted --><!-- raw HTML omitted --><em>Changelog generated by <a href="https://github.com/shipkit/shipkit-changelog">Shipkit Changelog Gradle Plugin</a></em><!-- raw HTML omitted --><!-- raw HTML omitted --></p>
<h4>3.7.14</h4>
<ul>
<li>2021-02-05 - <a href="https://github.com/mockito/mockito/compare/v3.7.13...v3.7.14">1 commit(s)</a> by dependabot[bot]</li>
<li>Bump versions.junitJupiter from 5.7.0 to 5.7.1 [(<a href="https://github.com/mockito/mockito/issues/2199">#2199</a>)](<a href="https://github.com/mockito/mockito/pull/2199">mockito/mockito#2199</a>)</li>
</ul>
<h2>v3.7.13</h2>
<p><!-- raw HTML omitted --><!-- raw HTML omitted --><em>Changelog generated by <a href="https://github.com/shipkit/shipkit-changelog">Shipkit Changelog Gradle Plugin</a></em><!-- raw HTML omitted --><!-- raw HTML omitted --></p>
<h4>3.7.13</h4>
<ul>
<li>2021-02-04 - <a href="https://github.com/mockito/mockito/compare/v3.7.11...v3.7.13">2 commit(s)</a> by dependabot[bot]</li>
<li>Bump kotlin-stdlib from 1.4.21-2 to 1.4.30 [(<a href="https://github.com/mockito/mockito/issues/2196">#2196</a>)](<a href="https://github.com/mockito/mockito/pull/2196">mockito/mockito#2196</a>)</li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="900552416c"><code>9005524</code></a> Publish new minor version to Maven central (<a href="https://github.com/mockito/mockito/issues/2213">#2213</a>)</li>
<li><a href="8477455621"><code>8477455</code></a> Fixes <a href="https://github.com/mockito/mockito/issues/2204">#2204</a>: Ignore Groovy methods annotated with Internal (<a href="https://github.com/mockito/mockito/issues/2207">#2207</a>)</li>
<li><a href="c2488e0a2a"><code>c2488e0</code></a> Bump junit from 4.13.1 to 4.13.2 (<a href="https://github.com/mockito/mockito/issues/2205">#2205</a>)</li>
<li><a href="e88fe26110"><code>e88fe26</code></a> Add API for clearing mocks. (<a href="https://github.com/mockito/mockito/issues/2194">#2194</a>)</li>
<li><a href="3bffcd0e8f"><code>3bffcd0</code></a> Bump junit-platform-launcher from 1.7.0 to 1.7.1 (<a href="https://github.com/mockito/mockito/issues/2198">#2198</a>)</li>
<li><a href="632a0c829a"><code>632a0c8</code></a> Bump versions.junitJupiter from 5.7.0 to 5.7.1 (<a href="https://github.com/mockito/mockito/issues/2199">#2199</a>)</li>
<li><a href="43facffb68"><code>43facff</code></a> Bump versions.bytebuddy from 1.10.19 to 1.10.20 (<a href="https://github.com/mockito/mockito/issues/2195">#2195</a>)</li>
<li><a href="7745992ae9"><code>7745992</code></a> Bump kotlin-stdlib from 1.4.21-2 to 1.4.30 (<a href="https://github.com/mockito/mockito/issues/2196">#2196</a>)</li>
<li><a href="780cfc18b0"><code>780cfc1</code></a> Bump shipkit-changelog from 1.1.1 to 1.1.4 (<a href="https://github.com/mockito/mockito/issues/2190">#2190</a>)</li>
<li><a href="8a19d46c19"><code>8a19d46</code></a> Fixes <a href="https://github.com/mockito/mockito/issues/2154">#2154</a> : instrument java.lang.Object to fix toString invocations on inli...</li>
<li>Additional commits viewable in <a href="https://github.com/mockito/mockito/compare/v2.26.0...v3.8.0">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.mockito:mockito-core&package-manager=gradle&previous-version=2.26.0&new-version=3.8.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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

Reviewed By: passy

Differential Revision: D27230345

Pulled By: priteshrnandgaonkar

fbshipit-source-id: 2ecfcfa9a155ff2b14c41e913200e6056e9f60d1
2021-03-22 17:23:11 -07:00
dependabot[bot]
fbff840dcd Bump core from 0.5.0 to 0.13.0 (#2057)
Summary:
Bumps [core](https://github.com/facebook/screenshot-tests-for-android) from 0.5.0 to 0.13.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/facebook/screenshot-tests-for-android/releases">core's releases</a>.</em></p>
<blockquote>
<h2>0.13.0</h2>
<p><code>9e3b940</code> Tentative fix for <a href="https://github.com/facebook/screenshot-tests-for-android/issues/248">https://github.com/facebook/flipper/issues/248</a> (<a href="https://github.com/facebook/screenshot-tests-for-android/issues/249">https://github.com/facebook/flipper/issues/249</a>)
<code>49676c1</code> Make accessibility info for the screenshot an optional value (<a href="https://github.com/facebook/screenshot-tests-for-android/issues/250">https://github.com/facebook/flipper/issues/250</a>)</p>
<h2>0.12.0</h2>
<p><code>2af0200</code> Update to AGP 3.6
<code>6dedde3</code> Update gradle + wrapper to 6.2.x
<code>2b37d95</code> Add option to show screenshot difference in html report</p>
<h2>0.11.0</h2>
<p><code>e00973d</code> Remove use of indirect obsolete api usage
<code>4116c6a</code> Updated Gradle to 5.6.2
<code>4885a0e</code> Replaced use of a deprecated Gradle API (<a href="https://github.com/facebook/screenshot-tests-for-android/issues/231">https://github.com/facebook/flipper/issues/231</a>)
<code>de7f430</code> Adopt Contributor Covenant
<code>e897fe8</code> Added failureDir to record differences when verifying screenshots (<a href="https://github.com/facebook/screenshot-tests-for-android/issues/225">https://github.com/facebook/flipper/issues/225</a>)</p>
<h2>0.10.0</h2>
<p><code>4e054b0</code> Add accessibility evaluation to detect focusable views without any text to announce.
<code>25f3f4c</code> Force Litho to render in accessibility mode, and bump the metadata version number
<code>a919928</code> Move over to AndroidX
<code>fa4da40</code> Add AccessibilityUtil class with a data structure for the accessibility tree
<code>db3ef4e</code> Add the concept of a version to the metadata JSON file
<code>83d010d</code> Fix reference dir (<a href="https://github.com/facebook/screenshot-tests-for-android/issues/220">https://github.com/facebook/flipper/issues/220</a>)
<code>0b9e8e9</code> Fix screenshots on Android 8.0
<code>2cb4718</code> Support setting max height and width
<code>ff2a939</code> Fix <a href="https://github.com/facebook/screenshot-tests-for-android/issues/192">https://github.com/facebook/flipper/issues/192</a> ScreenshotsPluginExtension's addDeps parameter doesn't work
<code>f98a24e</code> Expose max pixels so we can adjust our view size if we exceed it.
<code>7826f9b</code> Zip up all the output screenshots so that the puller can pull them all at once</p>
<h2>0.9.0</h2>
<p><code>3983392</code> Loop over serials in ANDROID_SERIAL when pulling images (<a href="https://github.com/facebook/screenshot-tests-for-android/issues/140">https://github.com/facebook/flipper/issues/140</a>) (<a href="https://github.com/facebook/screenshot-tests-for-android/issues/214">https://github.com/facebook/flipper/issues/214</a>)
<code>81c8c53</code> Fix display text in the output html of a screenshot test
<code>c9a7646</code> Bump min sdk to 14
<code>f7a153c</code> Check for empty children when writing a hierarchy
<code>76d8cd1</code> Make tests run on devices with KitKat and earlier
<code>b9ea677</code> Add Accessibility Hierarchy to Screenshot Tests
<code>8ef0e18</code> Handle absence of Play Services (<a href="https://github.com/facebook/screenshot-tests-for-android/issues/203">https://github.com/facebook/flipper/issues/203</a>)
<code>fe98582</code> avoid the crash on processing an anonymous view (<a href="https://github.com/facebook/screenshot-tests-for-android/issues/200">https://github.com/facebook/flipper/issues/200</a>)
<code>dcb5e39</code> detailed error propagation for screenshot tests
<code>ded2077</code> Close ParcelFileDescriptor when done. (<a href="https://github.com/facebook/screenshot-tests-for-android/issues/195">https://github.com/facebook/flipper/issues/195</a>)
<code>d02e224</code> Catch API errors when showing current images in reports
<code>39b05df</code> Trigger onGlobalLayoutListener during screenshot tests
<code>7609a80</code> View before images when running screenshot tests locally
<code>7dba891</code> Correct multipleDevices flag default
<code>0f14f96</code> Add setMaxPixels to RecordBuilder interface (<a href="https://github.com/facebook/screenshot-tests-for-android/issues/189">https://github.com/facebook/flipper/issues/189</a>)</p>
<h2>0.8.0</h2>
<p><code>1411308</code> Add language feature to device name calculator
<code>fadd68c</code> Always use the same output directory for reports (<a href="https://github.com/facebook/screenshot-tests-for-android/issues/169">https://github.com/facebook/flipper/issues/169</a>)</p>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/facebook/screenshot-tests-for-android/blob/master/CHANGELOG.md">core's changelog</a>.</em></p>
<blockquote>
<h2>0.13.0 (Jul 8 2020)</h2>
<ul>
<li>Made accessibility node information optional</li>
<li>Bugfixes surrounding obtaining accessibility node information</li>
</ul>
<h2>0.12.0 (Mar 4 2020)</h2>
<ul>
<li>Added the ability to generate a diff between the old version of a screenshot and the new output in the html report. Currently only works with a configured test image API</li>
<li>Added support for AGP 3.6 + Gradle 6.2.x</li>
</ul>
<h2>0.11.0 (Oct 17 2019)</h2>
<ul>
<li>Replaced direct usages of deprecated Gradle APIs</li>
<li>Adopted the Contributor Covenant</li>
<li>Added <code>failureDir</code> which saves the expected, actual and diff images of each failing test when verification fails.</li>
</ul>
<h2>0.10.0 (Jun 11 2019)</h2>
<ul>
<li>Added batch downloading of screenshot images instead of pulling individual files</li>
<li>Added Accessibility hierarchy information</li>
<li>Added ability to specify max sizes for images</li>
<li>Fixed addDeps functionality parameter in the plugin</li>
<li>Fixed referenceDir functionality in the plugin</li>
<li>Fixed an issue on Samsung devices where a crash would occur when faking a WindowAttachment</li>
<li>Migrated to AndroidX</li>
</ul>
<h2>0.9.0 (Apr 1 2019)</h2>
<ul>
<li>Added a setMaxPixels method to the record builder interface to allow for really large images</li>
<li>Added an integration point to allow you to see a version of the given screenshot from a server provided service</li>
<li>Fixed an issue where onGlobalLayoutListener wasn'nt being triggered properly</li>
<li>Fixed an issue where a parcel file descriptor wasn't being closed</li>
<li>Added the ability to dump the accessibility hierarchy</li>
<li>Min SDK has been bumped to 14</li>
<li>Added the ability to run tests on all connected targets</li>
</ul>
<h2>0.8.0 (Jul 30 2018)</h2>
<ul>
<li>Replaced androidTestApi with androidTestImplementation when adding in core dependency via the plugin</li>
<li>Fixed a bug where requesting focus prior to being attached to a Window would crash</li>
<li>Added the ability to customize the max pixel size restriction</li>
<li>Moved generated report to build/ instead of /tmp</li>
<li>Added language to the device name calculation for multiple devices</li>
</ul>
<h2>0.7.0 (Apr 19 2018)</h2>
<ul>
<li>Added the ability to retrieve the resulting Bitmap for custom use on your RecordBuilder</li>
<li>Removed the runtime dependency on Dexmaker, this will resolve any issues of using frameworks such as Mockito in your screenshot tests</li>
<li>Added a a check to fail when resultant screenshots are extremely large</li>
<li>Rewrote the client plugin to provide screenshot test tasks per applicable variant</li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="8a99f25684"><code>8a99f25</code></a> 0.13.0</li>
<li><a href="80aa7b47d2"><code>80aa7b4</code></a> Fix expected output of integrationTest task</li>
<li><a href="9e3b940e7d"><code>9e3b940</code></a> Tentative fix for <a href="https://github.com/facebook/screenshot-tests-for-android/issues/248">https://github.com/facebook/flipper/issues/248</a> (<a href="https://github.com/facebook/screenshot-tests-for-android/issues/249">https://github.com/facebook/flipper/issues/249</a>)</li>
<li><a href="28dcef98d8"><code>28dcef9</code></a> Fix AX output</li>
<li><a href="49676c1eae"><code>49676c1</code></a> Make accessibility info for the screenshot an optional value (<a href="https://github.com/facebook/screenshot-tests-for-android/issues/250">https://github.com/facebook/flipper/issues/250</a>)</li>
<li><a href="8d8ee23b9a"><code>8d8ee23</code></a> Prepare next development version</li>
<li><a href="805a93fdf2"><code>805a93f</code></a> 0.12.0</li>
<li><a href="2af0200ea7"><code>2af0200</code></a> Update to AGP 3.6</li>
<li><a href="6dedde3f82"><code>6dedde3</code></a> Update gradle + wrapper to 6.2.x</li>
<li><a href="c7a4c8b02d"><code>c7a4c8b</code></a> Update Litho, Kotlin, AndroidX and material components</li>
<li>Additional commits viewable in <a href="https://github.com/facebook/screenshot-tests-for-android/compare/v0.5.0...0.13.0">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.facebook.testing.screenshot:core&package-manager=gradle&previous-version=0.5.0&new-version=0.13.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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

Reviewed By: passy

Differential Revision: D27230350

Pulled By: priteshrnandgaonkar

fbshipit-source-id: d602e7dda009f892cb24ed660db09aebc371912a
2021-03-22 17:23:11 -07:00
dependabot[bot]
afa98856e7 Bump @types/rsocket-core from 0.0.5 to 0.0.6 in /desktop (#2073)
Summary:
Bumps [types/rsocket-core](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/rsocket-core) from 0.0.5 to 0.0.6.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/rsocket-core">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@types/rsocket-core&package-manager=npm_and_yarn&previous-version=0.0.5&new-version=0.0.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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

Reviewed By: passy

Differential Revision: D27230092

Pulled By: priteshrnandgaonkar

fbshipit-source-id: f98022c5c002a415b705d6833844b341882c2657
2021-03-22 16:53:00 -07:00
Michel Weststrate
e1b12bbcf7 Update to react-native 0.64 and enable Hermes
Summary:
allow-large-files

Per title. hermes enabled so that we can verify the hermes debugger works.

Reviewed By: passy

Differential Revision: D27229331

fbshipit-source-id: c2e45151b9d2097edc7e79f54eb89f9d110899d6
2021-03-22 10:26:07 -07:00
Michel Weststrate
ea0cc7f15b Update to Immer 9 for better type inference
Summary: Per title

Reviewed By: passy

Differential Revision: D27202660

fbshipit-source-id: 074c44275a93c3fb35d2f491b51d82aa9792dd70
2021-03-22 06:25:04 -07:00
Michel Weststrate
8f90deda55 Minor UI improvements
Summary:
Addresses feedback from: https://github.com/facebook/flipper/issues/2076

- fix filtering non-string columns
- fix overflow in filter dropdown
- hide app column on all devices
- show pid column on android, to simplify filtering per app

Reviewed By: passy

Differential Revision: D27188458

fbshipit-source-id: b6180fb5a8d0a47e50dd5dc3533da3ff1b0a1a2e
2021-03-19 08:59:12 -07:00
Michel Weststrate
c648c58825 Support RegEx search
Summary:
Changelog: Restored the possibility to use Regex in logs search

Fixes:
https://github.com/facebook/flipper/issues/2076
https://fb.workplace.com/groups/flipperfyi/permalink/912753022824327/

Reviewed By: passy

Differential Revision: D27188241

fbshipit-source-id: 38ae2972c7dd3dd5cf24df87535d5ad74598cd88
2021-03-19 08:59:11 -07:00
Pascal Hartig
2ae7d13a64 Strip application path from stack traces
Summary:
Stacktraces right now always contain the `/home/$USER/.cache/flipper-launcher/v1.2.3/...` (or equivalent)
which makes deduping and reading harder. This strips the paths.

Reviewed By: mweststrate

Differential Revision: D27130251

fbshipit-source-id: c0e8d5eb1575c6269d49a6aee0e8a5e93996d223
2021-03-19 07:31:34 -07:00
Rubén Norte
28480ac891 Format Metro log messages using printf format
Summary:
In browsers and Node.js, console methods accept a printf format string as a first argument:

```
console.log('Hello %s', 'world');
//> Hello world
```

This is not currently supported in Flipper, which just renders the log messages as they come from Metro (as an array of values, most often strings).

This adds support for it in Flipper by using the `util.format` function from Node.js (which is the same method used by the console under the hood).

It is implemented in Flipper and not in Metro so we have the flexibility to format the values as we want in the future (e.g.: numbers with a specific color).

Reviewed By: yungsters, mweststrate

Differential Revision: D27154864

fbshipit-source-id: e807b67900ddaf3a7e8cd86795589bed088beecd
2021-03-19 04:01:56 -07:00
Anton Nikolaev
bb827f14ea Normalize import path
Summary: Just a small fix to normalise import path to make typescript happy when this code is located in "flipper" folder (e.g. after installing "flipper" package as dependency) rather than "app" folder.

Reviewed By: jknoxville

Differential Revision: D27156167

fbshipit-source-id: 24495d6b1a756b20fadf62eec18bfe6665eb78e2
2021-03-18 08:17:12 -07:00
Pascal Hartig
9b44305f1c Remove logger dependency
Summary:
Found that one of the parameters wasn't used for anything making
it harder to make sense of the construct and test it.

Reviewed By: nikoant

Differential Revision: D27117591

fbshipit-source-id: f4c796dd37b0bd75497710fb9f88c923181f90e1
2021-03-18 05:45:28 -07:00
Pascal Hartig
414dd4d5ff Demote errors in crash reporter
Summary:
Not fatal errors and actually very, very high-firing. Something about
the serialisation here is wrong so I can't tell the exactly number right now.

Reviewed By: priteshrnandgaonkar

Differential Revision: D27117067

fbshipit-source-id: d9ce8c736ca2228acedeadeb2e7ee6744d766265
2021-03-18 05:45:28 -07:00
Pascal Hartig
f04c8e8e2c Small optimisations
Summary: We're passing around PathBufs where Paths are enough and more efficient.

Reviewed By: fabiomassimo

Differential Revision: D27155300

fbshipit-source-id: cdf8d67e28a669130482d333c960d100bdaf0992
2021-03-18 05:12:43 -07:00
Pascal Hartig
844c3e3a1c Update packlist for Linux
Summary:
Electron 12 renamed one .so and broke the build.
Time to implement T83339637.

Reviewed By: fabiomassimo

Differential Revision: D27155174

fbshipit-source-id: a034f79cacb5c27b62cc6b51c9899a3d3a227954
2021-03-18 05:12:43 -07:00
Pascal Hartig
62c1c10056 Upgrade deps
Summary: Just bumping everything before making changes as ever.

Reviewed By: fabiomassimo

Differential Revision: D27155175

fbshipit-source-id: b6bce17e55e62b901be710099a43b1185e893ed8
2021-03-18 05:12:43 -07:00
Pascal Hartig
81252edf33 Upgrade to Electron 12.0.1
Summary: Changelog: Upgraded to Electron 12.0.1

Reviewed By: fabiomassimo

Differential Revision: D27084184

fbshipit-source-id: 5d45c632f7fec78635287f1919ef1cf0b2b458ad
2021-03-17 16:32:39 -07:00
Anton Nikolaev
f468f0e07d Produce tsc typings for "flipper" package
Summary: This diffs refactors tsc projects structure and structure of our custom typings to allow producing typescript typings for "flipper" package. In next diffs I'm going to use the produced typings to check compatibility of plugins with certain versions of Flipper, e.g. to check whether plugin is compatible with current "stable" and "insiders" version.

Reviewed By: passy

Differential Revision: D26997158

fbshipit-source-id: a0416c7139bf08ec9d175730da4c4c2a8768eeb7
2021-03-17 14:03:38 -07:00
generatedunixname89002005306973
779e89db1d Flipper Snapshot Bump: v0.81.1-SNAPSHOT
Summary: Releasing snapshot version 0.81.1-SNAPSHOT

Reviewed By: priteshrnandgaonkar

Differential Revision: D27114448

fbshipit-source-id: badb996da2603a1b1ecaaa87598b8a997e000aa3
2021-03-17 04:48:28 -07:00
generatedunixname89002005306973
0293a2a5fb Flipper Release: v0.81.0
Summary: Releasing version 0.81.0

Reviewed By: priteshrnandgaonkar

Differential Revision: D27114449

fbshipit-source-id: bcf89ccb61aedc7413d4031da42b10971e3808fa
2021-03-17 04:48:28 -07:00
Michel Weststrate
4f70219a47 Dispose iOS logs if logs plugin is not connected
Summary: See D27047041 (d293b2b0e5) for more details. This diff makes sure the log listener is disposed if the Logs plugin is disabled / the logging is paused, rather than keeping the connection open all time.

Reviewed By: nikoant

Differential Revision: D27083966

fbshipit-source-id: 6f157c237519a0fde9591f1c2033621858863de0
2021-03-16 20:11:12 -07:00
Michel Weststrate
9d3c48fd84 Logs2 -> Logs
Summary:
Use Logs2 plugin now as the default logs plugin (by overwriting it).

See the rest of this stack

Changelog: The device logs plugin has been fully rewritten. It is faster and more reponsive, formats urls and json, and supports line wrapping and text selection. Beyond that it is now possible to sort and filter on all columns and pause and resume the log stream.

Reviewed By: nikoant

Differential Revision: D27048528

fbshipit-source-id: e18386fec6846ac3568f33a3578f4742213ecaca
2021-03-16 15:03:49 -07:00
Michel Weststrate
d293b2b0e5 Dispose adb logcat connection if there are no listeners
Summary:
Flipper used to always subscribe to the adb logs. This change makes the log subscription lazy, which means if there are no plugins listening to the logs, we don't subscribe to the adb logs at all. As you can see in the recording (prod build) this lowers CPU usage significantly: without logs plugin disabled it is now ~5-8 %, with the plugin enabled ~12-18%. Before this change we would never stop listening to the log output, even when the plugins were disabled, causing a constant background noise which people complain regularly about.

The pause / resume button in the new log plugin will now cleanup the connection as well, so that a simple 'pause' click will already boost performance, without needing to disable the logs plugin (if crash reporter is not enabled)

In this diff we also will clear the logs when reconnected. Previously we didn't reset the logs after connecting, we means Flipper would try to gets up with all past logs first, which could be a few 100 K entries.

Further future optimizations could involve using logcat smarter; by actually passing filters on app or loglevel to the command (not sure if that is actually faster, or just a convenience api that does the same filtering as we do)

Changelog: Flipper will now use less CPU if logs & crash reporter plugins are disabled by no longer tailing adb logcat.

Reviewed By: nikoant

Differential Revision: D27047041

fbshipit-source-id: 251a04dcc6f488f220cb56fe50a26788d795e38c
2021-03-16 15:03:48 -07:00
Michel Weststrate
de92495f04 Table optimizations
Summary:
Performance fine tuning.

Did some performance fine-tuning primarily by creating a production build, and verifying the responsiveness of searching, tailing etc in the logs plugin while generating a lot of load, and finetuned based on that. For example stopped using requestAnimationFrame which is too sensitive of starving Flipper under high load, as it doesn't leave room for other events to be processed. Also made scrolling smoother by making an append 'high prio' update while taililng.

Also debounced changing the (search) filters, as that is an expensive operation we don't want to trigger on every key press

Reviewed By: passy

Differential Revision: D27046726

fbshipit-source-id: c3efe59eb26e2d9e518325d85531a0e4a6b245ca
2021-03-16 15:03:48 -07:00
Michel Weststrate
6a30899803 Kill onRegisterDevice
Summary: `onRegisterDevice` device abstraction was only used by the CrashReporterPlugin, and since with Sandy plugin lifecycles every plugin can do 'on-load' logic, we don't need it anymore.

Reviewed By: priteshrnandgaonkar

Differential Revision: D27046711

fbshipit-source-id: 16c567c60ed29a50017d525a2b707ee696a99e62
2021-03-16 15:03:48 -07:00
Michel Weststrate
87c5fab607 Convert crash reporter plugin to Sandy (non UI only)
Summary:
This diff converts the CrashReporter plugin to Sandy. The main driver is that it allows us to fix the connection management of logs in a next diff.

There are few changes to highlight:
* A bunch of the old unit tests are removed, as they primarily verified that persistedState abstraction works, a concept that doesn't exist anymore with Sandy (as a result all the logic in error handling and crash reporter plugin has become a lot more trivial as well)
* Added additional unit tests to verify that the integration with notifications from Sandy, and the integration of crashes in combination with CrashReporter plugin works (this wasn't the case before)
* Plugin errors were always suppressed in production builds of Flipper. However, that makes error reporting pretty pointless in the first place, so enabled it by default, but made it a setting in case this results in too many errors suddenly.
* The integration with clicking OS crash notification -> bringing the user to a sensible place _doesn't_ work, but it didn't work before this diff either, so will address that later
* This doesn't upgrade the Crash reporter UI to sandy yet, will do that later in a separate diff

Changelog: Crash reporter will now report errors triggered from the device / client plugins by default. This can be disabled in settings.

Reviewed By: priteshrnandgaonkar

Differential Revision: D27044507

fbshipit-source-id: 8233798f5cce668d61460c948c24bdf92ed7c834
2021-03-16 15:03:48 -07:00
Michel Weststrate
7093a932f8 expose client.writeTextToClipboard
Summary: per title

Reviewed By: priteshrnandgaonkar

Differential Revision: D27044508

fbshipit-source-id: 8af99f66ec8203b76ccb3d880e1a184193a389c7
2021-03-16 15:03:48 -07:00
Michel Weststrate
4e2383cdb0 Introduce showNotification API
Summary: Introduced `showNotifcation` to the Sandy API.

Reviewed By: jknoxville

Differential Revision: D27012001

fbshipit-source-id: d3f237910a478400b0f925f0362af485c96072bb
2021-03-16 15:03:47 -07:00
Michel Weststrate
2ca52f81d2 Introduce pluginKey
Summary: Exposed the `pluginKey` to sandy plugins (which we will use later for storing table preferences per plugin). And a little moving code around because circular deps problem roared its ugly head again.

Reviewed By: nikoant

Differential Revision: D27009721

fbshipit-source-id: 7ad29e72ff8028c9daae270c4749b657bd8ff049
2021-03-16 15:03:47 -07:00
Michel Weststrate
be25df6490 Documented createDataSource, DataSource & DataSourceView
Summary: Per title

Reviewed By: nikoant

Differential Revision: D26978363

fbshipit-source-id: b3cfeda0fb0f6556e1ba9041325ae080cba69a7b
2021-03-16 15:03:47 -07:00
Michel Weststrate
602152665b Split DataSource & DataSourceView
Summary:
This diff is primarily cosmetic, just pushing code around to make the API more intuitive. Most importantly, DataSource was split into DataSource and DataSourceView classes, the latter being accessible through `datasource.view`.

The benefit of this is two fold:
1. Conceptually it is much clearer now which operations operate on the _source_ records, and which ones on the derived _view_.
2. This will make it easier in the future to support multiple views to be based on a single data source.

This refactoring also nicely found 2 cases where datasource logic and view logic were mixed.

The only semantic change in this diff is that both DataSource and DataSourceView are now iterable, so that one can do a `for (const record of ds)` / `for (const record of ds.view)`

Reviewed By: nikoant

Differential Revision: D26976838

fbshipit-source-id: 3726e92b3c6ee3417dc66cbbe6e288797eecf70e
2021-03-16 15:03:47 -07:00
Michel Weststrate
d73f6578a7 Support linkify-ing urls
Summary:
Changelog: The new logs plugin will linkify urls and pretty print json-like messages

This implements one of our top papercuts (see linked task), and the WP request over here: https://fb.workplace.com/groups/flipperfyi/permalink/902949260471370/. Partially addresses

https://github.com/facebook/flipper/issues/1162
https://github.com/facebook/flipper/issues/1010
https://github.com/facebook/flipper/issues/2029

Reviewed By: nikoant

Differential Revision: D26947007

fbshipit-source-id: be0fdb476765905ae6b63bd8799c9c6093014de3
2021-03-16 15:03:47 -07:00
Michel Weststrate
66774c90c6 Added support for serialization
Summary: Make sure that DataSources can be serialized directly with a single setting, just like plain state atoms

Reviewed By: nikoant

Differential Revision: D26944954

fbshipit-source-id: 2b0d625d7d67f27a7c2e33dd7c4b534dfa4d3e82
2021-03-16 15:03:46 -07:00
Michel Weststrate
dd4cf9cb4a Optimize shift & process some todo's
Summary:
Noticed in the previous diff that shift is relatively slow for sorted datasources, the reason is that it needs to do a lot of binary searches, and binary search / sorting a full data set is roughly ~20 times slower than resorting a full set, and we're dropping 10% of the data in our test. So if we are shifting too many items in a sorted set, we instead fall back to a rebuild (for non-sorted, shift is super fast because we only drop a bunch of items from the start).

Also solved some more perf related todo's, or made notes about them.

Reviewed By: nikoant

Differential Revision: D26913144

fbshipit-source-id: ee1c04fda1730653affdede0ad22da795e19c2af
2021-03-16 15:03:46 -07:00
Michel Weststrate
bb20c7fd00 Implemented perf tests
Summary:
Added some performance tests for DataSource. Currently simply using jest to run them in a single run, so that is not the most isolated setup (we do GC between tests), but helps to find some global trends at least.

For every scenario two datasets are used, one of 100.000 items, and one of 200.000 items, to verify that all important functions scale roughly linearly or better.

The `append` and `update` test cases perform 1000 insertions / updates. All other tests are singular.

The keyed vs unkeyed variation verifies that we don't drop performance if we maintain a by-key lookup table.

The sorted variations start with an initially already sorted and filtered setup. This nicely show that the datasource really starts to shine with its insertion sort versus full reallocating and sorting

The reference fake implementation does what we do in most cases in Flipper: shallow clone and allocate an entirely new array to append / update data to preserve immutability. Its comparison is pretty terribly, especially considering that in the perf tests we 'render' only once, skewing the stats in favor of the fake implementation: only at the end of the entire batch of updates we sort & filter once (so after inserting a thousand items for example).

In contrast the datasource tests will keep its data sorted at all times, so 'rendering' is already included in the measurements. For the fake datasource, resorting the full 200K rows after each insert would pretty much put bitcoin caused global warming to shame. Also note that the increased GC pressure isn't incorporated in the fake implementation, as we GC outside the measurements.

Reviewed By: nikoant

Differential Revision: D26913145

fbshipit-source-id: 955f1923dce40997cd2e81ea9e80832c6e71c99c
2021-03-16 15:03:46 -07:00
Michel Weststrate
2a3458aff8 Implemented shift operation and limit option
Summary: This diff implements the shift operation, which removes (efficiently) the first (oldest) N records from the datasource. Also implemented a `limit` option to truncate automatically and limit memory usage

Reviewed By: nikoant

Differential Revision: D26883673

fbshipit-source-id: c5ebaf2a327d56cbbe38280c6376c833bcf68b8c
2021-03-16 15:03:46 -07:00
Michel Weststrate
564d440b4a Implemented remove operation
Summary: Implemented `remove`, which, for a typical data source should not be needed. But that would be famous last words and wanted to prevent painting ourselves in a corner, so implemented it. Also because part of the logic is need for the `shift` operation (see next diff), which is much more important.

Reviewed By: priteshrnandgaonkar

Differential Revision: D26883672

fbshipit-source-id: 0dbfcdd3d5a16c4a2d53b0272000d183c67d0034
2021-03-16 15:03:45 -07:00
Michel Weststrate
a610c821d3 Store preferences and scrolling, refactor to useReducer
Reviewed By: priteshrnandgaonkar

Differential Revision: D26848266

fbshipit-source-id: 738d52556b9fb65ec5b5de7c727467227167b9b9
2021-03-16 15:03:45 -07:00
Michel Weststrate
55981b5259 Introduce pause button
Summary: ..and some earlier reviews comments has been processed + some fine tuning on the ui

Reviewed By: priteshrnandgaonkar

Differential Revision: D26816559

fbshipit-source-id: adf2586763be185ee8e7cc22b2827ecefe4e4cab
2021-03-16 15:03:45 -07:00
Michel Weststrate
525e079284 Implement deeplink, creating pastes, log deduplication
Summary:
This diff implements the remaining features in the logs plugin:

- deeplinking
- merging duplicate rows

The logs plugin source code has now been reduced from originally `935` to `285` LoC. All optimisation code has been removed from the plugin:

* debouncing data processing
* pre-rendering (and storing!) all rows

Finally applied some further styling tweaks and applied some renames to DataTable / DataSource + types finetuning. Some more will follow.
Fixed a emotion warning in unit tests which was pretty annoying.

Reviewed By: passy

Differential Revision: D26666190

fbshipit-source-id: e45e289b4422ebeb46cad927cfc0cfcc9566834f
2021-03-16 15:03:45 -07:00
Michel Weststrate
dec8e88aeb Add row styling
Summary:
Added styling / coloring to the new logs plugin, to bring it closer to feature completeness. Made the colum headers slightly more compact

Also made the API more foolproof by introducing the `useAssertStableRef` hook, that will protect against accidentally passing in props that would invalidate rendering every time.

Reviewed By: passy

Differential Revision: D26635063

fbshipit-source-id: 60b2af8db3cc3c12d8d25d922cf1735aed91dd2c
2021-03-16 15:03:45 -07:00
Michel Weststrate
a3b3df639b Show feedback if there are no records visible
Summary:
Per title. Give the user some feedback on why he doesn't see any records (filtering to aggressive vs there are simply no records).

Fixes the old Flipper behavior where tables are merely empty, which always looks kinda broken to me. (Didn't it work, or is there nothing?)

Reviewed By: nikoant

Differential Revision: D26611173

fbshipit-source-id: 7ac798bd7d5c31f6d9fbacf30c6727d2e0e94570
2021-03-16 15:03:44 -07:00
Michel Weststrate
59e6c98669 User experience improvements
Summary:
This diff has some jak-shaving UX improvements after playing with the DataTable a bit more:

Selection
* deselecting a row from a larger set will make the last selected item the default selection
* re-selecting an item in a single selection will unselect it

Column Filtering
* Introduced button to toggle between filtering on all, nothing, and the values present in the current selection

Column sorting
* The up / down arrows are now inidividually clickable, rather than action as a general toggle
* Title still works as a general toggle between asc / desc / not sorted

Context menu
* I found the context menu for column selection and on the selected rows itself a bit finicky to find and click and not super intuitive for noob users. Merged both menus instead into a single hamburger menu adjacent to the search bar

Reviewed By: passy

Differential Revision: D26580038

fbshipit-source-id: 220f501a1d996acbd51088c08ea866caed768572
2021-03-16 15:03:44 -07:00
Michel Weststrate
59a1327261 Introduce multi selection
Summary:
Make sure DataTable supports multiselection, which works largely the same as before, with a few changes

* shift + click and ctrl + click work as expected
* shift + keyboard navigation works as expected
* drag selection works as expected
* drag selection when dragging accross screens, or Shift icmw with HOME / END / PageUp / PageDown works as expect
* text selection stil works as expected

The context menu items have been updated as well
* filter will filter on all the distinct values in the selection
* copying cells will copy all cells of the given column in the selection, separated by newline
* copying rows / creating a past will create a json array of the selection

Not done yet

- Shifting the selection after inserting rows hasn't been implemented yet
- I'm not entirely happy with the context menu trigger, maybe a hamburger button in the toolbar will be better

Reviewed By: nikoant

Differential Revision: D26548228

fbshipit-source-id: 5d1cddd6aad02ce9649d7980ab3a223e222da893
2021-03-16 15:03:44 -07:00
Michel Weststrate
5c3a8742ef Introduce context menu
Summary:
Introduced a context menu for DataTable with some default options. Opted to put it under a visible hovered dropdown instead of on right-click, since this better alings with Ant's design guides (we don't have context clicks anywhere else I think), but if it isn't convincing we can still change it.

Included some default actions, to set up quick filters, and to copy values. For copying rows, implemented it to by default take the JSON from a row, rather than space separated values like in ManagedTable, as many existing plugins customize the onCopy handler to just do that, so it seemed like a better default since it is a richer format. If there are good use cases for the previous behavior, we'll probably find out after the old release :)

Introduced utility to copy text to clipboard in FlipperLib, but decoupled it from Electron.

Didn't include multi select yet, that will be done in a next diff.

Reviewed By: nikoant

Differential Revision: D26513161

fbshipit-source-id: b2b1b20b0a6f4ada9de2566bf6b02171f722c4aa
2021-03-16 15:03:44 -07:00
Michel Weststrate
11eb19da4c Introduce column filters
Summary:
Beyond a search across all columns, it is now possible to specific columns for specific values:

* for a row to be visible, all active column filters need to be matched (e.g. both a filter on time and app has to be satisfied)
* if multiple values within a column are filtered for, these are -or-ed.
* if no value at all within a column is checked, even when they are defined, the column won't take part in filtering
* if there is a general search and column filters, a row has to satisfy both

Filters can be preconfigured, pre-configured filters cannot be removed.

Reseting will reset the filters back to their original

Move `useMemoize` to flipper-plugin

Merged the `ui/utils` and `utils` folder inside `flipper-plugin`

Reviewed By: nikoant

Differential Revision: D26450260

fbshipit-source-id: 11693d5d140cea03cad91c1e0f3438d7b129cf29
2021-03-16 15:03:44 -07:00
Michel Weststrate
8aabce477b Introduce range finder
Summary: Show a hint during scrolling of the relative offset the user is looking at. This is based on the current virtualisation window, so not 100% accurate, but probably still provides the right signal to the user. See the bottom right of the recording

Reviewed By: nikoant

Differential Revision: D26450261

fbshipit-source-id: 206a860024e346c6b872edc3fc7919019046a6d7
2021-03-16 15:03:44 -07:00
Michel Weststrate
1ce665ceaf Added selection / keyboard navigation
Summary: per title

Reviewed By: nikoant

Differential Revision: D26368673

fbshipit-source-id: 7a458e28af1229ee8193dfe2a6d156afd9282acd
2021-03-16 15:03:43 -07:00