From a2644b4a2e513730ba04ae30f39bd70392266354 Mon Sep 17 00:00:00 2001
From: Michel Weststrate
Date: Fri, 20 Aug 2021 02:23:05 -0700
Subject: [PATCH] handle device / client absence for deeplinks
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
---
.../handleOpenPluginDeeplink.node.tsx | 155 +++++++++++
.../dispatcher/handleOpenPluginDeeplink.tsx | 260 +++++++++++++++++-
desktop/app/src/test-utils/MockFlipper.tsx | 6 +-
.../createMockFlipperWithPlugin.tsx | 8 +-
.../__tests__/messageQueueSandy.node.tsx | 2 +-
desktop/flipper-plugin/src/ui/Dialog.tsx | 9 +-
.../src/utils/renderReactRoot.tsx | 1 +
7 files changed, 415 insertions(+), 26 deletions(-)
diff --git a/desktop/app/src/dispatcher/__tests__/handleOpenPluginDeeplink.node.tsx b/desktop/app/src/dispatcher/__tests__/handleOpenPluginDeeplink.node.tsx
index 397e56683..81fcc710d 100644
--- a/desktop/app/src/dispatcher/__tests__/handleOpenPluginDeeplink.node.tsx
+++ b/desktop/app/src/dispatcher/__tests__/handleOpenPluginDeeplink.node.tsx
@@ -18,9 +18,11 @@ import {
usePlugin,
createState,
useValue,
+ DevicePluginClient,
} from 'flipper-plugin';
import {parseOpenPluginParams} from '../handleOpenPluginDeeplink';
import {handleDeeplink} from '../../deeplink';
+import {selectPlugin} from '../../reducers/connections';
test('open-plugin deeplink parsing', () => {
const testpayload = 'http://www.google/?test=c o%20o+l';
@@ -118,3 +120,156 @@ test('Triggering a deeplink will work', async () => {
+
+
+
+
+
+
+
+
+
+
+
+
+