bizzguy
1559c1ef2c
Network Plugin - Update UI for routes ( #1831 )
...
Summary:
The current UI for managing mock network request definitions (routes) has some issues
- too small for the amount of information it displays
- no formatting for JSON response bodies
- uses the older design system (not ant)
- no separation between commands for creating routes and the list of routes
The following screen images show these problems.


## Changelog
Enhance UI for Mocks dialog in Network Plugin
Pull Request resolved: https://github.com/facebook/flipper/pull/1831
Test Plan:
Ran multiple manual tests using the Android sample app. Here is a screen image (at 1280 x 720) for the enhanced UI.

Reviewed By: mweststrate
Differential Revision: D25922798
Pulled By: priteshrnandgaonkar
fbshipit-source-id: d27ba30a7eb51105a8d381097ecaafd82624cad5
2021-01-20 15:45:38 -08:00
James Harmon
0a06d6c546
Add button to copy highlighted requests to routes (mock requests) ( #1447 )
...
Summary:
Add feature to Network mocks in the Network Plugin which would allow a user to highlight network requests and copy into new routes (mocks).
For many production apps, network requests can contain many headers (easily 20 or more) and a large amount of data returned in the response (1000's of characters). Creating mocks for these manually is time consuming and error prone.
It would be better to make mocks automatically by allowing the user to highlight desired requests and have them automatically copied into new routes, also copying the headers and the response data.
Changelog: [network] Allow user to create new mock routes by highlighting existing network requests in the Network plugin
Pull Request resolved: https://github.com/facebook/flipper/pull/1447
Test Plan:
Tested this change manually by running through the following scenario using the sample Android app:
1). Run a GET request from the Sample app. Verify that the request/response is correct. Highlight the request to be copied.

2). Go to the Mock dialog by clicking on the "Mock" button

3). Click on "Copy Highlighted Call" to create a mock Route from the selected request. Verify that the "data" and "headers" tab panels are correct.


Close the Dialog
4). Run the request again from the sample app and verify that a mock request is returned with the correct data.


Reviewed By: cekkaewnumchai
Differential Revision: D23027793
Pulled By: mweststrate
fbshipit-source-id: 197fd5c3d120a20b6bc5d9121ae781923d69b748
2020-09-18 07:26:31 -07:00
ZHANG Qichuan
ae9c07c8f3
Persist the Network mock data ( #1218 )
...
Summary:
Persist the Network mock data, so it can survive after switching the plugins
Closes https://github.com/facebook/flipper/issues/1206
## Changelog
- Persist the Network mock data
- Remove the pref-filled '/' when creating a mock route
Pull Request resolved: https://github.com/facebook/flipper/pull/1218
Test Plan: <img width="807" alt="Screenshot 2020-06-02 at 11 45 15 PM" src="https://user-images.githubusercontent.com/410850/83540614-27e95000-a52b-11ea-8fc8-d7ad1373e904.png ">
Reviewed By: mweststrate
Differential Revision: D21863561
Pulled By: passy
fbshipit-source-id: 4706ede721c7990a6bcc0bfe51f41e80306ffac7
2020-06-19 05:27:48 -07:00
Pascal Hartig
fc9ed65762
prettier 2
...
Summary:
Quick notes:
- This looks worse than it is. It adds mandatory parentheses to single argument lambdas. Lots of outrage on Twitter about it, personally I'm {emoji:1f937_200d_2642} about it.
- Space before function, e.g. `a = function ()` is now enforced. I like this because both were fine before.
- I added `eslint-config-prettier` to the config because otherwise a ton of rules conflict with eslint itself.
Close https://github.com/facebook/flipper/pull/915
Reviewed By: jknoxville
Differential Revision: D20594929
fbshipit-source-id: ca1c65376b90e009550dd6d1f4e0831d32cbff03
2020-03-24 09:38:11 -07:00
Chaiwat Ekkaewnumchai
76bf2f3603
(Server) Add Removing Route Button
...
Summary:
- Add a close button when hovering over the component
- Remove the route corresponding to it when clicking on closing
Note:
- This is a part of this PR: https://github.com/facebook/flipper/pull/488
Reviewed By: mweststrate
Differential Revision: D20444419
fbshipit-source-id: 5ebe112c542b033a3e10ed10f23d6a04a730c657
2020-03-17 10:09:14 -07:00
Chaiwat Ekkaewnumchai
adb1d6e976
(Server) Add ManageMockResponsePanel
...
Summary:
- Add ManageMockResponsePanel to add, modify and remove mocked route
Note:
- This is a part of this PR: https://github.com/facebook/flipper/pull/488
Reviewed By: mweststrate
Differential Revision: D20440147
fbshipit-source-id: 3af127c4b091f288c13b41b74d78c07b4eb0e52f
2020-03-17 10:09:13 -07:00