Commit Graph

1482 Commits

Author SHA1 Message Date
Anton Nikolaev
006003ae6b Add tests for client-id / app name parsing
Summary: Add tests for client-id / app name parsing. We've had a lot of bugs here in the past. Get some good test coverage so we have some assurance the shared utils for it won't be broken.

Reviewed By: jknoxville

Differential Revision: D18830269

fbshipit-source-id: 07c9755bbeae28c48580f44453d4010d6d3830b0
2019-12-05 06:30:04 -08:00
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
John Knox
186af77f62 Add error logging to client Id construction
Summary: Just in case anything is broken, this will be helpful

Reviewed By: nikoant

Differential Revision: D18811849

fbshipit-source-id: 53947102dea38e526b4f565396f85fedf4ff2a15
2019-12-05 05:42:58 -08:00
Chaiwat Ekkaewnumchai
d4acdf8504 Delete Notification Plugin Code
Summary: Delete dead code as we change to static view

Reviewed By: passy

Differential Revision: D18810148

fbshipit-source-id: 17b5a2355abb39a711a95b4ffcd0bcd387259787
2019-12-05 03:26:28 -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
Pascal Hartig
8df91d198f Codemod deprecated React APIs
Summary: Performed with `react-codemod rename-unsafe-lifecycles`. I'll taskify the components next. This change means that things will still work with React 17 but only if we opt-out from "strict mode".

Reviewed By: mweststrate

Differential Revision: D18810459

fbshipit-source-id: 6954f4e7bb91dbd7fc8b839895308fc193cc4aa0
2019-12-04 10:12:23 -08:00
John Knox
c95ecf6b3e Unifying use of clientID utils
Summary:
Fixes a couple of typo's and merges two very similar functions into one.
Now that there's a single way to create a clientID, we can get more strict about what it is and what it isn't.

Reviewed By: passy

Differential Revision: D18809741

fbshipit-source-id: 9a68e45bead38cc2917a6d4cd2cf461c309f3ede
2019-12-04 08:40:09 -08:00
Pritesh Nandgaonkar
e1e2978b19 Add copy cell option in network plugin
Summary: Puts a context menu in the sidebar for the network plugin. Before, user was not able to select the text from sidebar

Reviewed By: passy

Differential Revision: D18808544

fbshipit-source-id: bdbc86972cd1d508e9b7d96da9df5c8e53bec991
2019-12-04 08:12:05 -08:00
John Knox
15e1b25098 Centralize clientId creation
Summary: One step towards getting away from constructing and destructing clientIds manually everywhere by splitting and joining #'s. Which has been VERY error prone in the past.

Reviewed By: passy

Differential Revision: D18809442

fbshipit-source-id: bd4d89d3eb3d59694aa735b19dbd73d122e59ba0
2019-12-04 07:18:13 -08:00
John Knox
ab5892c60e Fix initial window focus bug
Summary:
When launching flipper release build, the initial window focus was wrong, so it appeared unfocussed.
Clicking away and then back to the window would fix it.

This should set the initial focus to be correct from the start.

Task has more details.

Reviewed By: mweststrate

Differential Revision: D18808306

fbshipit-source-id: 2c5828d0b3298594dc30f956bb14141e6cff5918
2019-12-04 06:51:53 -08:00
Anton Nikolaev
26632890d6 Network trace search not working for response body
Summary: This diff fixes the issue with occasionally not workin search by response body in Network plugin

Reviewed By: mweststrate

Differential Revision: D18784394

fbshipit-source-id: 5927919d919625e214fddd1a8b32522694b714ec
2019-12-04 05:33:06 -08:00
Michel Weststrate
5d124e2764 Always use new support form
Summary: See D18783129, we now want to always link to the new form

Reviewed By: passy

Differential Revision: D18807766

fbshipit-source-id: 2389470b12dc36159cab5d61dbb67dfb56c2408f
2019-12-04 04:01:46 -08:00
Michel Weststrate
c16625c278 Add explanation banner
Summary: Add a quick banner to give some more context on the bug report feature

Reviewed By: jknoxville

Differential Revision: D18807556

fbshipit-source-id: b2de614ccfd30a22f418b60d6f08066c57759deb
2019-12-04 02:55:39 -08:00
Michel Weststrate
1c4addd736 Fix: Litho support form links to the old support form
Summary: See title

Reviewed By: jknoxville

Differential Revision: D18807448

fbshipit-source-id: 7167d18953440377ee739cf0db03a8fb600112a9
2019-12-04 02:55:39 -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
Michel Weststrate
3dbc9acf54 Make sure first client is selected when importing traces
Summary: When importing a flipper trace, while the user was on a static view, the first client would not be selected automatically

Reviewed By: passy

Differential Revision: D18782482

fbshipit-source-id: 6f59e06dead62ffe42acdd36232b92dffd3e30d6
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
John Knox
8a616b2d88 Delete comma from popover
Summary: Looks like this got accidentally added here: https://our.intern.facebook.com/intern/diff/D18397950/

Reviewed By: mweststrate

Differential Revision: D18779992

fbshipit-source-id: 7a61cda4a9a4287ebc56acb5d2b85fce8e3381e3
2019-12-03 06:28:50 -08:00
John Knox
ef6a278eff Fix recurring lint issue with d3
Summary: All subfolders of src/plugins/ need to have a title in their package.json, in this case it doesn't add anything but it's a rare case, so at least stops the linter from complaining.

Reviewed By: mweststrate

Differential Revision: D18764161

fbshipit-source-id: 7a3d7e3dba7633107d9e43c021986ecdf22d3c28
2019-12-03 06:17:31 -08:00
Pritesh Nandgaonkar
45d8115804 Show new support form if part of new GK
Summary: When user comes from a deeplink we  will check if the user is part of the new GK, then we will open the new form otherwise old form.

Reviewed By: mweststrate

Differential Revision: D18764892

fbshipit-source-id: 512401f0370c3d4b16c9d88e16e8a4ca06148854
2019-12-03 04:51:05 -08:00
Pritesh Nandgaonkar
d21be33b9a Update app name on client change
Summary: This diff refactors the way appName is shown. We populate the appName through selectedApp, thus keeping different redux prop is not needed. This diff gets rid off the appName prop from the redux store and makes sure that appName gets updated on client change.

Reviewed By: mweststrate

Differential Revision: D18764685

fbshipit-source-id: 5ff94c83f84b03bbee34518aface46d4544af77f
2019-12-03 04:51:04 -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
Michel Weststrate
3e8a026618 Display uploaded media
Summary:
* Make sure uploadIDs are converted into CDN urls and displayed
* Changed type of uploadID's to strings, as numbers are

Reviewed By: priteshrnandgaonkar

Differential Revision: D18762974

fbshipit-source-id: d94af61b0bc114b5f0cc2bfcde98fd491058e971
2019-12-02 11:41:31 -08:00
John Knox
d791814dfa Validate input fields
Summary: Adds basic non-empty validation to title and description.

Reviewed By: mweststrate

Differential Revision: D18762778

fbshipit-source-id: 4bdbb550f4e740d399fbeaa9fb8170b801fc500e
2019-12-02 10:22:51 -08:00
greenkeeper[bot]
bb6a7c50cd chore(package): update uglify-js to version 3.7.1 (#668)
Summary:
Routine dependency upgrade
Pull Request resolved: https://github.com/facebook/flipper/pull/668

Reviewed By: mweststrate

Differential Revision: D18763830

Pulled By: jknoxville

fbshipit-source-id: 57705079da83a16668e29d6c6bd0da524b7a84f4
2019-12-02 09:32:39 -08:00
Michel Weststrate
da14b6ac56 Fix App name prefilling, improve markdown layout
Summary:
Make sure appname is prefilled
Slightly improved layout of markdown

Reviewed By: jknoxville

Differential Revision: D18761477

fbshipit-source-id: 00184a0a4c6d1b5a779c3d3168f587e75e363433
2019-12-02 08:37:26 -08:00
Pritesh Nandgaonkar
02ce121332 Refactor the MediaComponent and move the upload logic to SupportFormV2 comp
Summary: This diff refactors the MediaComponent and moves it's upload logic to the support component. Also the state of the media component is stored in the redux store, so this solves the caching issue.

Reviewed By: mweststrate

Differential Revision: D18754736

fbshipit-source-id: b937f34180405025a6eb437bf2c2d589743e341b
2019-12-02 06:50:41 -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
Timur Valiev
fe4af064cf refactoring and fixes
Summary: Slightly refactored JS api to make it work with new js app launcher

Reviewed By: jknoxville

Differential Revision: D18761757

fbshipit-source-id: edb8e5907765a9354e4c636be97d3cf6df63ee98
2019-12-02 04:58:49 -08:00
John Knox
beff2c4cac Display post preview before submitting support request
Summary:
The Markdown component wasn't rendering a single component, so I put it in a container.
Also added a margin bottom so it didn't look out of place. There's probably a nicer way to do that.

Reviewed By: mweststrate

Differential Revision: D18749381

fbshipit-source-id: ea7827dc7e6141fb0dbd5886356736da4b50f5dc
2019-12-02 04:28:10 -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
Michel Weststrate
2bd87a8100 Improve layout of screenshots and videos
Summary: The previous table was ugly, and weirdly interactive. This diff changes it to a static layout

Reviewed By: priteshrnandgaonkar

Differential Revision: D18744712

fbshipit-source-id: 9060da07eae836a94ce6d8bb2ebb8a6a54470daa
2019-11-29 06:21:56 -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
Pierre-Luc Paour
0116fcdb87 Typo (#664)
Summary:
## Changelog
Pull Request resolved: https://github.com/facebook/flipper/pull/664

Differential Revision: D18745531

Pulled By: passy

fbshipit-source-id: 9464d554e34ae08ed390cceb4c13ec63e26ec0a6
2019-11-28 10:03:01 -08:00
Pritesh Nandgaonkar
111ee2079d Upload media files and store in redux store
Summary:
This diff adds the media files into the redux store. In the redux store they are stored as the following {fbid: description}, where fbid and description are integer and string respectively.

Ignore the rows getting highlighted automatically, there seems to be a bug in the ManagedTable. Talked to Michel and we agreed to replace it.

Reviewed By: mweststrate

Differential Revision: D18708815

fbshipit-source-id: 0aaf1b672c230312203691538091a717d69fb5ad
2019-11-28 04:07:21 -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
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