Commit Graph

4 Commits

Author SHA1 Message Date
Timur Valiev
fe4af064cf refactoring and fixes
Summary: Slightly refactored JS api to make it work with new js app launcher

Reviewed By: jknoxville

Differential Revision: D18761757

fbshipit-source-id: edb8e5907765a9354e4c636be97d3cf6df63ee98
2019-12-02 04:58:49 -08:00
Pascal Hartig
0a7c57f5a0 Back out "Back out "[flipper][js] JS apps support 1/n""
Summary:
Original commit changeset: ff84080d43fa

This re-adds JS client support. The original version had a small bug that inadvertantly wrapped support for Android emulators in the dropdown in a GK that was only meant to cover JS clients. This is addressed here.

Reviewed By: timur-valiev

Differential Revision: D18707485

fbshipit-source-id: ceea8e279a21111f96073f8b784e852f6313e2a4
2019-11-26 09:37:57 -08:00
John Knox
2fd6301876 Back out "JS apps support 1/n"
Summary:
Original commit changeset: 56d1ca1a60ed

This broke Android support in some instances. We haven't had a chance to investigate this yet, but this should cleanly reapply, so we can figure out what happened after the release.

Reviewed By: cekkaewnumchai

Differential Revision: D18688590

fbshipit-source-id: ff84080d43fa481cc8c8c669a76aed15d0f8aa56
2019-11-26 05:30:34 -08:00
Timur Valiev
c685493db0 JS apps support 1/n
Summary:
### Connecting Flipper with JS apps by using electron's BrowserWindow and IPC

1. UI: there is a menu item in Devices tab which opens JS Emulator Launcher Sheet. Here we can configure URL to open and initial size of the window.
2. BrowserWindow, preloaded js: there is SupportJSClientPreload.js which initialize communication between flipper and app via electron's ipc
3. On flipper's side there is src/utils/js-client/serverUtils.tsx which contains most of JS emulator related code
4. Extracting of FlipperClientConnection: since we don't use RScocket to communicate with JS app I extracted needed methods to FlipperClientConnection (located in Client) and partly implemented them in JSClientFlipperConnection (requestResponse is just send a message now, doesn't return actual result)

Reviewed By: jknoxville

Differential Revision: D18572882

fbshipit-source-id: 56d1ca1a60ed2e51329b917021a09382cbb1ceec
2019-11-22 03:11:29 -08:00