Commit Graph

314 Commits

Author SHA1 Message Date
Chaiwat Ekkaewnumchai
94ce34066b Fix Log-in Outside Lighthouse Crash The App
Summary:
The `error` was not recognized as a string and React was not happy about it.

Change the `error` to a string explicitly. Also, add space between the error and the form box.

Reviewed By: jknoxville

Differential Revision: D18829862

fbshipit-source-id: 0474d411a95bab4bc4f62a3f3d3839029938a9e6
2019-12-05 05:46:17 -08:00
Chaiwat Ekkaewnumchai
07487e8122 Change NotificationsHub to StaticView
Summary:
- Point the Noitifications to the static view
- Add function to check activeness of static view
- Add `SupportRequestDetails` to type (needed?)

Reviewed By: mweststrate

Differential Revision: D18810149

fbshipit-source-id: a33f61f521f3db0dd2a73e56d99b12d029b46a57
2019-12-05 03:26:28 -08:00
Michel Weststrate
5c680ff325 Fix alignment of uploading progress and overflow of video preview
Summary: Nuf said

Reviewed By: jknoxville

Differential Revision: D18782822

fbshipit-source-id: b17723694e8528408b77f27467132bf83695a84a
2019-12-04 02:55:38 -08:00
Pritesh Nandgaonkar
d12733f3fd Remove old support form GK
Summary: Removes old GK of the flipper support form

Reviewed By: passy

Differential Revision: D18783129

fbshipit-source-id: dcb55abf4af863e25273648e0482c00e3d16e322
2019-12-03 10:49:15 -08:00
Michel Weststrate
35ddc25937 Make plugin preference global
Summary:
This is a change which I am not fully confident in, but I think it will make things better;

previously favorite plugins where stored per device. This means that when ...

- switching between devices
- switching between apps
- when viewing disconnected devices
- when loading devices from flipper traces

... the starred plugin preference would reset (especially for the last two: they have generated unique device names, so there would never be preferred items)

This Diff changes the plugin preferences to be global, so on every app and every device you have the same preferences (if they support the plugin). This assumes most people work mostly with the same limited set of plugins

Reviewed By: jknoxville

Differential Revision: D18780965

fbshipit-source-id: 3a560393b81e7d65ae01fb737938f8562843af13
2019-12-03 09:19:20 -08:00
Michel Weststrate
c332f4145a Stop using deprecated lifecycle methods
Summary:
Some lifecycle methods are deprecated now. Where they can be replaced easily I replaced them. Where they can't be updated easily I marked them as unsafe, as if a bigger refactoring is required for those components, we'd better convert them to function components instead.

Didn't update the plugins as they are ideally updated by their owners.

Didn't update styled components, there is a separate task for that.

Reviewed By: jknoxville

Differential Revision: D18780579

fbshipit-source-id: 132a3789875ab6a3caee582b0e5f7feb7dc4a4c1
2019-12-03 06:50:43 -08:00
John Knox
01deb97a5d Add keys to FeedbackComponent array elements
Summary:
Was getting a react warning whenever the feedback prompt opens.
This stops it from happening.

Reviewed By: mweststrate

Differential Revision: D18780008

fbshipit-source-id: e4635f7a8322e25a3eea1c201974a100d1f1327a
2019-12-03 06:28:50 -08:00
Michel Weststrate
b1fb67c9c4 Improve error handling / roundtrip behavior
Summary:
Slightly improves the support form interactions / code flow:
* When uploading, input fields are hidden
* WHen upload succeeded: Show link to final post
* When upload succeeded: be able to start a new bug report
* Styled error messages, and unified error flow
* Don't support report if errors occurred

Reviewed By: priteshrnandgaonkar

Differential Revision: D18779791

fbshipit-source-id: 28e873d0509865c66d861fe9cedb62a31f0e8bae
2019-12-03 03:59:24 -08:00
Timur Valiev
3e7557260c store js app launcher settings
Summary:
Store JS App Launcher preferences in app settings

{F223696894}

Reviewed By: jknoxville

Differential Revision: D18762166

fbshipit-source-id: 9da8205b6929e54c80b645789feae2715d9b1876
2019-12-02 06:24:59 -08:00
Michel Weststrate
2bee9ec9e7 Fixed circular dependency warnings
Summary:
Nobody moves the hackathon!

Fixed some circular deps warnings while waiting for another Diff to land

Reviewed By: priteshrnandgaonkar

Differential Revision: D18749645

fbshipit-source-id: 225fbea428dca02f0f4c920ee47b4ece3c3e370b
2019-12-02 02:05:38 -08:00
Michel Weststrate
ac8879c503 Add clear diff button, style recording button
Summary:
* Added a button to clear Diff selection
* Added icons and color to the recording button
* Made App input field readonly

Reviewed By: priteshrnandgaonkar

Differential Revision: D18748538

fbshipit-source-id: 00ffb5d5c36f8f5394a353602f182aabd8237ee7
2019-11-29 08:28:25 -08:00
Pritesh Nandgaonkar
92bbccb6e0 Export in the support form
Summary: This diff adds exporting UI in the support form itself. It replaces the "Export as File and Link" buttons with a submit button, which uploads media and then initiates flipper export.

Reviewed By: mweststrate

Differential Revision: D18714630

fbshipit-source-id: ccbb9b2d47687e77a0fdb5449c18e91a5bd5f96e
2019-11-29 05:57:29 -08:00
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
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
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
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
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
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
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
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
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
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
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
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
Pascal Hartig
05c007be16 Move plugin manager logic out of UI component
Summary: Moving some things around for the upcoming update support.

Reviewed By: jknoxville

Differential Revision: D18347572

fbshipit-source-id: b614fe3a87f8e7fdc0c11c0d3bfe4787c0914d17
2019-11-06 08:33:36 -08:00
Michel Weststrate
81d7be2479 Fix overflow of long client names
Summary: Look client names were unreadable due to line wrapping

Reviewed By: jknoxville

Differential Revision: D18348602

fbshipit-source-id: 682c3b17ef73ca0bf0f8193f71a608ada5cdfbf2
2019-11-06 07:29:05 -08:00
Michel Weststrate
c3402da467 Fix showing plugins that are incompatible with client
Summary: Fix an issue where we accidentally show all plugins for all clients, causing client crashes if an unsupported plugin is selected

Reviewed By: jknoxville

Differential Revision: D18347907

fbshipit-source-id: 5416f29b8eae2daed64869380f9e9382e90261d7
2019-11-06 07:29:05 -08:00
Michel Weststrate
3cee927674 Introduce favorite plugins
Summary: This diff lands improved sidebar navigation. The old functionality to order plugins based on last-recently-used, and cropping at 5 items has been removed. Instead, items can be starred and their position will be fixed. Together with the app switcher introduced this should lead to a cleaner, stabler, and more customizable UI.

Reviewed By: jknoxville

Differential Revision: D18299401

fbshipit-source-id: 29b7eb3a4130933c637f7c81834558bf738d5bf0
2019-11-05 09:14:46 -08:00
Michel Weststrate
969a857fae Introduce app selector
Summary: Sidebar now shows a drop down to select the app you are currently working on, rather than showing all plugins for all apps connected

Reviewed By: passy

Differential Revision: D18201094

fbshipit-source-id: a64ca380606c232d0a85bfa80f16ed0db980dfb4
2019-11-05 09:14:46 -08:00
Pascal Hartig
9bb0dad5d6 Refactor installed plugin props passing
Summary:
Left this out from diff at the bottom of the stack to
keep it a bit smaller.

Reviewed By: jknoxville

Differential Revision: D18272165

fbshipit-source-id: a2b0826e268b737341e2ef1c0f96dde32491237f
2019-11-05 05:44:13 -08:00
Pascal Hartig
d2dfb924fd Update plugin store after installation
Summary: Address the small regression introduced by D18173166. When closing the plugin manager after installing/removing, the store wasn't updated in between.

Reviewed By: jknoxville

Differential Revision: D18270821

fbshipit-source-id: 4ff54bc7607d06fa423cf8e673f216ae0a5d19da
2019-11-05 05:44:13 -08:00
Pascal Hartig
432bb1b00a Move local plugin discovery to dispatcher/redux store
Summary: In order to have update notifications, this must live outside the UI component, but it also gives some additional benefits like better testability of previously effectful UI.

Reviewed By: jknoxville

Differential Revision: D18173166

fbshipit-source-id: 1cacb6c7893423a7920a6620dfb76e631caba101
2019-11-05 05:44:12 -08:00
John Knox
42a77094f4 Clean up old flipper rating system
Summary:
Found some unused code from the rating prototype before switching to itsr.
Deleting it.

Reviewed By: cekkaewnumchai

Differential Revision: D18298155

fbshipit-source-id: 3529db17494f4f5bf7d7841460203d1c3856299a
2019-11-04 09:23:50 -08:00
John Knox
ed2343b3c6 Add sessionId to itsr query string
Summary: This will allow rating data to be joined with version number so we can get the rating of each release.

Reviewed By: mweststrate

Differential Revision: D18297808

fbshipit-source-id: 00f151c64aad40632389f728ad25a565f44a2a90
2019-11-04 09:23:50 -08:00
Chaiwat Ekkaewnumchai
c1130a167b Upgrade React-Redux (2nd attempt)
Summary:
- Update and include `react-redux` to Greenkeeper
- Remove legacy context which is used to access `store`
- Export `store` directly to use instead of legacy context

Note:
1st attempt: D18169584 -> got backouted in D18203354

Reviewed By: jknoxville

Differential Revision: D18297298

fbshipit-source-id: fd968f1b211eabb094113a0b35e84305f70117fc
2019-11-04 07:44:08 -08:00