Commit Graph

6 Commits

Author SHA1 Message Date
Michel Weststrate
b7cfb509f1 Improve request formatting
Summary:
This diff adds several improvements to displaying requests / responses in the network plugin

1. If there is no formatter rendering the data, the data is rendered 'raw'
2. For binary data, `(binary data)` text is printed, rather than an empty box
3. For request that have an empty request / response, `(empty)` is printed, rather than an empty box
4. If a formatter is applied, we show which formatter was used, which makes it easier to debug / spot / report issues
5. If the graphql formatter can't parse the data because it is truncated, it won't return anything, so that it falls back to the next formatter (urlencoder) to take care of the presentation

Changelog: [Network plugin] Improved presentation of request / response bodies and fixed issues where they would sometimes not be displayed.

Reviewed By: jknoxville

Differential Revision: D22865373

fbshipit-source-id: 912d2f27269a4c9edbf62f2039d46ccf90a008af
2020-08-03 11:39:49 -07:00
Michel Weststrate
eff378defa Avoid JSON.stingify during render
Summary:
See previous diffs, same change as with analytics, don't stringify when creating the rows, but rather provide a closure to do that lazily, which reduces CPU (and mem) usage.

Note that this implicitly assumes the captures variables are immutable, as otherwise the semantics would change. But than again, if those variables are changed in the future, copyText will reflect their latest rather than initial state, which is better anyway.

Reviewed By: nikoant

Differential Revision: D21931748

fbshipit-source-id: 62325dd25953bab3a4e2e9a0d5dea3b3a7787bae
2020-06-09 03:00:23 -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
a624b064a8 (Server) Fix Naming
Summary: per title

Reviewed By: mweststrate

Differential Revision: D20489140

fbshipit-source-id: 8678c1bfed578c5ec7138e0ccb25777942d5ed4c
2020-03-19 05:18:25 -07:00
Chaiwat Ekkaewnumchai
1d23b5418a (Server) Include Mock Component to Main Files
Summary:
- Add mock button if a client supports the function
- Open the dialog when clicking the button

Note:
- This is a part of this PR: https://github.com/facebook/flipper/pull/488

Reviewed By: mweststrate

Differential Revision: D20440145

fbshipit-source-id: 750099020e0b2d6ed10bb20e883f6b3be664ae79
2020-03-17 10:09:13 -07:00
Anton Nikolaev
10d990c32c Move plugins to "sonar/desktop/plugins"
Summary:
Plugins moved from "sonar/desktop/src/plugins" to "sonar/desktop/plugins".

Fixed all the paths after moving.

New "desktop" folder structure:
- `src` - Flipper desktop app JS code executing in Electron Renderer (Chrome) process.
- `static` - Flipper desktop app JS code executing in Electron Main (Node.js) process.
- `plugins` - Flipper desktop JS plugins.
- `pkg` - Flipper packaging lib and CLI tool.
- `doctor` - Flipper diagnostics lib and CLI tool.
- `scripts` - Build scripts for Flipper desktop app.
- `headless` - Headless version of Flipper desktop app.
- `headless-tests` - Integration tests running agains Flipper headless version.

Reviewed By: mweststrate

Differential Revision: D20344186

fbshipit-source-id: d020da970b2ea1e001f9061a8782bfeb54e31ba0
2020-03-14 14:35:18 -07:00