Summary: `device.realDevice` was the escape hatch used in Sandy plugins to give access to device specific features like taking screenshots, clearing logs or accessing `adb`. Since in decapitated Flipper that won't be possible anymore (since plugins run in the client but device implementations on the server), all escape hatches have been bridged in this stack, and we can get of the `realDevice` interaction, by explicitly exposing those cases, which makes it type safe as well.
Reviewed By: passy
Differential Revision: D31079509
fbshipit-source-id: c9ec2e044d0dec0ccb1de287cf424907b198f818
Summary:
This stack takes care of handling care of moving all device interactions over the (possible) async channel FlipperServer. The FlipperServer interface (see previous diff) allows listening to specific server events using `on`, and emit commands to be executed by the server by using `exec` (e.g. `exec('take-screenshot', serial) => Promise<buffer>`).
FlipperServerImpl implements this interface on the server side.
The device implementations are split as follows
```
server / backend process:
ServerDevice
- iOSDevice
- AndroidDevice
- MetroDevice
- DummyDevice
- Mac/Windows Device
frontend / ui:
BaseDevice: a normal connected, device, implements device apis as they already existed
- ArchivedDevice (note that this doesn't have a server counterpart)
- TestDevice (for unit tests, with stubbed backend communication)
```
All features of devices are for simplicity unified (since the deviations are small), where specific device types might not implement certain features like taking screenshots or running shell commands.
To avoid making this diff unnecessarily big, some open Todo's will be addressed later in this stack, and it shouldn't be landed alone.
Reviewed By: timur-valiev
Differential Revision: D30909346
fbshipit-source-id: cce0bee94fdd5db59bebe3577a6084219a038719
Summary: There are some issues with label positioning, but overall works.
Reviewed By: defHLT
Differential Revision: D29588329
fbshipit-source-id: 5c2e8f6f139d997559111fa2ad124ae1d695b36a
Summary: Fixed a potential NPE that could happen in layout editor.
Reviewed By: passy
Differential Revision: D30870185
fbshipit-source-id: 3ae5860ce63761336d8bc508dd8eff761a5ab1f8
Summary:
In an attempt to trace Android issues:
1. added more logging to the process (opted for info level for now since this is pretty critical for support requests, yet not super repetitive overall. We could maybe turn it into usage tracking at some point to have central stats?).
2. rewrote promise chains to async/await since they are easier to follow and harder to do accidentally wrong
3. fixed some minor potential problems, will highlights those in code.
Changelog: Improved handling of edge cases in certificate exchange, which should address cases where a Flipper connection wouldn't come up when connection to Android / IOS. Added explicit logging around connection negation.
Reviewed By: lblasa
Differential Revision: D30838947
fbshipit-source-id: a898c6d3be6edc22bd24f9d2bad76e81871360da
Summary: Larger list of fixes. Adding another package to the flipper export is a bit nasty but it unblocks us for now and centralises `remote` access which seems like a win for FAAS.
Reviewed By: mweststrate
Differential Revision: D30785421
fbshipit-source-id: 931297e8566b5d8a213b69ae87d0cda7648b3ed4
Summary:
T98487412 is firing again. This seems to be an expected case that's not handled
correctly.
thinkofthechildren
Reviewed By: fabiomassimo
Differential Revision: D30539615
fbshipit-source-id: d9625bb0a7b3622e5afb6e768bc525c27fdfb02d
Summary:
Right now this is throwing an error, we instead gracefully
handle this. I'm not quite sure where this is coming from but as we're
not really doing anything with the requests before they're added here,
it must be coming from the network stack.
We can't really build another stable key on the client side because we
also need to match it up with the response. Open for ideas!
Changelog: Network requests with duplicate IDs are filtered out
Reviewed By: mweststrate
Differential Revision: D30337820
fbshipit-source-id: d312833727b383fa5f4d18a506ab581cd2151d13
Summary:
This reverts commit efd75ea435.
Sorry hbmartin! We're running into Kotlin compatibility problems. Your latest library release isn't compatible with Kotlin 1.3 and we can't upgrade just yet because Litho hasn't been able to release in a while. :(
Pull Request resolved: https://github.com/facebook/flipper/pull/2665
Test Plan: _eyes
Differential Revision: D30189360
Pulled By: passy
fbshipit-source-id: c1edbbc496742938579f4e2032a78debe08fcc26
Summary: Refactored Navigation plugin to make it fast-refreshable: moved the main component into a separate file and exported all components as named functions. Without these changes every change of UI triggered full reload.
Reviewed By: timur-valiev
Differential Revision: D29814077
fbshipit-source-id: 5285bdc5f14a5163f9501c0d45a3affefb08fc8e
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:
Change iOS to Objective C, reference which file is being updated
- Clarifies how to update iOS if using objective C for flipper network plugin
## Changelog
- renamed iOS to ObjC for flipper network plugin setup
- specified which iOS file to modify for flipper network plugin setup
Pull Request resolved: https://github.com/facebook/flipper/pull/2595
Test Plan:
Imported from GitHub, without a `Test Plan:` line.
|[Site Preview: flipper](https://our.intern.facebook.com/intern/staticdocs/eph/D29662605/V2/flipper/)
Reviewed By: passy
Differential Revision: D29662605
Pulled By: nikoant
fbshipit-source-id: acdc8bba73900c19500fc91f8a275930c51d73ad
Summary:
Fix selection problem on ManageMockResponsePanel. Currently, when the user adds new routes, the detail section continues to show the detail for the first route. Select different routes in the list does not change the detail panel. The screen is currently not doing anything on selection.
Also fixed a problem with updating on mock header names and values. Updates were not persisting if user did not exist input fields before leaving header input panel.
## Changelog
Network Plugin - Fix selection problem on ManageMockResponsePanel
Pull Request resolved: https://github.com/facebook/flipper/pull/2574
Test Plan:
Add multiple mock routes
Select various routes
Verify that detail panel shows the selected route

Reviewed By: passy
Differential Revision: D29582286
Pulled By: mweststrate
fbshipit-source-id: 6690e2262a033cdfa5afa6e6fdfacc9694244590
Summary: Apply local storage setting at a few relevant places, see parent diff
Reviewed By: cekkaewnumchai
Differential Revision: D29516498
fbshipit-source-id: 4797986e3540217e42dfb867f7d627921b97618e
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:
Github build is currently broken, so I'm removing this for now while I'm looking for the proper fix.
Failed job: https://github.com/facebook/flipper/runs/2947749418
Reviewed By: priteshrnandgaonkar
Differential Revision: D29491530
fbshipit-source-id: a2430033e18d3883adf2617beb0c60a67db5e183
Summary: Moved plugin documentation and related assets to plugin folders, fixed links and configured redirects where required. Now these docs are used for both showing docs in Flipper and generating Flipper docs website.
Reviewed By: passy
Differential Revision: D29465567
fbshipit-source-id: 3ec4240b215b0d5baea5154f64266a9ba7ead3a5
Summary:
This diff changes the way on how plugin documentation is produced. Instead of keeping plugin documentation together with other docs, we will now keep it together with plugin code. There are multiple advantages of such solution:
1. We are generating docs for every plugin in a standartised way so all of them looks similar. We can also use plugin metadata for generation as well (e.g. take title, icon, oncall name etc from package.json).
2. Standartised plugin docs make it possible to build docs both for websites (public and internal) and for embedding into Flipper.
3. It will hopefully incentivise authors to write docs as they will be a part of plugin "package".
4. We can scaffold documentation template using scarf to further incentivise filling it.
Reviewed By: jknoxville
Differential Revision: D29378053
fbshipit-source-id: 66ea48dc9ba225fabfb256ae6a10f8c81eef6f5f
Summary: Went over all plugins and did superficial fixes to make most plugins look decent or at least usable in dark mode, which before they weren't :)
Reviewed By: priteshrnandgaonkar
Differential Revision: D29456680
fbshipit-source-id: 3952e5da512c68b89434eea081faf121d1049908
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: per title, for reasons see next diff :)
Reviewed By: passy
Differential Revision: D29327501
fbshipit-source-id: 548d943e90769af478232d3031d916fb399a067a
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:
After loading a layout plugin snapshot, I noticed the plugin feels really sluggish. I noticed that getDimensions, which recursively walks the full tree, is triggered on every rendering, although the state it introduces is only required when opening a screenshot visualizer. So Moved the function invocation to there.
Also did some first steps on supporting iOS; the visualizer will no show a preview of iOS as well. I'll leave implementing the highlights to a volunteer :)
Reviewed By: passy
Differential Revision: D29262697
fbshipit-source-id: b13b19b013eeeb98abb66fb648a193c69688a7e3