Commit Graph

1393 Commits

Author SHA1 Message Date
Pritesh Nandgaonkar
ca53f35875 Refactor export data functions and exportpersistedstate function to just expect state
Summary: This diff refactors the `exportpersistedstate` and few of the functions in exportData.tsx to just expect the Redux State instead the store object.

Reviewed By: mweststrate

Differential Revision: D18733011

fbshipit-source-id: 56739917b49142ba4b6e79e7c16378fe60d6ac3b
2019-11-28 03:49:26 -08:00
greenkeeper[bot]
bf85da17ab Update @types/react to the latest version � (#659)
Summary:
## The devDependency [types/react](https://github.com/DefinitelyTyped/DefinitelyTyped) was updated from `16.9.11` to `16.9.12`.
This version is **not covered** by your **current version range**.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

 ---

**Publisher:** [types](https://www.npmjs.com/~types)
**License:** MIT

[Find out more about this release](https://github.com/DefinitelyTyped/DefinitelyTyped).

 ---

<details>
  <summary>FAQ and help</summary>

  There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).
</details>

 ---

Your [Greenkeeper](https://greenkeeper.io) bot 🌴
Pull Request resolved: https://github.com/facebook/flipper/pull/659

Reviewed By: passy

Differential Revision: D18673007

Pulled By: cekkaewnumchai

fbshipit-source-id: feaef03f55b8e8aba9d898700c49acf72e2172cc
2019-11-28 03:13:47 -08:00
Pritesh Nandgaonkar
0a311def8f Refactor Listview to make it agnostic to the export logic
Summary: This diff makes Listview agnostic to the logic of the sharing.

Reviewed By: mweststrate

Differential Revision: D18711095

fbshipit-source-id: 75541dee0b5740c9951c46118d96292e28979507
2019-11-27 08:46:00 -08:00
Pascal Hartig
0a7c57f5a0 Back out "Back out "[flipper][js] JS apps support 1/n""
Summary:
Original commit changeset: ff84080d43fa

This re-adds JS client support. The original version had a small bug that inadvertantly wrapped support for Android emulators in the dropdown in a GK that was only meant to cover JS clients. This is addressed here.

Reviewed By: timur-valiev

Differential Revision: D18707485

fbshipit-source-id: ceea8e279a21111f96073f8b784e852f6313e2a4
2019-11-26 09:37:57 -08:00
Michel Weststrate
e99f2bcd8b Apply styling to support details form
Summary:
Applies some additional styling to the support details form, and implemented the screenshot / video styling.

Probably needs some more fixes in the future, once we have a real report to import :)

Reviewed By: jknoxville

Differential Revision: D18658388

fbshipit-source-id: dc9207ec08b3f4360c96d8d14980710c57d6b5ec
2019-11-26 09:37:57 -08:00
Pascal Hartig
a75a52a25b Back out Electron 7.1.1/7.1.2 upgrades
Summary:
Original commit changeset: eddfbb3571c7
Original commit changeset: f7300f527b65

Pains me to do this, but probably our best chance right now to get a release out.

Reviewed By: cekkaewnumchai

Differential Revision: D18687890

fbshipit-source-id: 05d13aca71457ca6dd19f5b45d58158ae223e66f
2019-11-26 05:30:34 -08:00
John Knox
2fd6301876 Back out "JS apps support 1/n"
Summary:
Original commit changeset: 56d1ca1a60ed

This broke Android support in some instances. We haven't had a chance to investigate this yet, but this should cleanly reapply, so we can figure out what happened after the release.

Reviewed By: cekkaewnumchai

Differential Revision: D18688590

fbshipit-source-id: ff84080d43fa481cc8c8c669a76aed15d0f8aa56
2019-11-26 05:30:34 -08:00
Michel Weststrate
a66501d7a6 style video recording section
Summary: style video recording section

Reviewed By: jknoxville

Differential Revision: D18658103

fbshipit-source-id: 450ed1e3a1ee4330183f14b2c00486649087c3bb
2019-11-22 09:47:51 -08:00
John Knox
3f7fa0eb1a Use workplace markdown style
Summary: Mimicking the workplace markdown style so people feel more familiar with it and don't get surprises when posting.

Reviewed By: passy

Differential Revision: D18639041

fbshipit-source-id: 0097087b8ae4da8e29609604eeffd5b349ebe7ab
2019-11-22 07:02:49 -08:00
John Knox
018ed212bc Improve markdown header spacing
Summary:
The spacing above headings didn't look right.

Also workplace purposely limits the different heading sizes to 2 to encourage using notes for large posts. So I'm changing this to match. If we need to have arbitrary depth in future, we can add a `workplaceMode` toggle, but so far that's the only use case we have.

Reviewed By: mweststrate

Differential Revision: D18638861

fbshipit-source-id: 3949a37515e4282bb8435c2740ef45a55e5a97cc
2019-11-22 07:02:49 -08:00
John Knox
d7cfefb2bd Add markdown preview to support request composer
Summary:
Adds a side-by-side markdown preview to the support form.
No time spent on UI because it makes sense to do it all together.

There also seems to be a problem with state updates not propagating when values are changed, so currently it never gets updated.

Reviewed By: passy

Differential Revision: D18638025

fbshipit-source-id: c4a49286434c7e2e85d532aef3a36924e02a4467
2019-11-22 07:02:48 -08:00
Timur Valiev
c685493db0 JS apps support 1/n
Summary:
### Connecting Flipper with JS apps by using electron's BrowserWindow and IPC

1. UI: there is a menu item in Devices tab which opens JS Emulator Launcher Sheet. Here we can configure URL to open and initial size of the window.
2. BrowserWindow, preloaded js: there is SupportJSClientPreload.js which initialize communication between flipper and app via electron's ipc
3. On flipper's side there is src/utils/js-client/serverUtils.tsx which contains most of JS emulator related code
4. Extracting of FlipperClientConnection: since we don't use RScocket to communicate with JS app I extracted needed methods to FlipperClientConnection (located in Client) and partly implemented them in JSClientFlipperConnection (requestResponse is just send a message now, doesn't return actual result)

Reviewed By: jknoxville

Differential Revision: D18572882

fbshipit-source-id: 56d1ca1a60ed2e51329b917021a09382cbb1ceec
2019-11-22 03:11:29 -08:00
Michel Weststrate
e7ad713df8 connect request form v2 to sidebar nav
Summary: If the GK is enabled, get the new litho support form from the sidebar!

Reviewed By: jknoxville

Differential Revision: D18639060

fbshipit-source-id: c10a32fc4725374dbd6d89e16944642d3124037e
2019-11-21 11:16:42 -08:00
Michel Weststrate
fef8d5a50f style support request form
Summary:
Styles the create support request form similarly to the details form, using the standard UI components.

N.B. Video section styling will be a separate diff

Reviewed By: jknoxville

Differential Revision: D18637989

fbshipit-source-id: f1cc6967b6841a55e770043f330e1a87ac7bfb50
2019-11-21 11:16:41 -08:00
Michel Weststrate
dd65ec6ed0 Make it possible to export support form V2 with meta data
Summary:
This diff enables a full roundtrip of exporting a bug report to file / link, and importing it again.

Styling is not part of this story.

Reviewed By: jknoxville

Differential Revision: D18636418

fbshipit-source-id: ef9a8e3622bdac9361f612d51415a593f4268b80
2019-11-21 08:01:49 -08:00
Michel Weststrate
f33666a4b9 Diff and update mobile configs
Summary:
This diff makes it possible to apply MC's to a currently running as part of the support form process.

Things _NOT_ done in the diff:

* make sure getUniverses and getGatekeepers returns valid configs (this broke since somewhere last week, opened T57918601 for that. However, before that this worked correctly
* provide a more interactive UI when applying MC's, such as beeing able to see a diff preview, ask confirmation before overriding current config, etc

Reviewed By: jknoxville

Differential Revision: D18452172

fbshipit-source-id: da3f24bccf88260282f86e2564e983a9ee217c2f
2019-11-21 08:01:49 -08:00
Pascal Hartig
86caf00ead Clarify build-in bugreporter use
Summary: Just to distinguish this from the other bug reporter we have.

Reviewed By: cekkaewnumchai

Differential Revision: D18636872

fbshipit-source-id: d7bfca3908083d198647af90aa6d9d1c615e6a44
2019-11-21 07:01:33 -08:00
Pascal Hartig
d6b7bd557b Fix props naming (#646)
Summary:
It's camelCase for props in JS.

Would be good to have a linter for this in place.
Pull Request resolved: https://github.com/facebook/flipper/pull/646

Test Plan: yarn flow

Reviewed By: jknoxville

Differential Revision: D18613822

Pulled By: passy

fbshipit-source-id: 9cf03b2a02c7802853edb15cbde8df998df5deb2
2019-11-21 06:55:02 -08:00
Michel Weststrate
5589a1b77b Introduce Info / VBox / HBox / Labeled for more consistent layouting
Summary:
This diff introduces a set of components:

VBox: use this to group things vertically, it little more than a container that fills the full width and adds bottom margin (see screenshot: creating distance between the boxes)

HBox: use to divide a space horizontal in two, and distribute it over two children, supports growing the right side, left side or both equally. In the image used to reserve the necessary width for the image, and give the remaining space to the text

Info: A component that shows a message, prestyled with one of the four types: info, error, warning, pending.

{F222993480}

Reviewed By: jknoxville

Differential Revision: D18595291

fbshipit-source-id: 1957db1b606b2e44e3104b10d32ad8ce75af6adc
2019-11-21 06:30:09 -08:00
Michel Weststrate
c976e3ed63 Cache some more icons, used by several plugins
Summary: Cache icons commonly used by plugins.

Reviewed By: jknoxville

Differential Revision: D18595264

fbshipit-source-id: 31b287c909a397a93da1f3969627bcaded2afe8f
2019-11-21 06:30:08 -08:00
Michel Weststrate
f9f1d60267 Fix some DEV errors showing up as DEV: [{}]
Summary: Collections of errors were not reported correctly in the UI. Also, reporting errors could crash flipper if the error is not serializable (for example due to being cyclic).

Reviewed By: jknoxville

Differential Revision: D18595257

fbshipit-source-id: 689b6dbfe5d7daa6d84bd703dba9daa6be2e6b82
2019-11-21 06:30:08 -08:00
Stephen Tseng
d07993ea6b Convert Flipper plugin "Sandbox" to TypeScript
Summary: As title

Reviewed By: jknoxville

Differential Revision: D18573661

fbshipit-source-id: 2e26e9feee60543df6155046c52e5a03fa233286
2019-11-21 03:15:41 -08:00
Anton Nikolaev
ddb135ac39 Basic Doctor UI
Summary:
- Basic Doctor UI showing issues with installation
- Run healthchecks in background on startup and show warning message if something is wrong

Reviewed By: jknoxville

Differential Revision: D18502599

fbshipit-source-id: 194939a080ba7412ed3293d95c533bfad7031d3b
2019-11-21 03:10:36 -08:00
Mihaela Ogrezeanu
4d324075e9 Show caller stack trace
Summary: On Android, the stack trace looks different so we don't need to use the Regex we use on iOS. We can simply display all the lines in the trace.

Reviewed By: pasqualeanatriello

Differential Revision: D17181400

fbshipit-source-id: e471da17b89806a161edc7edcf05ac6faed44bf0
2019-11-19 10:28:18 -08:00
John Knox
352d9c82cb Add Markdown component to render markdown
Summary:
Adds a Markdown component to the component library.

The react-markdown library doesn't work out of the box because elements it outputs don't have any styles, e.g. h1, h2, p, em, etc.

So I've added a custom renderer to give styles to each of these that workplace markdown uses.
The only one I haven't done at the moment that I'm aware of is numbered-lists.

There's probably a way to get back the original styling of these elements so we don't need a custom renderer, but this works for now, and also allows us to customise their appearance.

Reviewed By: passy

Differential Revision: D18533085

fbshipit-source-id: a4332a11d34d577a6300074e4dde126362d46a6b
2019-11-19 05:52:51 -08:00
Chaiwat Ekkaewnumchai
6c4e687d63 Fix Notifications Not Showing up
Summary: Notification tab was not accessible previously.

Reviewed By: passy

Differential Revision: D18590702

fbshipit-source-id: 36888a2e695dc701ea848cb772c00e4feed8659f
2019-11-19 05:20:20 -08:00
Pritesh Nandgaonkar
f1aeb947b7 Persist the state of the support form
Summary:
This diff migrates the current state variables of the support form to the redux store, so that they can be persisted. This change will make them exportable and also solve the bug, where user navigates away from the form and comes back to see the support form's data vanished.

Right now the videos are not persisted, as its uploading bit is a work in progress.

Reviewed By: passy

Differential Revision: D18531674

fbshipit-source-id: b1e824377da55cf531312920ff1bb5b862a12010
2019-11-18 12:38:29 -08:00
Michel Weststrate
d97675f2e6 Fix broken export functionality
Summary: This fixes a regression bug introduced by the rework sidebar selection: when trying to export a Flipper Trace flipper would error: 'No client exported' after making plugin selection

Reviewed By: priteshrnandgaonkar

Differential Revision: D18571143

fbshipit-source-id: c7a292e53cb79d0b2d95e09f8e9b041ae0d711cf
2019-11-18 08:32:44 -08:00
Michel Weststrate
f22e373136 Improve support request details import form
Summary:
Created as standard layout that can be used for both the import and export form

Standardized components used, so that we work towards a Design Framework that is consistent. Took inspiration from some existing plugins.

Also fixed weird sidebar transparency.

Reviewed By: passy

Differential Revision: D18504078

fbshipit-source-id: 7649abf7aa3eba8ba635337a41274bba93738e81
2019-11-18 02:21:15 -08:00
Michel Weststrate
9f7be13e39 Rework sidebar selection
Summary:
- Make sure newly connecting apps are automatically selected
- Improved the sidebar UI by using more consistent, spacious styling, and giving some more attention to error states

Reviewed By: passy

Differential Revision: D18505636

fbshipit-source-id: 18b2c8e78be13aabb3a54c60553f6b0d1e613b27
2019-11-18 02:21:14 -08:00
Michel Weststrate
0a8222410c Fix React devtools experience
Summary:
Currently most components are shown anonymously in the component tree, because using `styled` creates unnamed components, shown as the HTML elements they result in.

This has two downsides:
1. React errors / warnings are really vague and it is hard to locate where they are coming from
2. The React Devtools don't show which components are rendering.
3. The effect of the latter it is hard to copy-from-example when developing plugins. This leads to a lot of inconsitency and duplication in the layouts of components

Reviewed By: jknoxville

Differential Revision: D18503675

fbshipit-source-id: 5a9ea1765346fb4c6a49e37ffa4d0b4bbcd86587
2019-11-15 02:09:32 -08:00
Pascal Hartig
24097ea9b2 Make plugin updates work
Summary:
Effectively just removes and re-installs but that way we know
we have everything we need.

Reviewed By: jknoxville

Differential Revision: D18479831

fbshipit-source-id: 5d47abfc660288e1137f393534512997e8b3f83e
2019-11-14 08:53:16 -08:00
Pascal Hartig
144338e74a Add update indicators to PluginInstaller
Summary:
Display is functional, the update itself isn't just yet.
Want to keep this easier to review. Instead of GK, I just
have a top-level toggle for now, because that will go
away with one of the next diffs anyway.

Reviewed By: jknoxville

Differential Revision: D18479290

fbshipit-source-id: b49394d4ab681c9d1dc5db0e4bee54f9255494b9
2019-11-14 08:53:16 -08:00
Pascal Hartig
7a148ef7a6 Search for update logic
Summary:
To be used in the following diff and because it's super side effect
heavy, I didn't bother to implement tests for it.

Reviewed By: jknoxville

Differential Revision: D18479311

fbshipit-source-id: 5cbcae0ebf2de4558b993325e50f6a2da1ed3ea7
2019-11-14 08:53:15 -08:00
Pritesh Nandgaonkar
8afc1b67f3 Record and display videos
Summary:
This diff adds one more section in the Support Screen V2. This section records and displays the emulator screen. Right now the videos are stored at the very same location where our currently recorded videos are stored. For displaying them on UI I have used `react-player` dependency.

For the upload bit:

I will see how the exisiting e2e tests upload videos and if we can use their approach. Or else we can just upload videos on everstore and export its handle as part of flipper trace. The last resort can be to base64 encode it along with the trace.

Reviewed By: mweststrate

Differential Revision: D18460779

fbshipit-source-id: 8ddd51f59e5237a1a80f05bf90dfc3bead651143
2019-11-14 06:28:19 -08:00
Michel Weststrate
d2ab55a6f8 Introduce support request details form
Summary: Initial setup for a support detail form. Will only show up if meta data is present in the flipper file, so use the attached one to see it.

Reviewed By: jknoxville

Differential Revision: D18479193

fbshipit-source-id: 61da089f1e883fea20b2422a6bea99b2f8a4434b
2019-11-14 05:46:14 -08:00
Chaiwat Ekkaewnumchai
a578b4d559 @allow-large-files [flipper][deps] Upgrade Electron (#636)
Summary:
allow-large-files

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

per title

Reviewed By: jknoxville

Differential Revision: D18374332

fbshipit-source-id: f7300f527b65b65caebac51c5bcf8f019dc34228
2019-11-13 10:51:16 -08:00
John Knox
6fee72513e Fix sidebar text
Summary:
"Not connected clients" doesn't really make sense.
Changing to to "No clients connected"

Reviewed By: passy

Differential Revision: D18478077

fbshipit-source-id: 2d9d3853997a3401d41463e1a956773b3514c14f
2019-11-13 08:39:21 -08:00
Michel Weststrate
dcb6595d1d Make imported devices visually recognizable
Summary:
If a flipper file is imported, from now on we will show that fact in the sidebar to make it more clear we are looking at an imported device. Beyond that, those devices are marked as `(imported)` rather than `(offline)` to distinguish between offline and imported devices.

This should help with future feature like cross device applicable actions.

Reviewed By: jknoxville

Differential Revision: D18448190

fbshipit-source-id: 560084f010207c99cecd616e43a6cc02e62cbc7a
2019-11-13 08:36:56 -08:00
Michel Weststrate
33a91b5e0f Fix tabs offset
Summary: Tabs have a weird negative offsite in the mobile config section (they have everywhere by default, to escape their containers in a mac-style but it does hide them in this specific case)

Reviewed By: priteshrnandgaonkar

Differential Revision: D18448191

fbshipit-source-id: 792daa5a3ef1aa91df730bd185124076471e42d3
2019-11-13 08:36:55 -08:00
Michel Weststrate
989b32c7b9 only capture selected application in exports
Summary:
Currently flipper export exports all connected the clients. This causes a few problems

1. This might often be unintended by the user, causing accidentally sharing (sensitive) information in the trace
2. This slows down things unnecesary. Especially if there is connected application, which is expensive, but not needed. See the attached video for the impact on exporting flipper: Export size reduzed from 11 to 0.5 mb. Export time from 20 seconds down to 1. (Flipper might not be a representative example, but imagine working on fb4a and having instagram on the emulator as well).

Reviewed By: priteshrnandgaonkar

Differential Revision: D18448194

fbshipit-source-id: f4de4c6dd89bda20251eb5f7423f7996339c8f2d
2019-11-13 08:36:55 -08:00
Michel Weststrate
f2d12f1025 Fixed a bunch of prettier errors after upgrading
Summary: prettier upgrade uncovered more errors

Reviewed By: passy

Differential Revision: D18474908

fbshipit-source-id: b1553000fb3386f2bbd9defdd3332618e4b9c867
2019-11-13 08:36:54 -08:00
Pritesh Nandgaonkar
5bdba4935a Commit hash field added
Summary:
This diff adds commit hash field in the support form v2 and we prefill the information.

If changes are not pushed to phabricator we will populate it with commit hash or else we will populate it with Diff number.

See the demo to understand the flow.

{F222000517}

Reviewed By: jknoxville

Differential Revision: D18427044

fbshipit-source-id: 80a58baca381e21203da5670e29144a7e8c2eeed
2019-11-12 04:52:42 -08:00
Michel Weststrate
774fddb6bf collapse error bar by default
Summary: Since most employees use flipper in development mode, the current error bar might be overly obtrusive, so we collapse it by default

Reviewed By: priteshrnandgaonkar

Differential Revision: D18448192

fbshipit-source-id: 9aa211df6c9a519860dffdced3619119e0ee8e22
2019-11-12 04:46:06 -08:00
Michel Weststrate
d6814a8bf6 Move sidebar client selection state to redux store
Summary:
This diff moves the selection storage from local state to the Redux store.
This makes the state available to the export data functionality (next diff)

Reviewed By: priteshrnandgaonkar

Differential Revision: D18448193

fbshipit-source-id: b1cce083ac7805c539de22aca0bd05c18e1b66e0
2019-11-12 04:46:05 -08:00
John Knox
e2c196cc7c Upgrade uglify-js
Summary: Fixes https://github.com/facebook/flipper/issues/629

Reviewed By: mweststrate

Differential Revision: D18429396

fbshipit-source-id: 206211c0e6e248b0a05a59a1347cbd239e78c298
2019-11-12 02:03:15 -08:00
Michel Weststrate
93655d39b8 Fix more react warnings
Summary: Fixing random React errors as I encountered them.

Reviewed By: jknoxville

Differential Revision: D18397950

fbshipit-source-id: cb73fcd6cd9aac2cd53c982e5a58760be12a10ca
2019-11-11 05:11:04 -08:00
Pritesh Nandgaonkar
19937c4b83 Fix the import and export of the createtable plugin
Summary:
Before this diff, plugins made with createTablePlugin would not be exportable as it uses ImmutableJS's Map which is not serializable. In the custom serializer we just handle the normal map, not the immutableJS one. Thus to tackle this I overrode the serializer and deserializer methods to handle it.

Before this diff the funnellogger import didn't work.
{F221607733}

Reviewed By: mweststrate

Differential Revision: D18352298

fbshipit-source-id: 57d4f3e19f38c12a30e75167646ae43ac8690e08
2019-11-08 06:21:17 -08:00
Pritesh Nandgaonkar
f4a42cc4ea Add more telemetry events
Summary:
Added more telemetry events for the following events

- Time taken for each plugin to fetch meta data
- Overall time taken for fetching all meta data
- Overall time taken for serializing plugins
- Time taken to serialize individual plugins with overridden serializer and deserializer methods

Reviewed By: passy

Differential Revision: D18349588

fbshipit-source-id: 2b3a6b663a9df4da45580fc0be5651a27ca4093d
2019-11-08 05:05:02 -08:00
Michel Weststrate
9a8e267f2a Fixed React key warnings in Layout inspector
Summary: Fixed some React key warnings

Reviewed By: passy

Differential Revision: D18394993

fbshipit-source-id: 804b8e2cb8525253e2ef8120b621dcb98af0e3e5
2019-11-08 04:37:01 -08:00