Commit Graph

265 Commits

Author SHA1 Message Date
Michel Weststrate
489dd1521e Make sure Sandy Devices Plugins are loaded in Flipper devices
Summary:
This diff makes sure that devices will actually instantiate applicable sandy device plugins. Similar to how client plugins are owned by Client, device plugins are directly owned by BaseDevice, which significantly simplifies life cycle management and doesn't dispatch updates to all Redux connect components whenever something irrelevant changes.

Also made sure `device.teardown()` is called. That API already existed, but wasn't used or implemented before.

Updated Flipper test utils to support testing device plugins as well (both Sandy and classic ones)

Reviewed By: passy, nikoant

Differential Revision: D22693929

fbshipit-source-id: 73b2b8666ef7a0e748ea89360db84734d37eb5be
2020-08-04 07:08:31 -07:00
Michel Weststrate
1e956e1bf5 Make sure Sandy Device Plugins can be unit testsed
Summary: Add unit tests to verify that the unit test utilities for for Sandy device plugins work as expected. Fixed a bug revealed by that and cleaned up some TODO's

Reviewed By: jknoxville, passy, nikoant

Differential Revision: D22693928

fbshipit-source-id: 93162db19d826d0cd7f642cef1447fd756261ac8
2020-08-04 07:08:31 -07:00
Michel Weststrate
91ed4e31c0 Introduce DevicePlugin APIs
Summary:
This stack introduces Sandy device plugins, they are quite similar to normal plugins, but, a devicePlugin module is organized as

```
export function supportsDevice(device): boolean

export function devicePlugin(devicePluginClient)

export function Component
```

Device plugins get access to the device meta data and can subscribe to the `onLogEntry` callback and `onDestroy` lifecycle.

They will be able to store state just as normal plugins, but can't send or receive methods, so devicePluginClient is a bit limited.

This diff only sets up most of the new data structures, and makes sure everything still compiles and no existing tests fail.

To prevent this diff from becoming to big, actually loading, rendering and testing device plugins will be done in next diffs

Please take a critical look at the api proposed and the (especially) the public names used :)

Reviewed By: passy, nikoant

Differential Revision: D22691351

fbshipit-source-id: bdbbd7f86d14b646fc9a693ad19f33583a76f26d
2020-08-04 07:08:31 -07:00
generatedunixname89002005306973
f01b84be27 Flipper Release: v0.52.0
Summary: Releasing version 0.52.0

Reviewed By: passy

Differential Revision: D22921075

fbshipit-source-id: 4cab9552dcd5ff1a64d20e1e771a4f5173d54860
2020-08-04 06:15:23 -07:00
Michel Weststrate
c802215dd2 Make most text selectable
Summary:
Fix long standing issue where text by default in Flipper is not selectable. Which is super annoying when working with tables, trying to copy error messages, etc etc. Wanted to fix it with ant.design, but got so annoyed by not being able to select an error I needed, that I fixed it now :-P.

This diff makes all text selectable by default, and then bails out for specific elements, like section headers, button captions, the left toolbar (navigation) and top toolbar to preserve the desktop app look & feel.

Fixes a popular papercut issue

Changelog: All text is now selectable by default in Flipper.

Reviewed By: passy

Differential Revision: D22897793

fbshipit-source-id: 7bc50a987e012595956c07d1997959a5480790aa
2020-08-04 03:06:13 -07:00
Nicole Stiliyan Vukadinova
a37d48d67e Fix the inconsistency in the timestamps for markerStart and markerEnd
Summary: There was in inconsistency in the timestamps used for markerStart and markerEnd, resulting in negative duration being reported in the Scuba table.

Reviewed By: nubbel

Differential Revision: D22791255

fbshipit-source-id: a4a16c6583974a0423b12805fb8d1a22af44cf5c
2020-07-28 07:22:38 -07:00
generatedunixname89002005306973
5dc98bab9d Flipper Release: v0.51.0
Summary: Releasing version 0.51.0

Reviewed By: nikoant

Differential Revision: D22728768

fbshipit-source-id: 49eabdccc7fd335401618f91b890e94fda11b23f
2020-07-24 10:03:20 -07:00
Anton Nikolaev
323c9d25d4 Fix layout of error and doctor bars
Summary: Changelog: Fixed layout of doctor and error bars which was broken in version 50

Reviewed By: mweststrate

Differential Revision: D22692069

fbshipit-source-id: 43d779656d30675b785eab67d6b7dcca4471653f
2020-07-24 08:33:07 -07:00
John Knox
9ada27526c Change RatingButton to use Popover2
Summary:
The original Popover component doesn't work when the popover goes out of bounds of the current container, and overflow is not visible, which is the case in the title bar.

This changes it to use a new absolutely positioned one instead.

Reviewed By: mweststrate

Differential Revision: D22724110

fbshipit-source-id: f41b6d154ccb66a94b63533fe9c30d2a2c49f1db
2020-07-24 07:13:28 -07:00
John Knox
d7a6356fb6 Add Popover2 component
Summary:
The current Popover component isn't compatible with the new (in progress) component library because it relies on overflowing container elements, which isn't allowed in the generic Layout component.

So this is a new Popover element, which uses absolute positioning instead. It takes heavy inspiration from the Tooltip and TooltipProvider components which do a similar thing.

Still to do:
[x] Edge cases when popover would be near a window edge
[x] Style it to look nice
[x] Split the use case (RatingButton) changes into a separate diff
[x] When the location of the popover container moves (the rating button in this case, e.g. if you resize the window), it doesn't currently cause the effect function in the popover, so it doesn't get moved when it should
[x] Add a little pointer thingy like a speech bubble
[x] Make sure it's perfectly positioned
[ ] Rename it to Popover and delete the old one. Not done, since it's just a stopgap.

Reviewed By: mweststrate

Differential Revision: D22693105

fbshipit-source-id: bc141433914bc20da48f8ae96764a95f7cd74ce5
2020-07-24 07:13:28 -07:00
Anton Nikolaev
ce180a106f Log login success rate
Summary: Report login success rate

Reviewed By: mweststrate

Differential Revision: D22698005

fbshipit-source-id: 5f02a2ddaaf54acc564d09a5f781ed649ae8a3e6
2020-07-24 02:46:32 -07:00
Dominik Wielgórski
6561bc8f16 Added connection between InAppErrorReporter and Flipper Desktop App via Layout Plugin
Summary:
Created functionality which allows user to open clicked file from inAppErrorReporter.
Created "iface" interface for openInIDE API and created default implementation which indicates that openInIDE is not supported.
Created "impl" implementation specifically for fb4a.

Reviewed By: arpitratan

Differential Revision: D22642497

fbshipit-source-id: 7b3011c128a479e556b869fcc8c4147e153caf71
2020-07-23 13:47:09 -07:00
Elaina Hsu
9e4c5363c5 Deep-linking records to other strong records in the Store tab
Summary: All strong records with a matching record available in the store tab are underlined. When clicked on, it will direct the user to the corresponding store record.

Reviewed By: jonathoma

Differential Revision: D22622612

fbshipit-source-id: 537dbb282e4ae1ff695c577ab47c413d41a10fa4
2020-07-23 09:14:56 -07:00
Nicole Stiliyan Vukadinova
7d06571cfa Add marker start and end to App to measure the startup time for Flipper (#1398)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/1398

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

Reviewed By: nubbel

Differential Revision: D22549700

fbshipit-source-id: 7553ba075e45f1a515922012d7db4fdefefcaa24
2020-07-23 07:32:53 -07:00
Michel Weststrate
f0c54667e0 Support handling deeplinks in plugins
Summary:
This adds support for handling incoming deeplinks in a Sandy plugin, which can be done by using a `client.onDeepLink(deepLink => { } )` listener

Also generalized deeplinks to not just support strings, but also richer objects, which is beneficial to plugin to plugin linking.

Reviewed By: jknoxville

Differential Revision: D22524749

fbshipit-source-id: 2cbe8d52f6eac91a1c1c8c8494706952920b9181
2020-07-22 04:13:59 -07:00
Dominik Wielgórski
3e4d92aad0 Get the most accurate full path for a class name
Summary: Added functionality of choosing the best path from the list of potential full paths. By resolving a class name, the method getBestPath checks for the most accurate solution.

Reviewed By: adityasharat

Differential Revision: D22625186

fbshipit-source-id: 98ac4ccd1c18ec19b49edf2ed6e74a84a9899a9f
2020-07-21 04:15:50 -07:00
Pascal Hartig
000e7f85bf Update lodash (security fix)
Summary:
Trying to get our OSS report green and lodash is currently flagged as a security issue on GH.

Manually merged the different PRs on GitHub together.

Reviewed By: jonathoma

Differential Revision: D22599614

fbshipit-source-id: ea4c9abf21aade14cff9338b78b764b181193227
2020-07-17 14:36:24 -07:00
Timur Valiev
d28e763cca Self inspection
Summary:
let's finally inspect flipper with flipper!
Here we have:
1) a self inspection client which implements FlipperClient interface from js sdk and FlipperClientConnection. It links back and front parts of self inspection
2) simple plugin (UI) to show messages
3) back part of that plugin - it sends all received messages to UI part via client
4) we initialize self inspection for dev builds only

P. S. filesystem dependency will be replaced with npm one before I ship it (need to publish to npm first)

Reviewed By: mweststrate

Differential Revision: D22524533

fbshipit-source-id: 5c77e2f7b50e24ff7314e791a4dfe3c349dccdee
2020-07-17 04:54:44 -07:00
Dominik Wielgórski
3814c8fdfc Move openInIDE to Flipper core
Summary: Share functionality from D22375637

Reviewed By: mweststrate

Differential Revision: D22595715

fbshipit-source-id: 496a29c1c8e85eb1f065f48e650047a25c99b9d3
2020-07-17 03:48:36 -07:00
Elaina Hsu
0721735e37 Bolded names of Store record fields that appear in the Consistency List
Summary:
Bolded the record fields' keys if it is consistent (in the consistency white list).

*if the key is within an object, information on whether it is consistent will not be available in preview. The Object has to be physically expanded by the user in order to see the bolded key.

Reviewed By: mweststrate

Differential Revision: D22416084

fbshipit-source-id: 7eb1d8c65be07f880722a133b70195a4a63f0e75
2020-07-16 12:25:36 -07:00
John Knox
9e854d7b7d Fix visualizer margins
Summary:
Found a bug in the archived device visualizer. I realized I never actually announced this feature to anyone, so fixing it up before doing so.

CHANGELOG: Visual Android View inspection available in layout plugin export files.

Reviewed By: passy

Differential Revision: D22548586

fbshipit-source-id: bcb5b8bee6aac7c76354d2c7cb44d72c7d23f5ca
2020-07-15 08:09:17 -07:00
Anton Nikolaev
3e87715a8f Restart button added to plugin update notifications
Summary:
Simple implementation of restart button on auto-update notifications. Should make the flow a bit more convenient.

Changelog: Added button "Restart Flipper" to plugin auto-update notifications.

Reviewed By: passy

Differential Revision: D22528729

fbshipit-source-id: 6da6b858baed1e0f3cae57f1a614907b61899d10
2020-07-15 02:53:33 -07:00
Michel Weststrate
6fe477f19b Make sure Sandy plugins are selectable during export
Summary:
This diff makes sure Sandy plugins show up as well in the plugin selector when making exports (and in support form as well).

Also verified that this works with the Sandy updated section plugin.

Note that persisted state now didn't need any changes in the plugin code to work :)

Commented / simplified the calculation of available plugins a little bit and fixed a confusing issue where two different redux stores where created in one unit test, which caused an issue in the new implementation.

Reviewed By: jknoxville

Differential Revision: D22434301

fbshipit-source-id: c911196bc5b105309e82204188f124f40aab487a
2020-07-14 09:06:59 -07:00
Michel Weststrate
44f99eb304 Support export data
Summary:
Made Sandy plugins part of the export / import logic

Note that in the export format there is now a `pluginStates2` field. It could have been put in `pluginStates` as well, but I started with that and it felt very weird, as the `pluginStates` are supposed to reflect what is living in the Redux stores, where sandy state doesn't live in the Redux store (not directly at least). Trying to store it in the same field made things overcomplicated and confusing.

Reviewed By: jknoxville

Differential Revision: D22432769

fbshipit-source-id: d9858e561fad4fadbf0f90858874ed444e3a836c
2020-07-14 09:06:59 -07:00
Michel Weststrate
0e4a6d659b Make sure plugins can serialize and deserialize
Summary:
This plugin adds serialization capabilities to Sandy plugins buy setting the a `persist: <key>` flag. This shouldn't be used for state that is unserializable, too big, too sensitive, or irrelevant during export / import.

Using an explicit `persist` flag is done to make plugins robust to changes over time; as long as the key is kept the same, state variables can be renamed and reordered without breaking the import / export format. Also it allows us to detect some changes in the import / export format and warn about it.

Alternative designs considered but not implemented would be:
1. requiring the user to explicitly return the state from the factory (e.g. `const todos = createState([]); return { todos }`,
2. or construct the state from client (e.g. `const todos = client.createState([])`)
3. enable persistence by default, and store states in the order the states were created (much like useState in React). This was implemented in the first versions of this diff, but as pointed out in the discussions, this is too sensitive too (accidental) format changes, as the storage format would be quite implicit

A nice benefit of the current approach, especially compared with alternative approach 1, is that state being restored is immediately visible in the plugin factory. In other words, directly after initialization `const todos = createState([])`, the `todos.get()` is actually set to the state that is being restored, rather than having still the initial state which is only overridden rather. So this behaves very much like the `useState` hook in React.

Furthermore, in the future we could use the same `persist` key in combination with other options, such as `saveToLocalStorage`, in case some state acts as a 'preference' (T69989583).

`TestUtils.startPlugin` supports starting plugins with an initial state by using the optional `initialState` field

Actually wiring up the serialization and deserialization into the export / import functionality of Flipper is done in the next diff.

Reviewed By: jknoxville

Differential Revision: D22432770

fbshipit-source-id: 9a4849582c2f6f54d1e40f65a6cba73092c28fe8
2020-07-14 09:06:59 -07:00
Pascal Hartig
9d57a667ef Bump @types/testing-library__react from 10.0.0 to 10.2.0 in /desktop (#1366)
Summary:
Created a few breakages. Would appreciate some closer eyes on this.

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

Reviewed By: mweststrate

Differential Revision: D22501454

fbshipit-source-id: 9b882a12aecc65da85f29101bf87bf27519a7d2a
2020-07-14 06:19:16 -07:00
Anton Nikolaev
30213e118f Update Metro to 0.60.0 (#1380)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/1380

Updated Metro to 0.60.0

Reviewed By: mweststrate

Differential Revision: D22453798

fbshipit-source-id: 14c5bacf88bc31bd3dd06ad42edf271769a4a669
2020-07-14 01:08:01 -07:00
dependabot[bot]
23758a8fbf Bump pretty-format from 26.0.1 to 26.1.0 in /desktop (#1378)
Summary:
Bumps [pretty-format](https://github.com/facebook/jest/tree/HEAD/packages/pretty-format) from 26.0.1 to 26.1.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/facebook/jest/releases">pretty-format's releases</a>.</em></p>
<blockquote>
<h2>26.1.0</h2>
<h3>Features</h3>
<ul>
<li><code>[jest-mock]</code> Export <code>Mock</code>, <code>MockInstance</code>, <code>SpyInstance</code> types (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/10138">#10138</a>)</li>
<li><code>[jest-config]</code> Support config files exporting (<code>async</code>) <code>function</code>s (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/10001">#10001</a>)</li>
<li><code>[jest-cli, jest-core]</code> Add <code>--selectProjects</code> CLI argument to filter test suites by project name (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/8612">#8612</a>)</li>
<li><code>[jest-cli, jest-init]</code> Add <code>coverageProvider</code> to <code>jest --init</code> prompts (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/10044">#10044</a>)</li>
</ul>
<h3>Fixes</h3>
<ul>
<li><code>[jest-console]</code> <code>getConsoleOutput</code> to receive global stack trace config and use it to format stack trace (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/10081">#10081</a>)</li>
<li><code>[jest-jasmine2]</code> Stop adding <code>:</code> after an error that has no message (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/9990">#9990</a>)</li>
<li><code>[jest-diff]</code> Control no diff message color with <code>commonColor</code> in diff options (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/9997">#9997</a>)</li>
<li><code>[jest-snapshot]</code> Fix TypeScript compilation (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/10008">#10008</a>)</li>
</ul>
<h3>Chore &amp; Maintenance</h3>
<ul>
<li><code>[docs]</code> Correct confusing filename in <code>enableAutomock</code> example (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/10055">#10055</a>)</li>
<li><code>[jest-core]</code> 🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉 (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/10000">#10000</a>)</li>
<li><code>[jest-core, jest-reporters, jest-test-result, jest-types]</code> Cleanup <code>displayName</code> type (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/10049">#10049</a>)</li>
<li><code>[jest-runtime]</code> Jest-internal sandbox escape hatch (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/9907">#9907</a>)</li>
<li><code>[jest-fake-timers]</code> Update <code>now</code> param type to support <code>Date</code> in addition to <code>number</code>. (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/10169">#10169</a>)</li>
<li><code>[docs]</code> Add param to <code>setSystemTime</code> docs and remove preceding period from it and <code>getRealSystemTime</code> (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/10169">#10169</a>)</li>
<li><code>[jest-snapshot, jest-util]</code> Replace <code>make-dir</code> with <code>fs.mkdir</code> (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/10136">#10136</a>)</li>
</ul>
<h3>Performance</h3>
<ul>
<li><code>[jest-core, jest-transform, jest-haste-map]</code> Improve Jest startup time and test runtime, particularly when running with coverage, by caching micromatch and avoiding recreating RegExp instances (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/10131">#10131</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/facebook/jest/blob/master/CHANGELOG.md">pretty-format's changelog</a>.</em></p>
<blockquote>
<h2>26.1.0</h2>
<h3>Features</h3>
<ul>
<li><code>[jest-mock]</code> Export <code>Mock</code>, <code>MockInstance</code>, <code>SpyInstance</code> types (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/10138">#10138</a>)</li>
<li><code>[jest-config]</code> Support config files exporting (<code>async</code>) <code>function</code>s (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/10001">#10001</a>)</li>
<li><code>[jest-cli, jest-core]</code> Add <code>--selectProjects</code> CLI argument to filter test suites by project name (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/8612">#8612</a>)</li>
<li><code>[jest-cli, jest-init]</code> Add <code>coverageProvider</code> to <code>jest --init</code> prompts (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/10044">#10044</a>)</li>
</ul>
<h3>Fixes</h3>
<ul>
<li><code>[jest-console]</code> <code>getConsoleOutput</code> to receive global stack trace config and use it to format stack trace (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/10081">#10081</a>)</li>
<li><code>[jest-jasmine2]</code> Stop adding <code>:</code> after an error that has no message (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/9990">#9990</a>)</li>
<li><code>[jest-diff]</code> Control no diff message color with <code>commonColor</code> in diff options (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/9997">#9997</a>)</li>
<li><code>[jest-snapshot]</code> Fix TypeScript compilation (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/10008">#10008</a>)</li>
</ul>
<h3>Chore &amp; Maintenance</h3>
<ul>
<li><code>[docs]</code> Correct confusing filename in <code>enableAutomock</code> example (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/10055">#10055</a>)</li>
<li><code>[jest-core]</code> 🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉 (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/10000">#10000</a>)</li>
<li><code>[jest-core, jest-reporters, jest-test-result, jest-types]</code> Cleanup <code>displayName</code> type (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/10049">#10049</a>)</li>
<li><code>[jest-runtime]</code> Jest-internal sandbox escape hatch (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/9907">#9907</a>)</li>
<li><code>[jest-fake-timers]</code> Update <code>now</code> param type to support <code>Date</code> in addition to <code>number</code>. (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/10169">#10169</a>)</li>
<li><code>[docs]</code> Add param to <code>setSystemTime</code> docs and remove preceding period from it and <code>getRealSystemTime</code> (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/10169">#10169</a>)</li>
<li><code>[jest-snapshot, jest-util]</code> Replace <code>make-dir</code> with <code>fs.mkdir</code> (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/10136">#10136</a>)</li>
<li><code>[docs]</code> Added parcel-bundler documentation inside readme.md file</li>
</ul>
<h3>Performance</h3>
<ul>
<li><code>[jest-core, jest-transform, jest-haste-map]</code> Improve Jest startup time and test runtime, particularly when running with coverage, by caching micromatch and avoiding recreating RegExp instances (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/10131">#10131</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="817d8b6aca"><code>817d8b6</code></a> v26.1.0</li>
<li><a href="9ffd368330"><code>9ffd368</code></a> chore: upgrade to typescript 3.9 (<a href="https://github.com/facebook/jest/tree/HEAD/packages/pretty-format/issues/10031">#10031</a>)</li>
<li>See full diff in <a href="https://github.com/facebook/jest/commits/v26.1.0/packages/pretty-format">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pretty-format&package-manager=npm_and_yarn&previous-version=26.0.1&new-version=26.1.0)](https://help.github.com/articles/configuring-automated-security-fixes)

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

Reviewed By: nikoant

Differential Revision: D22504856

Pulled By: passy

fbshipit-source-id: e66678f3653bfc6c718dc1ac1d793cd2cdb4a901
2020-07-13 10:32:05 -07:00
dependabot[bot]
066b1e535d Bump react-transition-group from 4.3.0 to 4.4.1 in /desktop (#1367)
Summary:
Bumps [react-transition-group](https://github.com/reactjs/react-transition-group) from 4.3.0 to 4.4.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/reactjs/react-transition-group/releases">react-transition-group's releases</a>.</em></p>
<blockquote>
<h2>v4.4.1</h2>
<h2><a href="https://github.com/reactjs/react-transition-group/compare/v4.4.0...v4.4.1">4.4.1</a> (2020-05-06)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>transition SSR (<a href="https://github-redirect.dependabot.com/reactjs/react-transition-group/issues/619">https://github.com/facebook/flipper/issues/619</a>) (<a href="2722bb6b75">2722bb6</a>)</li>
</ul>
<h2>v4.4.0</h2>
<h1><a href="https://github.com/reactjs/react-transition-group/compare/v4.3.0...v4.4.0">4.4.0</a> (2020-05-05)</h1>
<h3>Features</h3>
<ul>
<li>add <code>nodeRef</code> alternative instead of internal <code>findDOMNode</code> (<a href="https://github-redirect.dependabot.com/reactjs/react-transition-group/issues/559">https://github.com/facebook/flipper/issues/559</a>) (<a href="85016bfddd">85016bf</a>)
<ul>
<li>
<p>react-transition-group internally uses <code>findDOMNode</code>, which is deprecated and produces warnings in <a href="https://reactjs.org/docs/strict-mode.html">Strict Mode</a>, so now you can optionally pass <code>nodeRef</code> to <code>Transition</code> and <code>CSSTransition</code>, it's a ref object that should point to the transitioning child:</p>
<pre lang="jsx"><code>import React from &quot;react&quot;
import { CSSTransition } from &quot;react-transition-group&quot;
<p>const MyComponent = () =&gt; {
const nodeRef = React.useRef(null)
return (
&lt;CSSTransition nodeRef={nodeRef} in timeout={200} classNames=&quot;fade&quot;&gt;
&lt;div ref={nodeRef}&gt;Fade&lt;/div&gt;
&lt;/CSSTransition&gt;
)
}
</code></pre></p>
</li>
</ul>
</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>set the values of constants attached to <code>Transition</code> to match the exported ones (<a href="https://github-redirect.dependabot.com/reactjs/react-transition-group/issues/554">https://github.com/facebook/flipper/issues/554</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/reactjs/react-transition-group/blob/master/CHANGELOG.md">react-transition-group's changelog</a>.</em></p>
<blockquote>
<h2><a href="https://github.com/reactjs/react-transition-group/compare/v4.4.0...v4.4.1">4.4.1</a> (2020-05-06)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>transition SSR (<a href="https://github-redirect.dependabot.com/reactjs/react-transition-group/issues/619">https://github.com/facebook/flipper/issues/619</a>) (<a href="2722bb6b75">2722bb6</a>)</li>
</ul>
<h1><a href="https://github.com/reactjs/react-transition-group/compare/v4.3.0...v4.4.0">4.4.0</a> (2020-05-05)</h1>
<h3>Features</h3>
<ul>
<li>add <code>nodeRef</code> alternative instead of internal <code>findDOMNode</code> (<a href="https://github-redirect.dependabot.com/reactjs/react-transition-group/issues/559">https://github.com/facebook/flipper/issues/559</a>) (<a href="85016bfddd">85016bf</a>)
<ul>
<li>
<p>react-transition-group internally uses <code>findDOMNode</code>, which is deprecated and produces warnings in <a href="https://reactjs.org/docs/strict-mode.html">Strict Mode</a>, so now you can optionally pass <code>nodeRef</code> to <code>Transition</code> and <code>CSSTransition</code>, it's a ref object that should point to the transitioning child:</p>
<pre lang="jsx"><code>import React from &quot;react&quot;
import { CSSTransition } from &quot;react-transition-group&quot;
<p>const MyComponent = () =&gt; {
const nodeRef = React.useRef(null)
return (
&lt;CSSTransition nodeRef={nodeRef} in timeout={200} classNames=&quot;fade&quot;&gt;
&lt;div ref={nodeRef}&gt;Fade&lt;/div&gt;
&lt;/CSSTransition&gt;
)
}
</code></pre></p>
</li>
</ul>
</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>set the values of constants attached to <code>Transition</code> to match the exported ones (<a href="https://github-redirect.dependabot.com/reactjs/react-transition-group/pull/554">https://github.com/facebook/flipper/issues/554</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="1fd4a65ac4"><code>1fd4a65</code></a> chore(release): 4.4.1 [skip ci]</li>
<li><a href="2722bb6b75"><code>2722bb6</code></a> fix: transition SSR (<a href="https://github-redirect.dependabot.com/reactjs/react-transition-group/issues/619">https://github.com/facebook/flipper/issues/619</a>)</li>
<li><a href="46bdb6e948"><code>46bdb6e</code></a> refactor(Transition): simplify render function (<a href="https://github-redirect.dependabot.com/reactjs/react-transition-group/issues/621">https://github.com/facebook/flipper/issues/621</a>)</li>
<li><a href="6ab44733ec"><code>6ab4473</code></a> chore: install dependencies in both dirs on CI</li>
<li><a href="ce9412841c"><code>ce94128</code></a> chore: Fix ESLint errors in www on CI (<a href="https://github-redirect.dependabot.com/reactjs/react-transition-group/issues/620">https://github.com/facebook/flipper/issues/620</a>)</li>
<li><a href="fbbcc1d22b"><code>fbbcc1d</code></a> test: enable <code>React.StrictMode</code> (<a href="https://github-redirect.dependabot.com/reactjs/react-transition-group/issues/593">https://github.com/facebook/flipper/issues/593</a>)</li>
<li><a href="c8631587f9"><code>c863158</code></a> Expand notes for v4.4.0 and add missing fix</li>
<li><a href="80b663eebf"><code>80b663e</code></a> Add scroll margin to account for fixed header</li>
<li><a href="205c5ceb8a"><code>205c5ce</code></a> Update Yarn lockfile</li>
<li><a href="476cb63a28"><code>476cb63</code></a> Change lint script to run across entire project</li>
<li>Additional commits viewable in <a href="https://github.com/reactjs/react-transition-group/compare/v4.3.0...v4.4.1">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=react-transition-group&package-manager=npm_and_yarn&previous-version=4.3.0&new-version=4.4.1)](https://help.github.com/articles/configuring-automated-security-fixes)

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

Reviewed By: nikoant

Differential Revision: D22502222

Pulled By: passy

fbshipit-source-id: debea69fe5442e14516dbe0061de90a95325619c
2020-07-13 10:28:51 -07:00
generatedunixname89002005306973
fff723d5ef Flipper Release: v0.50.0
Summary: Releasing version 0.50.0

Reviewed By: passy

Differential Revision: D22501533

fbshipit-source-id: 0896efd4eb2b2bb5f557d573526db91dc5dcd1de
2020-07-13 04:15:23 -07:00
Michel Weststrate
d90499be84 Disable electron tests
Summary:
Turns out, we don't have any tests that _actually_ depend on Electron. What is more, the one test suite that was still left was actually failing for a long time, but somehow CI didn't pick and reported that :-P.

Note that I dropped the file `xplat/sonar/scripts/facebook/lego/run-sc-yarn-targets-with-electron.sh` entirely, as it appeared unused

Reviewed By: nikoant

Differential Revision: D22434441

fbshipit-source-id: 34df79a580a64904116ae93069bbc8fafc53d9d0
2020-07-10 04:36:25 -07:00
Michel Weststrate
32933f4bf1 Enabled all unit tests to run locally
Summary: Unit tests with `.electron.tsx` are not run locally, as it is assumed they need Electron (?). However, since FBLogger is stubbed by default, it looks they all are actually runnable locally now.

Reviewed By: jknoxville

Differential Revision: D22431234

fbshipit-source-id: 9376923255bb96e2d7fc3bc8c3ec09962a07739c
2020-07-10 04:36:25 -07:00
dependabot[bot]
6994377c25 Bump query-string from 6.12.0 to 6.13.1 in /desktop (#1347)
Summary:
Bumps [query-string](https://github.com/sindresorhus/query-string) from 6.12.0 to 6.13.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/sindresorhus/query-string/releases">query-string's releases</a>.</em></p>
<blockquote>
<h2>v6.13.1</h2>
<ul>
<li>Fix sorting existing query params in URL when <code>sort</code> option is false (<a href="https://github-redirect.dependabot.com/sindresorhus/query-string/issues/265">https://github.com/facebook/flipper/issues/265</a>)  549d677</li>
</ul>
<p><a href="https://github.com/sindresorhus/query-string/compare/v6.13.0...v6.13.1">https://github.com/sindresorhus/query-string/compare/v6.13.0...v6.13.1</a></p>
<h2>v6.13.0</h2>
<ul>
<li>Add support for <a href="https://github.com/sindresorhus/query-string#parsefragmentidentifier">parsing/stringifying fragment identifier</a> (<a href="https://github-redirect.dependabot.com/sindresorhus/query-string/issues/222">https://github.com/facebook/flipper/issues/222</a>)  ce06095</li>
</ul>
<p><a href="https://github.com/sindresorhus/query-string/compare/v6.12.1...v6.13.0">https://github.com/sindresorhus/query-string/compare/v6.12.1...v6.13.0</a></p>
<h2>v6.12.1</h2>
<ul>
<li>Fix value being decoded twice with <code>arrayFormat</code> option set to <code>separator</code> (<a href="https://github-redirect.dependabot.com/sindresorhus/query-string/issues/243">https://github.com/facebook/flipper/issues/243</a>)  3b4c295</li>
</ul>
<p><a href="https://github.com/sindresorhus/query-string/compare/v6.12.0...v6.12.1">https://github.com/sindresorhus/query-string/compare/v6.12.0...v6.12.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="f38dab590a"><code>f38dab5</code></a> 6.13.1</li>
<li><a href="549d6777e4"><code>549d677</code></a> Fix sorting existing query params in URL when <code>sort</code> option is false (<a href="https://github-redirect.dependabot.com/sindresorhus/query-string/issues/265">https://github.com/facebook/flipper/issues/265</a>)</li>
<li><a href="d3da28bedb"><code>d3da28b</code></a> 6.13.0</li>
<li><a href="ce0609566f"><code>ce06095</code></a> Add support for parsing/stringifying fragment identifier (<a href="https://github-redirect.dependabot.com/sindresorhus/query-string/issues/222">https://github.com/facebook/flipper/issues/222</a>)</li>
<li><a href="1ad8bbd5a2"><code>1ad8bbd</code></a> Meta tweaks</li>
<li><a href="8ee6dbf8df"><code>8ee6dbf</code></a> Meta tweaks</li>
<li><a href="5d19c56970"><code>5d19c56</code></a> Add benchmarks (<a href="https://github-redirect.dependabot.com/sindresorhus/query-string/issues/254">https://github.com/facebook/flipper/issues/254</a>)</li>
<li><a href="1e70bf30ba"><code>1e70bf3</code></a> Add size badge</li>
<li><a href="3cd5d4d1cc"><code>3cd5d4d</code></a> 6.12.1</li>
<li><a href="3b4c2959c0"><code>3b4c295</code></a> Fix value being decoded twice with <code>arrayFormat</code> option set to <code>separator</code> (#...</li>
<li>See full diff in <a href="https://github.com/sindresorhus/query-string/compare/v6.12.0...v6.13.1">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=query-string&package-manager=npm_and_yarn&previous-version=6.12.0&new-version=6.13.1)](https://help.github.com/articles/configuring-automated-security-fixes)

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

Reviewed By: nikoant

Differential Revision: D22432104

Pulled By: passy

fbshipit-source-id: 5d20b9f1046fe7b4fb00c7f01994393d06c64162
2020-07-10 02:43:53 -07:00
Michel Weststrate
0038c9c9bf Standardize Chrome to use Layout component
Summary:
Fixes a potential issue where double scrollbars could appear or entire main contents would be scrollable (when a plugin has a fixed height > window height) as maincontents was made scrollable as well in D22411617 (2ce65c1b3c)

Anyway this is nice clean up that makes our chrome layout more understandable (imho). The PluginContents wrapper is still very sad (used by ReactDevTools and Hermes debugger), but can hopefully be addressed with the sandy cleanup in the future

Reviewed By: nikoant

Differential Revision: D22431807

fbshipit-source-id: 113e8441e0c43a8b764f5cf27615ab93627c3197
2020-07-08 10:00:36 -07:00
Paco Estevez Garcia
29b6be23e8 Remove unused prop
Summary:
While reading through the Inspector I found this prop passed down and not used anywhere

printer_shredder

Reviewed By: Katalune

Differential Revision: D22431895

fbshipit-source-id: 6cbc97b3faec26349a1ad900ffa455e95f53bb2b
2020-07-08 07:13:38 -07:00
Pritesh Nandgaonkar
2ce65c1b3c Solve the issue where the bottom view of Sidebar was pushed down
Summary: This fixes the issue raised [here](https://fb.workplace.com/groups/flippersupport/permalink/911822855965040/).

Reviewed By: nikoant

Differential Revision: D22411617

fbshipit-source-id: ca1078bf418532863823fb3748e9edea4526cbc2
2020-07-07 08:41:58 -07:00
dependabot[bot]
e2b2d13a41 Bump @algolia/client-search from 4.1.0 to 4.3.0 in /desktop (#1331)
Summary:
Bumps [algolia/client-search](https://github.com/algolia/algoliasearch-client-javascript) from 4.1.0 to 4.3.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/algolia/algoliasearch-client-javascript/blob/master/CHANGELOG.md">algolia/client-search's changelog</a>.</em></p>
<blockquote>
<h2><a href="https://github.com/algolia/algoliasearch-client-javascript/compare/4.2.0...4.3.0">v4.3.0</a></h2>
<h2>Added</h2>
<ul>
<li><code>naturalLanguages</code> option type (<a href="https://github-redirect.dependabot.com/algolia/algoliasearch-client-javascript/pull/1147">https://github.com/facebook/flipper/issues/1147</a>)</li>
<li><code>shouldStop</code> option to stop browse (<a href="https://github-redirect.dependabot.com/algolia/algoliasearch-client-javascript/pull/1029">https://github.com/facebook/flipper/issues/1029</a>)</li>
<li><code>inner_queries</code> property to <code>getLogs</code> response (<a href="https://github-redirect.dependabot.com/algolia/algoliasearch-client-javascript/pull/1109">https://github.com/facebook/flipper/issues/1109</a>, <a href="https://github-redirect.dependabot.com/algolia/algoliasearch-client-javascript/pull/1166">https://github.com/facebook/flipper/issues/1166</a>)</li>
<li><code>enablePersonalization</code> option to type <code>Settings</code> (<a href="https://github-redirect.dependabot.com/algolia/algoliasearch-client-javascript/pull/1151">https://github.com/facebook/flipper/issues/1151</a>)</li>
</ul>
<h2>Fixed</h2>
<ul>
<li>additional <code>clear</code>, <code>delete</code> &amp; <code>deleteObject</code> types for the <code>.batch</code> method (<a href="https://github-redirect.dependabot.com/algolia/algoliasearch-client-javascript/pull/1149">https://github.com/facebook/flipper/issues/1149</a>)</li>
<li>unhandled promise issue while using while using <code>accountCopyIndex</code> (<a href="https://github-redirect.dependabot.com/algolia/algoliasearch-client-javascript/pull/1154">https://github.com/facebook/flipper/issues/1154</a>)</li>
<li>node requester unicode characters being corrupted on large responses (<a href="https://github-redirect.dependabot.com/algolia/algoliasearch-client-javascript/pull/1164">https://github.com/facebook/flipper/issues/1164</a>)</li>
</ul>
<h2><a href="https://github.com/algolia/algoliasearch-client-javascript/compare/4.1.0...4.2.0">v4.2.0</a></h2>
<h3>Added</h3>
<ul>
<li>Improved <code>acl</code> property type in <code>GetApiKeyResponse</code> and <code>addApiKey</code> function param (<a href="https://github-redirect.dependabot.com/algolia/algoliasearch-client-javascript/pull/1126">https://github.com/facebook/flipper/issues/1126</a>)</li>
<li>Improved <code>AnalyticsClientOptions</code> property type region (<a href="https://github-redirect.dependabot.com/algolia/algoliasearch-client-javascript/pull/1085">https://github.com/facebook/flipper/issues/1085</a>)</li>
<li>Responses types can now be mutated (<a href="https://github-redirect.dependabot.com/algolia/algoliasearch-client-javascript/pull/1068">https://github.com/facebook/flipper/issues/1068</a>)</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Type <code>Log</code> (<a href="https://github-redirect.dependabot.com/algolia/algoliasearch-client-javascript/pull/1139">https://github.com/facebook/flipper/issues/1139</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="3991e821b4"><code>3991e82</code></a> release: 4.3.0</li>
<li><a href="2cffc9a4e3"><code>2cffc9a</code></a> docs: update changelog</li>
<li><a href="060c290b30"><code>060c290</code></a> docs: update changelog</li>
<li><a href="399d3f1a7f"><code>399d3f1</code></a> fix(requester-node-http): fix handling chunked responses fix <a href="https://github-redirect.dependabot.com/algolia/algoliasearch-client-javascript/issues/1161">https://github.com/facebook/flipper/issues/1161</a> (<a href="https://github-redirect.dependabot.com/algolia/algoliasearch-client-javascript/issues/1164">https://github.com/facebook/flipper/issues/1164</a>)</li>
<li><a href="a91bf8e611"><code>a91bf8e</code></a> docs: update changelog</li>
<li><a href="648b06f1df"><code>648b06f</code></a> fix(log-type-inner-queries): apply snake_case (<a href="https://github-redirect.dependabot.com/algolia/algoliasearch-client-javascript/issues/1166">https://github.com/facebook/flipper/issues/1166</a>)</li>
<li><a href="a8bb68a969"><code>a8bb68a</code></a> chore(tests): tests against node 14 (<a href="https://github-redirect.dependabot.com/algolia/algoliasearch-client-javascript/issues/1165">https://github.com/facebook/flipper/issues/1165</a>)</li>
<li><a href="3c0f426ef1"><code>3c0f426</code></a> docs: updates changelog</li>
<li><a href="4df09f0b42"><code>4df09f0</code></a> feat(settings-personalization): add enablePersonalization type (<a href="https://github-redirect.dependabot.com/algolia/algoliasearch-client-javascript/issues/1151">https://github.com/facebook/flipper/issues/1151</a>)</li>
<li><a href="c176129e87"><code>c176129</code></a> docs: update changelog</li>
<li>Additional commits viewable in <a href="https://github.com/algolia/algoliasearch-client-javascript/compare/4.1.0...4.3.0">compare view</a></li>
</ul>
</details>
<details>
<summary>Maintainer changes</summary>
<p>This version was pushed to npm by <a href="https://www.npmjs.com/~yannickcr">yannickcr</a>, a new releaser for algolia/client-search since your current version.</p>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@algolia/client-search&package-manager=npm_and_yarn&previous-version=4.1.0&new-version=4.3.0)](https://help.github.com/articles/configuring-automated-security-fixes)

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

Reviewed By: mweststrate

Differential Revision: D22409643

Pulled By: passy

fbshipit-source-id: 0503c371c3edee83f47d8a548426d6c6e1556348
2020-07-07 04:42:14 -07:00
Luc Oth
7c3d264803 ManagedTable: pass an innerRef to bypass debounceRender
Summary: The ref would point to the DebouncedComponent instead of the ManagedTable passing an innerRef and handling binding manually.

Reviewed By: mweststrate

Differential Revision: D22374912

fbshipit-source-id: d404931405939ef8bfbde31f9aec7d531a3b62e3
2020-07-03 09:34:43 -07:00
Anton Nikolaev
70b87b70c7 Fix standalone package build for unity plugins
Summary: Fixed error on building standalone packages for "unity" apps. The error was because "immer" imports were not transformed to use "immer" from Flipper bundle.

Reviewed By: passy

Differential Revision: D22357571

fbshipit-source-id: 590321f36208c9ed02d56d2c0c085c7cd1878018
2020-07-02 10:20:36 -07:00
Michel Weststrate
581ddafd18 Fixed re-enabling a still selected plugin
Summary: While testing manually discovered the sandy plugin infra din't cover the case that a plugin can be selected but not enabled at the same time. Added test and fixed that.

Reviewed By: nikoant

Differential Revision: D22308597

fbshipit-source-id: 6cef2b543013ee81cee449396d523dd9a657ad1c
2020-07-01 09:12:37 -07:00
Michel Weststrate
159c0deaf1 Added usePlugin hooks
Summary:
`usePlugin(pluginFactory)` returns the current plugin instance's api that was exposed by the plugin directory.

Passing `pluginFactory` is technically strictly not needed, but having the user pass it, we can make sure it is strongly typed

Reviewed By: nikoant

Differential Revision: D22286293

fbshipit-source-id: 4268b6849b8cd3d524103de7eadbd6c0a65c7a61
2020-07-01 09:12:37 -07:00
Michel Weststrate
952e929699 Fix disabling a plugin nog clearing the message queue
Summary:
While writing unit tests discovered a bug that disabling a plugin doesn't guarantee cleaning the messagequeues (both the buffer in client and the messagequeue reducer).

Fixed that. That was thanks to @#%@#$@#%@ Redux a lot harder than it should be; as 'STAR_PLUGIN' reasons about a plugin + app name, while the message queue reducer would need to deduct the plugin keys from that, but it can't because that mapping is stored in the connections reducers. So I moved the `STAR_PLUGIN` action handling to the root reducer, sot that it can reason about the state of multiple reducers, which looked like the least of all evils. For more ranting about that and possible alternative solutions: https://twitter.com/mweststrate/status/1277556309706117122

Reviewed By: nikoant

Differential Revision: D22284043

fbshipit-source-id: 35d0a8ba3a21a5959d2bb6ef17da3ff5077f48fd
2020-07-01 09:12:36 -07:00
Michel Weststrate
bb0c8e0df0 Support receiving messages in Sandy plugins
Summary: This diffs adds the capability to listen to messages in Sandy plugins. Although API wise it looks more like the old `this.subscribe`, semantically it behaves like the `persistedStateReducer`; messages are queued if the plugin is enabled but not active.

Reviewed By: nikoant

Differential Revision: D22282711

fbshipit-source-id: 885faa702fe779ac8d593c1d224b2be13e688d47
2020-07-01 09:12:36 -07:00
Michel Weststrate
6c79408b0f Move plugin stats to their own file
Summary: Really nothing interesting to see here , just moved pluginStats out of messageQueue, as it started there and kept growing

Reviewed By: nikoant

Differential Revision: D22257318

fbshipit-source-id: 26be7efb4629fcef1b14de96a2b60f17f7d76785
2020-07-01 09:12:36 -07:00
Michel Weststrate
ec85dd5b01 Allow plugins to send messages
Summary: Sandy plugins can now send messages to plugins. The methods and params are strongly typed in implementation and unit tests, based on the <Methods> generic of FlipperClient.

Reviewed By: nikoant

Differential Revision: D22256972

fbshipit-source-id: 549523a402949b3eb6bb4b4ca160dedb5c5e722d
2020-07-01 09:12:36 -07:00
Michel Weststrate
df6a8cd031 Provide initial plugin test infra for plugin devs
Summary:
This sets up the initial infra that is to be used by plugin devs to test plugins.

There is not much yet to see, as there is no state or message sending yet. But at least the life cycle of plugins can be test, things are strongly typed and everything is in the place where it should be :)

N.b. the import difference with these utils and the createFlipperMock utilities in Flipper are

1. this testing infra is entirely inside flipper-plugin package, so that plugin devs don't need flipper as a dependency
2. this testing infra doesn't provide abstractions for plugin / device / client switching; it tests plugins purely in isolation of the rest of the world (except for firing `onConnect` / `onDisconnect` which is normally the effect of switching plugins)

Reviewed By: nikoant

Differential Revision: D22255262

fbshipit-source-id: b94ccbab720d2b49428a646aed3c55af71a5bc80
2020-07-01 09:12:36 -07:00
Michel Weststrate
bde112bf85 Introduce onConnect / onDisconnect hooks
Summary:
Introduced hooks that are called whenever the plugin is connected / disconnected to it's counter part on the device.

There is some logic duplication between `PluginContainer` for old plugins, and `PluginRenderer` for new plugins, mostly caused by the fact that those lifecycles are triggered from the UI rather than from the reducers, but I figured refactoring that to be too risky.

Reviewed By: jknoxville

Differential Revision: D22232337

fbshipit-source-id: a384c45731a4c8d9b8b532a83e2becf49ce807c2
2020-07-01 09:12:36 -07:00
Michel Weststrate
dd0d957d8b Fix vscodeUtils make a request on every unit test run
Summary:
When running unit tests, every unit would try to make a graphql request (since promises always kick off immediately, even when not being awaited) and print an error. Fixed that by lazily choosing the preferred whatever it is.

Before:

{F241368814}

After:
(crickets)

Reviewed By: passy

Differential Revision: D22208422

fbshipit-source-id: b290d528d94dbed7ae867e07694d8d4cd85d8376
2020-07-01 09:12:36 -07:00
Michel Weststrate
f2c39aed55 Introduce PluginRenderer to render plugins
Summary: PluginContainer will now wrap Sandy plugins in PluginRenderer. PluginRenderer will also be used by plugin unit tests in the future

Reviewed By: jknoxville

Differential Revision: D22159359

fbshipit-source-id: 69f9c8f4bec9392022c1d7a14957f5aca0339d97
2020-07-01 09:12:36 -07:00
Michel Weststrate
ba01fa5bc9 Introduce onDestroy hook
Summary: This diff introduces the `onDestroy` hook that can be used by plugins to listen to the event where a plugin is cleaned up (either because it is disabled, or because the client is being cleaned up)

Reviewed By: jknoxville

Differential Revision: D22208121

fbshipit-source-id: 9c4951ae671be611f21da171c548d4054c481166
2020-07-01 09:12:35 -07:00