New multi app supporting sidebar navigation

Summary:
This diff changes the sidebar navigation, fixing a bunch of issues:
It will be possible to quickly switch again between the same plugins in multiple apps
No need to expand-and-check the app dropdown until the app is connected
No need for ugly fallback selections if some app connects faster than another one

Reviewed By: nikoant

Differential Revision: D19272701

fbshipit-source-id: 10f5fab42391014ef4a4a4c91c529d93f8bfb125
This commit is contained in:
Michel Weststrate
2020-01-06 08:47:21 -08:00
committed by Facebook Github Bot
parent 8152085111
commit 8cfe06d530
9 changed files with 540 additions and 416 deletions

View File

@@ -63,6 +63,7 @@ function selectDeviceLogs(store: Store) {
selectedPlugin: 'DeviceLogs',
selectedApp: null,
deepLinkPayload: null,
selectedDevice: store.getState().connections.selectedDevice!,
}),
);
}
@@ -73,6 +74,7 @@ function selectTestPlugin(store: Store, client: Client) {
selectedPlugin: TestPlugin.id,
selectedApp: client.query.app,
deepLinkPayload: null,
selectedDevice: store.getState().connections.selectedDevice!,
}),
);
}
@@ -279,6 +281,7 @@ test('queue - messages that arrive during processing will be queued', async () =
selectedPlugin: TestPlugin.id,
selectedApp: client.id,
deepLinkPayload: null,
selectedDevice: device,
}),
);
expect(store.getState().connections.selectedPlugin).toBe('TestPlugin');