Summary:
1. Replace old FileSelector with the new FileSelector
2. Remove showOpenDialog from FlipperLib
Reviewed By: mweststrate
Differential Revision: D32667103
fbshipit-source-id: be8da034c2695f83b397b6c7d35bc6aee78d66e5
Summary:
These notifications, when emit, don't get deduped, so if connection timeouts keep happening, like in [this](https://fb.workplace.com/groups/flippersupport/posts/1257144721432850), then you get tons of notifications.
This dedupes them if all the info is the same.
Reviewed By: mweststrate
Differential Revision: D32560073
fbshipit-source-id: beb4d67e2a97841bb91add7847157176dee4a5f4
Summary:
unit tests for deeplinks were logging full device / client objects instances, changed it to log the meta data only (description resp. query).
Since Jest buffers console output, this might even help test stability
Maybe console.debug shouldn't even be printed in Jest? See next diff
Reviewed By: passy
Differential Revision: D32557412
fbshipit-source-id: ff7fbf0cb5d8684d5333a62dac02fd5a59a6e358
Summary:
When a new client connects, we dispatch the NEW_CLIENT event.
The reducer of this event contains logic for determining if flipper should switch to display the newly connected client or not, and if so, it will dispatch SELECT_CLIENT.
For that reason, flipperServer always dispatching SELECT_CLIENT bypasses the "should switch?" logic and always switches whenever a new client connects. This is disruptive to working and not desired.
Removing this dispatch so that we rely on the NEW_CLIENT reducer to decide.
Bug report: https://fb.workplace.com/groups/flippersupport/posts/1255964631550859
Reviewed By: aigoncharov
Differential Revision: D32532942
fbshipit-source-id: 0ff2693745e37378362254053ae5fd6fc0d11de2
Summary:
1. Remove fs.readFile from some plugins
2. Add "importFile" to FlipperLib and RenderHost
See D32492149 for context
Followups:
1. Decapitate Stella's sendToPhone
2. Decapitate crash reporter
3. Figure out how to approach navigation
4. Figure out how to approach FileSelector
Reviewed By: mweststrate
Differential Revision: D32496775
fbshipit-source-id: e150aa56a2c2c1eb12a4c03c801f76cd76485a9d
Summary:
1. Remove "fs.writeFile" from plugins
2. Remove "showSaveDialog" from "FlipperLib"
3. Add "exportFile" to "FlipperLib" and "RenderHost"
As we are going to use Flipper in a browser as well, instead of providing low-level abstraction like "showSaveDialog", we should provide more high-level ones like "exportFile". In browsers it does not make too much sense to expose "showSaveDialog" as there is not way to use the returned file path to write to it.
In the end, "exportFile" is going to trigger a file download for browsers and show the save dialog and write to the returned file path for Electron.
Reviewed By: mweststrate
Differential Revision: D32492149
fbshipit-source-id: 0673119bdb7670a5872f5982c7d82dfc44eb7906
Summary:
This diff moves all UI code from app/src to app/flipper-ui-core. That is now slightly too much (e.g. node deps are not removed yet), but from here it should be easier to move things out again, as I don't want this diff to be open for too long to avoid too much merge conflicts.
* But at least flipper-ui-core is Electron free :)
* Killed all cross module imports as well, as they where now even more in the way
* Some unit test needed some changes, most not too big (but emotion hashes got renumbered in the snapshots, feel free to ignore that)
* Found some files that were actually meaningless (tsconfig in plugins, WatchTools files, that start generating compile errors, removed those
Follow up work:
* make flipper-ui-core configurable, and wire up flipper-server-core in Electron instead of here
* remove node deps (aigoncharov)
* figure out correct place to load GKs, plugins, make intern requests etc., and move to the correct module
* clean up deps
Reviewed By: aigoncharov
Differential Revision: D32427722
fbshipit-source-id: 14fe92e1ceb15b9dcf7bece367c8ab92df927a70
Summary:
This diff introduces the packages necessary for Flipper decapitated.
* flipper-common: utilities & types shared between client, server, flipper-plugin
* flipper-server-core: all device & client management goes in here. Basically flipper's backend
* flipper-ui-core: all UI goes in here, as far as it doesn't depend on Electron
* desktop: the Electron app, will load server-core and ui-core, and glue them together, providing implementations for some electron specific stuff like dialgos
* flipper-server: A node process hosting flipper-server-core, that can be connected to over websockets. And probably can serve a browser version of the UI as well.
* flipper-ui-browser: thin wrapper around flipper-ui-core, providing some browser specific behavior / stubs.
* flipper-dump: (might remove later), but want to hack a quick and dirt flipper dump in here, as alternative way to test flipper-server-core.
This diff just creates the packages, but doesn't move any code, so it can be summarized as:
restoftheowl
Reviewed By: nikoant
Differential Revision: D30218646
fbshipit-source-id: 735598a1261a98e584f52504b5eba01ec0afa162