Summary: If a device disconnects and reconnects while keeping the plugin open, a new pluginInstance is available, but the React component would not be remounted since both the old and new pluginInstance have the same identifier (device/client/plugin). This change makes sure that if a different pluginInstance arrives, the rendering will be reinitialised as well.
Reviewed By: lblasa
Differential Revision: D31018845
fbshipit-source-id: ac09e7ac519c7aebfb4f8dc0cc7c6cda6fbbf633
Summary: Seems Antd always requires a `key` for Menu Items, even when React doesn't strictly need them.
Reviewed By: timur-valiev
Differential Revision: D30839589
fbshipit-source-id: 9cbef32c8fa083a7e23e486e15c537b4a9259a08
Summary: per title. TS 4.4 is awesome btw, with the much improved control flow analysis.
Reviewed By: timur-valiev
Differential Revision: D30806769
fbshipit-source-id: a41aa7bf10fdb0047ddb6210082b5e1fbdfb255f
Summary: Based on afcoplan's feedback, now we're showing a button for launching the emulators instead of having it inline.
Reviewed By: mweststrate
Differential Revision: D30603659
fbshipit-source-id: edae6c63fd58647b406398c897215910938ae429
Summary:
This diff makes the new deeplink format feature complete, make sure VPN connection, plugin installation, client & device selection are now all handled. See the test plan for examples.
Changelog: Flipper now supports a richer protocol for opening deeplinks: https://fbflipper.com/docs/extending/deeplinks#open-plugin
Reviewed By: timur-valiev
Differential Revision: D30423809
fbshipit-source-id: e6cf4bf852b2c64e9a79a33ef0842eb27f68f840
Summary: Made it easier to build 'pick' dialogs, and introduced Dialogs.options for a set of radio buttions
Reviewed By: timur-valiev
Differential Revision: D30424708
fbshipit-source-id: 98abd0d64f47c552c81053b4433e5fc524574145
Summary: We're currently getting errors for every duplicate key and can't easily unify them, so we're adding the additional information to a warning instead.
Reviewed By: mweststrate
Differential Revision: D30337821
fbshipit-source-id: db9dc44d7d3424de169bed9b4447b482e411eb19
Summary:
This is the first of many diffs that extracts the connection, device, client detection out of the flipper core, to create a reusable flipper-server library that can be used in e.g. flipper-dump.
To keep diffs a little smaller, the current connection logic is first moved to the `server/` directory, and decoupled manually from the rest of the core, before moving it over to a separate package.
This first diffs moves the `comms/`, `devices/` and certificate utilities to the `server` directory.
Further untangling will follow in next diffs
Reviewed By: timur-valiev
Differential Revision: D30246551
fbshipit-source-id: c84259bfb1239119b3267a51b015e30c3c080866
Summary: Introduce `Dialog.alert` to show users a FYI message, and be able to wait for it to be handled, as utility around several `Modal` utilities.
Reviewed By: jknoxville
Differential Revision: D29875484
fbshipit-source-id: 5d2ea83e486631ac18a81800b467f97dfaac6d34
Summary: Check if Flipper is up to date before handling deeplink.
Reviewed By: nikoant
Differential Revision: D29846236
fbshipit-source-id: 011d05958346c3d18c76cf0ae63c3cb087f5933c
Summary: Excluding `react-virtual` which seems to include a breaking change with the patch release.
Reviewed By: jknoxville
Differential Revision: D30189687
fbshipit-source-id: b40cb5edd407fd03009ee38c0af5202c8deaaa26
Summary: The markdown bump required ignoring another prop, the rest was smooth.
Reviewed By: timur-valiev
Differential Revision: D30067682
fbshipit-source-id: 6038ffe29d2e0041c81bac132eed747cbfe40f54
Summary:
allow-large-files
Got a ton of open bumps in GitHub. Want to address a bunch of them in one swoop.
Reviewed By: jknoxville, nikoant
Differential Revision: D29933570
fbshipit-source-id: d5dc18fab22e8c5b300ab318e60dd1514aecfd52
Summary: Introduce convenience abstractions to make it easier to manage dialogs imperatively, by promisyfying common dialog abstractions.
Reviewed By: jknoxville, nikoant
Differential Revision: D29790462
fbshipit-source-id: c092c15cf569ec353b9c1042f25cd67e6c76db01
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/2609
Make it possible to mark some tests to run on non-CI, or unix only
Reviewed By: nikoant
Differential Revision: D29813506
fbshipit-source-id: 140f8a4eaed5af3282ab9d139b46a52818be0934
Summary:
This seems to be time-sensititve and breaks
occassionally on GitHub Actions.
Reviewed By: fabiomassimo
Differential Revision: D29760768
fbshipit-source-id: 12b496257d01d169c52f3a430175846f9a7eb227
Summary:
Restored sidebar in Flipper messages plugin, by using a Container, as DetailsSidebar is only valid in a PluginContainer context.
Also made tab rendering a bit more condensed while at it.
Reviewed By: timur-valiev
Differential Revision: D29734639
fbshipit-source-id: d3ec6f354e14194035e93daa014985721844416d
Summary:
Some folks were missing the copy as text ManagedTable used to have, so introduced both the options to either copy as text (visible columns or custom copy handler) or as JSON
Changelog: It is now possible to both copy as text or as JSON from data tables
Reviewed By: jknoxville
Differential Revision: D29712096
fbshipit-source-id: 27bd2e869a247bd0896ce2774c08651123fd531d
Summary:
This stack reduces our direct dependency on Electron, for example by exposing our own API to open links.
Also exposing `getFlipperLib` as API from `flipper-plugin`, so that these utility methods are available outside plugin contexts as well.
Reviewed By: timur-valiev
Differential Revision: D29661689
fbshipit-source-id: 0c0523326eeb0d9d8fbe3e03c4609327bb53596b
Summary:
It was requested a few times to inline simple values in the preview, to be able to quickly inspect vectors etc while inspecting elements
Implements https://github.com/facebook/flipper/issues/2551
Reviewed By: passy
Differential Revision: D29555541
fbshipit-source-id: c2c171cd7d2bf213f0cd05b5b5723918c9536025
Summary:
Going through all the patch updates and other small updates to pre-empt dependabot.
allow-large-files
Reviewed By: jknoxville
Differential Revision: D29547777
fbshipit-source-id: 86ef2408da0564049916cd96d66665074cdc23f2
Summary:
Per title.
Feature will be used in several plugins in next diffs.
Differential Revision: D29514456
fbshipit-source-id: c12427c2a7c53fa01cd1c7f429be8611be55496d
Summary:
Changelog: Flipper message debugging moved from a separate device to the console tab
This makes message debugging easier accessible, and in production (recently requested at GH). Also it clears up a lot of infra that was created just to make flipper a self recursive inspection device + a separate plugin. While fun, a hardcoded setup is just a bit more simpler (no exception rules and better static verification)
Reviewed By: nikoant
Differential Revision: D29487811
fbshipit-source-id: b412adc3ef5bd831001333443b432b6c0f934a5e
Summary:
Changelog: Add support for negative filters in data tables
As requested per somewhere on workplace but couldn't find it back :)
Reviewed By: nikoant
Differential Revision: D29486096
fbshipit-source-id: 467c8598f6d09afc9a5ed85affb6c51840afe00c
Summary:
This removes all code duplication / old plugin infra that isn't needed anymore when all plugin run on the Sandy plugin infra structure.
The diff is quite large, but the minimal one that passes tests and compiles. Existing tests are preserved by wrapping all remaining tests in `wrapSandy` for classic plugins where needed
Reviewed By: passy
Differential Revision: D29394738
fbshipit-source-id: 1315fabd9f048576aed15ed5f1cb6414d5fdbd40
Summary: Use set instead of array to keep list of supported plugins per client. It is not used as array anyway, in most places it is used to determine whether a plugin is supported or not and it's much faster to use set for that.
Reviewed By: priteshrnandgaonkar
Differential Revision: D29200673
fbshipit-source-id: 5f3c404a1a668c153867d7c1b6c223941f0b3b36
Summary:
This diffs removes restrictions on selecting disabled, uninstalled and unsupported plugins. Now it will be possible to select them, however for now empty view will be shown in such case.
In next diffs I'll add Plugin Info view which will be shown in case disabled plugin is selected. It will show static info about plugin - readme, version, oncall, user feedback group etc. This will make it possible for users to browse info about all plugins, even unsupported by selected device/app.
There is one problem that our analytics will be screwed by this change as even disabled plugins will be counted as used. I'll address this later in this stack.
If you see other potential problems with removing restrictions on selecting disabled plugins - please let me know.
Reviewed By: passy
Differential Revision: D29186005
fbshipit-source-id: 2e55c5fd3bb402594f4dbace6e287725de65bc6f
Summary:
This diff adds Sandy colors and dark mode support to the `DataInspector` and `LayoutInspector` components, and coverts hardcoded colors to semantic colors. Currently only one set of colors is used since they contrast fine with both dark and light mode, but this could be deviated from now onwards.
Also styled the legacy ManagedTable and Panel, since they are so commonly used (will convert more legacy components in next diffs).
Reviewed By: passy
Differential Revision: D28056698
fbshipit-source-id: 5a85103983f89e82b7f000d309bb9e1e1f07491d
Summary:
Changelog: [Flipper] Improve serialisation mechanism format & speed
The default serialisation mechanism used by Flipper to serialise plugin states is very flexible, taking care of maps, sets, dates etc. However, it is also really slow, leading to issues like in the related tasks, and work arounds like D17402443 (98bc01618f) to skip the whole process for plugins.
This diff changes the serialisation mechanism to have a better trade off between speed and convenience: For now we will only apply the smart serialisation for objects living at the _root_ of the serialised object, but it won't be applied recursively.
This sounds like a dangerous change, but works well in practice:
* I went through all `persistedState` and `createState` definition (the types), and the idea that complex types like Map and Set only live at the root of the persisted state holds up nicely. That makes sense as well since plugins typically store literally the same data as that they have received over the wire, except that they put it in some maps, sets etc.
* I introduced `assertSerializable` that only runs in dev/test, which will check (recursively, but without all the cloning) to see if a tree is indeed serialisable.
* The fact that by swapping this mechanism rarely existing unit test for exportData needed changes proves that the assumption that only roots are relevant generally upholds (or that plugin authors don't write enough tests ;-)).
* I verified that popular plugins still import / export correctly (actually *more* plugins are exportable now than before, thanks to sandy wrapper introduced earlier)
Reviewed By: jknoxville
Differential Revision: D29327499
fbshipit-source-id: 0ff17d9c5eb68fccfc2937b634cfa8f4f924247d
Summary:
Changelog: [Network] The network plugin will now detect utf-8 strings if no content header is present
Fixes https://github.com/facebook/flipper/issues/2406
Reviewed By: nikoant
Differential Revision: D29388968
fbshipit-source-id: 7017828a5f3f28dcf220eeda1d30888f1fc5f07a
Summary: There was an initialisation error possible if the crash reporter tried to start with an initial selection (after coming from a deeplink or the notification pane), which would cause an unending update loop.
Reviewed By: passy
Differential Revision: D29331127
fbshipit-source-id: 14e75e483c232039e6a80aa131fa5ce7c105b670
Summary:
I don't think this should make a difference in our size. Will see
in the size check.
This makes it quite hard right now to read errors that involve the data-source
package because terser runs over it.
Reviewed By: nikoant
Differential Revision: D29228941
fbshipit-source-id: 8cc79e4148be0e8ced9186323967bc79ba781c0b
Summary:
With new abstraction, `DataList` matches what the plugin trying to render.
Should fix:
https://fb.workplace.com/groups/flippersupport/permalink/1145431339270856/
Changelog: [MobileConfig] Fix issues with scrolling not working and several other improvements
Reviewed By: cekkaewnumchai
Differential Revision: D28314408
fbshipit-source-id: 4d8fbe3d8e868f737750203cd568d94bae8b4108
Summary:
Re-introduced context menu to DataTable, due to popular demand.
Originally it wasn't there to better align with ant design principles, but in an app like Flipper it makes just too much sense to have it
See e.g. https://fb.workplace.com/groups/flippersupport/permalink/1138285579985432/
changelog: Restored context menu in data tables
Reviewed By: passy
Differential Revision: D28996137
fbshipit-source-id: 16ef4c90997c9313efa62da7576fd453a7853761
Summary: Fixed minor keyboard navigation annoyance: pressing arrow down on the last entry would remove selection, then jump to first row. Pressing up on first row would deselect then select first again. After this change the first/last item is kept selected in those cases
Reviewed By: passy
Differential Revision: D28958705
fbshipit-source-id: 01dbce3971ed965eae3b74e6706fef96aa86df66
Summary: some type simplifications, that makes it easier to reuse data sources and helps type inference
Reviewed By: passy
Differential Revision: D28413380
fbshipit-source-id: 261a8b981bf18a00edc3075926bd668322e1c37d
Summary:
Improving usability of the WAIQWatch plugin.
Also fixing a bug in `MasterDetail`, which didn't use `sidebarSize` as `height` when detail panel is shown at the bottom.
iOS companion diff here: D28756787
Reviewed By: tomw
Differential Revision: D28751609
fbshipit-source-id: ba27ae7ce3596179752c963dba1bf4b994767c2a