Commit Graph

13 Commits

Author SHA1 Message Date
Andrey Goncharov
bfc4e959bc Export power search enabled components and types by default
Summary: Provides power search typings to all users by default

Reviewed By: LukeDefeo

Differential Revision: D51306600

fbshipit-source-id: c1f0d318d8b6953dd02af16d2c51abbf0e6e9590
2023-11-15 05:00:21 -08:00
Andrey Goncharov
4bb0f59ab8 Migrate to power search
Reviewed By: LukeDefeo

Differential Revision: D51027189

fbshipit-source-id: 4fb3699a278db280237e5182d41d3c746e44a2bb
2023-11-08 02:08:25 -08:00
Andrey Goncharov
7c5ede7a5e Force legacy search for network plugin
Summary: Uses legacy API `tableManagerRef.current?.setSearchValue` not currently available in power search

Reviewed By: LukeDefeo

Differential Revision: D50969833

fbshipit-source-id: c83d9dce24f5d7a37b6cc68e19da2ae5da374941
2023-11-03 08:03:50 -07:00
Lorenzo Blasa
ff6f98fc0d Import File implementation
Summary: Implementation was missing for the browser. This provides a default implementation.

Reviewed By: aigoncharov

Differential Revision: D48311198

fbshipit-source-id: fd067600f571234e0fbccfb90853b62f175ff8fb
2023-08-14 11:33:06 -07:00
Andres Suarez
79023ee190 Update copyright headers from Facebook to Meta
Reviewed By: bhamodi

Differential Revision: D33331422

fbshipit-source-id: 016e8dcc0c0c7f1fc353a348b54fda0d5e2ddc01
2021-12-27 14:31:45 -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
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
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
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
bizzguy
b378d8b946 fix problem with mock request data (#2340)
Summary:
Network Plugin - When creating a mock request from a selected request, the request data is not in the proper format.  It is decoded instead of just being copied from the call (which has already been decoded properly).  This PR fixes that problem.

Below is a screenshot showing the problem (which occurs for all text response data):

![image](https://user-images.githubusercontent.com/337874/118744068-423e3b80-b819-11eb-9076-216459517fdb.png)

## Changelog

Network Plugin - Fix problem with decoding request data for mocks copied from selection

Pull Request resolved: https://github.com/facebook/flipper/pull/2340

Test Plan:
Using the sample Android app, issue a network request

In Flipper, create a mock for the network request by selecting it and using the "Copy Selected Calls" function in the mock

Verify that the request data is readable:

![image](https://user-images.githubusercontent.com/337874/118744220-8af5f480-b819-11eb-9206-0fa40e7d7e46.png)

Note:

Testing was done using the sample app which uses responses with JSON data.  I was not able to provide testing for other types of calls, specifically calls that would return binary data.

Reviewed By: passy

Differential Revision: D28533224

Pulled By: mweststrate

fbshipit-source-id: ce11d23ade60843c110286f7a5bbeba91febbcf0
2021-05-19 03:15:30 -07:00
Michel Weststrate
72e34bbd0d Parse request bodies eagerly
Summary:
Currently the network plugin was always storing the transfer format of our request/ response bodies: a base64 string. However, those are not searchable, and every formatter (and multiple can be invoked in a single view) was responsible for its own decompressing.

This diff changes parsing requests / responses into an accurate format: a decompressed, de-base64-ed utf8 string, or a Uint8array for binary data.

We will use this in the next diffs to do some more efficient searching

Reviewed By: passy

Differential Revision: D28200190

fbshipit-source-id: 33a71aeb7b340b58305e97fff4fa5ce472169b25
2021-05-06 04:27:59 -07:00
Michel Weststrate
fc4a08eb55 Convert plugin UI to Sandy
Summary:
Changelog: Updated Network plugin to Sandy UI, including several UI improvements

Converted UI to Sandy, and some minor code cleanups

Moved all mock related logic to its own dir

Fixes https://github.com/facebook/flipper/issues/2267

Reviewed By: passy

Differential Revision: D27966606

fbshipit-source-id: a64e20276d7f0966ce7a95b22557762a32c184cd
2021-05-06 04:27:59 -07:00