Commit Graph

407 Commits

Author SHA1 Message Date
Flipper Bot
1c160fb6ac Flipper Release: v0.121.0
Summary: Releasing version 0.121.0

Reviewed By: passy

Differential Revision: D32641519

fbshipit-source-id: 4d137765188cba52597d73ea6c3634ee9ba8ab4b
2021-11-24 04:12:36 -08:00
Andrey Goncharov
a279b9bc43 Remove fs.readFile from some plugins
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
2021-11-18 09:15:30 -08:00
Andrey Goncharov
2c7bc0a952 Remove fs.write from plugins
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
2021-11-18 09:15:30 -08:00
Flipper Bot
71a19cef8b Flipper Release: v0.120.0
Summary: Releasing version 0.120.0

Reviewed By: jknoxville

Differential Revision: D32489726

fbshipit-source-id: 2843f8ddee7ec728dc320e3a4ae432ec392bc304
2021-11-18 06:58:54 -08:00
Michel Weststrate
7e50c0466a Move app/src (mostly) to flipper-ui-core/src
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
2021-11-16 05:29:21 -08:00
Andrey Goncharov
ed5c2bd39f Add plugin actions menu
Summary: See D32311662 for details

Reviewed By: mweststrate

Differential Revision: D32329804

fbshipit-source-id: 26670353fdf8580643afcb8bc3493384146f5574
2021-11-12 07:13:56 -08:00
Flipper Bot
af581a20a0 Flipper Release: v0.119.0
Summary: Releasing version 0.119.0

Reviewed By: nikoant

Differential Revision: D32309847

fbshipit-source-id: a4c4728c935111fa593ea629b564f2d8d02b9135
2021-11-11 02:44:32 -08:00
Michel Weststrate
8764da7c0b Add error handling to Layout.setHighlighted
Summary: Fixed error generated by monitoring, by adding a proper .catch

Reviewed By: lblasa

Differential Revision: D32278523

fbshipit-source-id: dd14f81d708893a1505ef902e0dc03fee433487b
2021-11-09 05:48:36 -08:00
Michel Weststrate
2fcd815098 Flipper Release: v0.118.1
Summary: Releasing version 0.118.1

Reviewed By: passy

Differential Revision: D32204867

fbshipit-source-id: ac9bc8d106375e834ea18f502b6badb52d726233
2021-11-05 10:59:55 -07:00
Michel Weststrate
2eaccff720 Remove Electron devtools closing
Summary: Follow up on D31992230 (2e7015388c) to replace `require('electron')` with `global.electronRequire('electron')`. However, during testing noticed that the Hermes debugger works just fine even with Electron DevTools open, so removed the logic altogether.

Reviewed By: aigoncharov

Differential Revision: D32167673

fbshipit-source-id: c6c6c07f07ac8c44e0f6959d56bf4c16725c186e
2021-11-05 05:14:03 -07:00
Flipper Bot
4c4ef9b68f Flipper Release: v0.118.0
Summary: Releasing version 0.118.0

Reviewed By: mweststrate

Differential Revision: D32167843

fbshipit-source-id: 1731e360ee1427ffabb9f0933470b1288bbe51a4
2021-11-04 04:29:00 -07:00
Michel Weststrate
2e7015388c Remove remaining Electron imports from product code: paths & env
Summary:
This diff removes most remaining Electron imports, by storing env and path constants on the RenderHost. As nice side effect those paths are all cached now as well.

To make sure RenderHost is initialised before Flipper itself, forced loading Flipper through a require. Otherwise the setup is super sensitive to circular import statements, since a lot of module initialisation code depends on those paths / env vars.

Reviewed By: nikoant

Differential Revision: D31992230

fbshipit-source-id: 91beb430902272aaf4b051b35cdf12d2fc993347
2021-11-03 07:01:21 -07:00
Juan Tejada
763a29d799 Update React Devtools v4.21.0
Summary:
Update `react-devtools-core` and `react-devtools` dependencies for RN, VSCode, Flippe, etc.

`js1 upgrade react-devtools -v 4.21.0`

# Changelog:

[General][Changed] - Upgraded react-devtools-core dependency to 4.21.0

Reviewed By: bvaughn

Differential Revision: D32065685

fbshipit-source-id: 30d0cca2bec6e9abe384da2afefab1d241e0523f
2021-11-01 10:46:02 -07:00
Anton Kastritskiy
4a4cc21d89 Refine DataSource id to use actual key type instead of a wide string type
Summary: Current implementation uses type `string` as a key for indexing items stored in datasource. However, users can provide any key as an index which means that the type of index item can be anything, not only string. This diff introduces a more refined types for the key. It adds another requirement to provide a key property to a generic which is used to infer the index type.

Reviewed By: mweststrate, aigoncharov

Differential Revision: D31895751

fbshipit-source-id: 19ba907bd6f35df87e3fa442db5fc5cec6af174d
2021-10-28 10:44:01 -07:00
Michel Weststrate
64e791e253 Remove usage of Electron context menus
Summary: Removed the usage of electron's native context menus, and replaces it with Antd based context menu's.

Reviewed By: passy

Differential Revision: D31990756

fbshipit-source-id: 0312cbac5fd20a1a30603ce1058c03f4291b23b1
2021-10-28 07:41:00 -07:00
Flipper Bot
360ecb4b24 Flipper Release: v0.117.0
Summary: Releasing version 0.117.0

Reviewed By: aigoncharov

Differential Revision: D31955241

fbshipit-source-id: 0a4c848c96bc63ebd1f4d642965693a1e3502f6c
2021-10-27 09:44:32 -07:00
Michel Weststrate
9763af4c96 Decouple open/save dialogs, reload, shouldUseDarkColors from Electron
Summary: Per title. Less imports from Electron.

Reviewed By: timur-valiev, aigoncharov

Differential Revision: D31923504

fbshipit-source-id: dc7557cf7c88c0c8168ba22f7dca7b3e2d339a09
2021-10-26 12:07:22 -07:00
Juan Tejada
2423423183 Update React DevTools v4.20.2
Summary:
Update `react-devtools-core` and `react-devtools` dependencies for RN, VSCode, Flipper, etc.

`js1 upgrade react-devtools -v 4.20.2`

# Changelog:

[General][Changed] - Upgraded react-devtools-core dependency to 4.20.2

Reviewed By: lunaruan

Differential Revision: D31809278

fbshipit-source-id: 0360fe173cfc7ce09595e6db4e8e41c6f64becd7
2021-10-25 14:00:42 -07:00
Flipper Bot
3a233129b3 Flipper Release: v0.116.0
Summary: Releasing version 0.116.0

Reviewed By: cekkaewnumchai

Differential Revision: D31789901

fbshipit-source-id: f714fa7195f5e07be72d8039074e8b745b657e72
2021-10-20 03:54:57 -07:00
Juan Tejada
0e91f8562a Update React DevTools v4.20.1
Summary:
Update `react-devtools-core` and `react-devtools` dependencies for RN, VSCode, Flipper, etc.

`js1 upgrade react-devtools -v 4.20.1`

# Changelog:

[General][Changed] - Upgraded react-devtools-core dependency to 4.20.1

Reviewed By: lunaruan

Differential Revision: D31762360

fbshipit-source-id: 9269a49afb263c78916852f51ebbd48ceaf531b0
2021-10-19 10:00:41 -07:00
Anton Kastritskiy
6facf5ed0f Fix eslint warning for communist-spelling/communist-spelling rule
Summary: Fixes eslint warnings

Reviewed By: passy

Differential Revision: D31760180

fbshipit-source-id: 635e842d626c58a2a8d2ea2543bf171237e93dc4
2021-10-19 09:40:49 -07:00
Zack Brody
9d34c90b9a Fix Date Label In Crashes Plugin
Summary: The date type for crash reports was updated in D29327501 (aff02b2ca1) from `Date` to `number`. Unset values were previously `null` but became `NaN` in this change. `NaN` is nonnull so the backup value of `Date.now()` was not getting triggered properly and leading to "Invalid Date" to show up in the UI.

Reviewed By: passy

Differential Revision: D31702757

fbshipit-source-id: da93b1f79eb633b2f49dcffbe680d56d47a23ea0
2021-10-18 12:21:52 -07:00
Juan Tejada
b4647eaa13 Update React DevTools v4.20.0
Summary:
Update `react-devtools-core` and `react-devtools` dependencies for RN, VSCode, Flipper, etc.

`js1 upgrade react-devtools -v 4.20.0`

# Changelog:

[General][Changed] - Upgraded react-devtools-core dependency to 4.20.0

Reviewed By: bvaughn

Differential Revision: D31694359

fbshipit-source-id: d05d75e9473878828617c5cd0db8d6008b6abd4d
2021-10-15 12:56:43 -07:00
Flipper Bot
bee907fab4 Flipper Release: v0.115.0
Summary: Releasing version 0.115.0

Reviewed By: passy

Differential Revision: D31612162

fbshipit-source-id: 34f54f6cd7e6f67086081db982cafcc8cccea89c
2021-10-13 11:57:59 -07:00
Michel Weststrate
91d96774f6 Move files to flipper-common
Summary: Moved Logger, sleep, timeout and server contract types to flipper-common packages.

Reviewed By: passy

Differential Revision: D31475790

fbshipit-source-id: 42d2147698875f9e919ad5250f9953f3bff3ec2d
2021-10-12 16:00:52 -07:00
Flipper Bot
e7b3ea9344 Flipper Release: v0.114.1
Summary: Releasing version 0.114.1

Reviewed By: passy

Differential Revision: D31501455

fbshipit-source-id: bfc85cf82b140364badff4a73069285f66b89b9f
2021-10-08 04:39:30 -07:00
Michel Weststrate
89b193b438 Clean up Sheet abstraction
Summary: This stack gets rid of Flippers old sheet abstraction that relies on native (Electron) overlays, and implements it using Ant dialogs instead. Also removes a lot of code by making dialog API imperative, rather than reducer organised, like done in the deeplink handling.

Reviewed By: passy

Differential Revision: D30192001

fbshipit-source-id: 9bca3274bd039207e58f8f9394027515e391671d
2021-10-06 09:10:19 -07:00
Juan Tejada
eab4804792 Update React DevTools from 4.13.0 -> 4.19.1
Summary:
Update `react-devtools-core` and `react-devtools` dependencies for RN, VSCode, Sonar, etc.

`js1 upgrade react-devtools -v 4.19.1`

# Changelog:

[General][Changed] - Upgraded react-devtools-core dependency to 4.19.1

Reviewed By: bvaughn

Differential Revision: D31345135

fbshipit-source-id: dae06a18699df19a6e8422460effd48f715e395b
2021-10-06 08:36:00 -07:00
Flipper Bot
49d41f15e3 Flipper Release: v0.114.0
Summary: Releasing version 0.114.0

Reviewed By: passy

Differential Revision: D31430620

fbshipit-source-id: fce3d83479199d27352c3b05d92fa6c5f0a69051
2021-10-06 08:09:30 -07:00
Flipper Bot
672cfad7d6 Flipper Release: v0.113.0
Summary: Releasing version 0.113.0

Reviewed By: jknoxville

Differential Revision: D31264525

fbshipit-source-id: 400ff8a08dd0671d780e5663b0538fe7e970b237
2021-10-01 09:12:06 -07:00
Pascal Hartig
4aa7439fbf Fix Flipper lints #10
Summary:
Grey -> gray. "Cancelled" seems quite common in APIs though, so I disabled that.
A few promise cleanups

Reviewed By: aigoncharov

Differential Revision: D31323610

fbshipit-source-id: c8863d995936f451c24eb408fe5c26677187f089
2021-10-01 08:08:35 -07:00
Michel Weststrate
b8236f1b3a Don't leave rejection unhandled if node fetching fails
Summary: Fix potentially unhandled promise rejection in Layout inspector. Not really reproducible, and probably originating from old Flipper versions (no trace is available either), since we have a lot of connection check in place. Just in case still handled the exception, for example if something goes wrong on client side

Reviewed By: passy

Differential Revision: D31267465

fbshipit-source-id: d1b384db7bb010af8d2aa12ae29110f343fb14af
2021-09-30 01:40:22 -07:00
Flipper Bot
597cb6b1da Flipper Release: v0.112.0
Summary: Releasing version 0.112.0

Reviewed By: nikoant

Differential Revision: D31140851

fbshipit-source-id: 18106a3f0c0383f8f32a7abf30866d9a72c912a4
2021-09-23 04:21:42 -07:00
Flipper Bot
2fc156c15a Flipper Release: v0.111.0
Summary: Releasing version 0.111.0

Reviewed By: nikoant

Differential Revision: D31107620

fbshipit-source-id: 3651b4e38c4311d895af411a15925eb99bef1382
2021-09-22 09:28:02 -07:00
Michel Weststrate
3882357579 Factor out realDevice [7/n]
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
2021-09-22 09:03:33 -07:00
Michel Weststrate
8cf182cc26 Restore adb executeShell [5/n]
Summary: Expose executeShell explicitly through the device interface

Reviewed By: jameslawson

Differential Revision: D31055959

fbshipit-source-id: b14395d0783ede265c6ae39c397ea93a85a78336
2021-09-22 09:03:32 -07:00
Michel Weststrate
4463e7ede2 Restore metro functionality [4/n]
Summary: Restored Metro functionality; progress reports, metro logs, RN/Hermes debugging, reload / dev menu button

Reviewed By: passy

Differential Revision: D31055958

fbshipit-source-id: c243035c343c14718a9afe275c8f5f36a1aa3a94
2021-09-22 09:03:32 -07:00
Michel Weststrate
2d838efd4d Separate device in server and client version [2/n]
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
2021-09-22 09:03:32 -07:00
Flipper Bot
5e10baa43f Flipper Release: v0.110.0
Summary: Releasing version 0.110.0

Reviewed By: mweststrate

Differential Revision: D31020264

fbshipit-source-id: e161705979fda9f95ddd212d5f35ede4bb8f49c3
2021-09-17 09:23:20 -07:00
Mathias Fleig Mortensen
094c320c5c Ignore react-vis types missing
Reviewed By: defHLT

Differential Revision: D30993257

fbshipit-source-id: 32d7f6af837f47407e10e3c3bd744071d6b374e6
2021-09-17 04:23:27 -07:00
Mathias Fleig Mortensen
b62cd63f58 Add typing for TreemapPoint functions
Reviewed By: timur-valiev

Differential Revision: D30992497

fbshipit-source-id: 616f11d34d2904655f74c9313a511b8e14a13524
2021-09-17 04:23:27 -07:00
Flipper Bot
fbe2b590d1 Flipper Release: v0.109.0
Summary: Releasing version 0.109.0

Reviewed By: mweststrate

Differential Revision: D30988723

fbshipit-source-id: 795fef1a475eb3c15ee323626a92e76345239af0
2021-09-16 05:45:15 -07:00
Mathias Fleig Mortensen
6359c82be1 Add memory consumption treemap tab
Summary: There are some issues with label positioning, but overall works.

Reviewed By: defHLT

Differential Revision: D29588329

fbshipit-source-id: 5c2e8f6f139d997559111fa2ad124ae1d695b36a
2021-09-15 07:47:34 -07:00
Michel Weststrate
5fb23f83e9 Fix NPE in LayoutInspector
Summary: Fixed a potential NPE that could happen in layout editor.

Reviewed By: passy

Differential Revision: D30870185

fbshipit-source-id: 3ae5860ce63761336d8bc508dd8eff761a5ab1f8
2021-09-13 01:03:58 -07:00
Flipper Bot
dcafcf85d7 Flipper Release: v0.108.0
Summary: Releasing version 0.108.0

Reviewed By: mweststrate

Differential Revision: D30868044

fbshipit-source-id: 07b58271f174095843368e884da36598e83eb77c
2021-09-10 09:03:13 -07:00
Michel Weststrate
d8f77db632 Code improvements and more logging on connection handling
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
2021-09-10 07:04:43 -07:00
Flipper Bot
7e95848b9e Flipper Release: v0.107.0
Summary: Releasing version 0.107.0

Reviewed By: mweststrate

Differential Revision: D30819921

fbshipit-source-id: 64d7e157b320a9826d9b72d140585a4106546b95
2021-09-08 16:35:28 -07:00
Pascal Hartig
47099cfd31 Fix Flipper lints #16
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
2021-09-08 08:44:19 -07:00
Flipper Bot
1fcae2fefd Flipper Release: v0.106.0
Summary: Releasing version 0.106.0

Reviewed By: mweststrate

Differential Revision: D30803788

fbshipit-source-id: c87f23cfe76bfa515c1028d65857733e2d1ade8e
2021-09-08 04:22:40 -07:00
Flipper Bot
1b2d7b9f61 Flipper Release: v0.105.0
Summary: Releasing version 0.105.0

Reviewed By: lblasa

Differential Revision: D30694560

fbshipit-source-id: 0427c4d1d4b34345661472cce5a6e256a31f0f95
2021-09-01 11:46:27 -07:00