Commit Graph

94 Commits

Author SHA1 Message Date
John Knox
20db85adf4 Add archived device visualizer
Summary:
Adds a visual indicator of layout nodes when using an archived device.

The "device" window isn't movable for some reason. I've tried the movable and draggable attributes but with no luck. It would obviously be good to fix that but I think its probably shippable as is, and I don't have any more ideas about how to do it.

Reviewed By: passy

Differential Revision: D19885719

fbshipit-source-id: 186ba38c85afee18ce111e30187bdccd9b919025
2020-02-21 07:19:13 -08:00
John Knox
c2dfa6ca6b Kill orphaned instruments processes (#819)
Summary:
Fix https://github.com/facebook/flipper/issues/808
Kills any orphaned Instruments processes belonging to the user.

In some cases, we've seen interactions between Instruments and the iOS
simulator that cause hung instruments and DTServiceHub processes. If
enough instances pile up, the host machine eventually becomes
unresponsive. Until the underlying issue is resolved, manually kill any
orphaned instances (where the parent process has died and PPID is 1)
before launching another instruments run.

Taking the same approach as done by flutter here.

Reviewed By: passy

Differential Revision: D20030005

Pulled By: jknoxville

fbshipit-source-id: aa80be78c80f7797e88bf29b15f90d4aad0c66e4
2020-02-21 06:53:44 -08:00
John Knox
2acf81027e Refactor screenshot capturing
Summary: Adding a utility for capturing screenshots to the configured location without having to worry about where to store it or use buffers etc.

Reviewed By: mweststrate

Differential Revision: D19765926

fbshipit-source-id: d6b51c4ffafab7450e97a60468926d84a25a8c0f
2020-02-07 12:52:52 -08:00
Pritesh Nandgaonkar
b9fafb0e61 Remove older support request form
Summary: This diff removes the older support form as we no longer use it.

Reviewed By: jknoxville

Differential Revision: D19769541

fbshipit-source-id: ca2088e721f2895f2c8a1205889b0670477cc2d2
2020-02-07 03:44:50 -08:00
Pritesh Nandgaonkar
670949b016 Refactor the default plugins and validation logic into Group object
Summary: This diff refactors the scattered logic of required plugins and default selection of the plugins into Group class. Also the same class handles the deeplink logic.

Reviewed By: mweststrate

Differential Revision: D19666745

fbshipit-source-id: c9427f0ddba643f0b32aac7b6f2496e2e3248b12
2020-02-03 10:08:24 -08:00
Pritesh Nandgaonkar
c51797d194 Fix the plugin display logic to show enabled and device plugins
Summary: Changed the plugin display logic in SupportForm to show plugins which are enabled(includes device plugins) and plugins which has `exportPersistedState` defined.

Reviewed By: mweststrate

Differential Revision: D19643857

fbshipit-source-id: 7a4a5882507c06c6b6f9c481ee2c5c36ecc32ac6
2020-02-03 04:38:25 -08:00
Pritesh Nandgaonkar
40ac443386 Deeplink support for graphql
Summary: This diff adds support for the deeplink of support form for graphql groups.

Reviewed By: mweststrate

Differential Revision: D19583680

fbshipit-source-id: fc4505dc5f46c701f1e43fc47ee094fb0aa15d42
2020-01-28 09:29:04 -08:00
John Knox
33ad41c98c Update welcome screen links
Summary: The welcome screen links were a bit out of date.

Reviewed By: nikoant

Differential Revision: D19578769

fbshipit-source-id: 69fc7977bd75ca4256043698350381a5f9d7fdb8
2020-01-27 07:23:45 -08:00
Ankur Sadhoo
9b5ba4decb Add Watch Bug Information Debugger as a connectionless plugin
Differential Revision: D19211198

fbshipit-source-id: 0a63fe8077141b5221254a668ef4c0e83c7d33ea
2019-12-26 19:25:09 -08:00
Michel Weststrate
f4fdeef692 Make it possible to override GK's in unit tests
Summary: Previously it was not possible to run unit tests to test logic that requires GK's to be enabled. This fixes that

Reviewed By: passy

Differential Revision: D19158368

fbshipit-source-id: b89691bdd2f975a3b4be343bd966ed77b2ad3763
2019-12-19 02:38:07 -08:00
Denis Nedelyaev
be53990613 Add setting for skipping fbsource version check
Summary: Added a setting "Match local fbsource chekout", which inverserly corresponds to the `ignore_local_pin` setting in `flipper-launcher.toml`.

Reviewed By: passy

Differential Revision: D19030456

fbshipit-source-id: deaaf4e873a00bbc4e8bd3034353cf580df95a36
2019-12-16 07:01:01 -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
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
Pritesh Nandgaonkar
994546b24a Setup of the bug creation screen
Summary: This diff sets up the create form for the new support request project. The current screen is very basic. I will be iterating through it in the upcoming diffs.

Reviewed By: passy

Differential Revision: D18327464

fbshipit-source-id: af01fc10f68a135f32f0ae98551986852019e8aa
2019-11-06 10:46:12 -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
John Knox
d350e1b339 Fix for plugin failures showing up as platform failures
Summary: This got broken during TS migration. Plugin failures were being logged as platform failures, and showing up in the wrong graphs.

Reviewed By: passy

Differential Revision: D18059046

fbshipit-source-id: 8209a0e852f62e221bf64cb5091115e3cac09fd9
2019-10-22 08:45:38 -07:00
Pascal Hartig
a77064ad84 Hook up prefetcher settings
Summary: This makes use of the previously set up new settings. The logic is a tiny bit difficult to follow so I wanted to make sure it's not lost in the noise of the previous diff.

Reviewed By: jknoxville

Differential Revision: D18036538

fbshipit-source-id: db3bbce4361862cee479aed70578a4bcbde2c46d
2019-10-22 08:09:43 -07:00
Pascal Hartig
82a253cf28 Add launcher prefetch setting
Summary: Allows users to override the GK status of prefetching. It is implemented as a Tri-State. "Unset" means that the local Flipper config won't take precedent over the GK setting and will leave it unchanged. If a user interacts with the setting, it gets persisted into the config and will from then-on override the GK, meaning that the user has an opt-in mechanism and if we open the GK to more people, they effectively have an opt-out.

Reviewed By: jknoxville

Differential Revision: D18008259

fbshipit-source-id: bdfde9a8b9acf43aa60c84800a7979a29a4e9364
2019-10-22 08:09:43 -07:00
John Knox
781344f7de Fix jest mocking in tests (#592)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/592

Finally we can join the 21st century and use `jest.mock` in tests!

I'm enabling the ts-jest transform to `*/__tests__/*.tsx` files. This takes care of transforming the typescript, and preserves jest mock capabilities.
I have left the existing custom transform on all other files, so they will continue to work as usual.

Caveats:
* Our existing custom transforms will no longer be applied in tests.
  * With our current suite this makes no difference. But bear in mind things like importing directly from 'flipper' instead of the actual files, won't work. However, I don't see this being a problem, as I think they'll only be needed inside the actual product code.

Reviewed By: passy

Differential Revision: D17978753

fbshipit-source-id: df7b312b5dd5592e4aa4f8df605f5952ea3158e9
2019-10-18 07:17:40 -07:00
Andres Suarez
0675dd924d Tidy up Flipper license headers [1/2]
Reviewed By: passy

Differential Revision: D17863711

fbshipit-source-id: 259dc77826fb803ff1b88c88529d7f679d3b74d8
2019-10-11 13:46:45 -07:00
Pritesh Nandgaonkar
f924b0ae1b Add support manager to display an error screen or litho form
Summary:
This diff shows the error screen when one of the following condition is met:

- Selected device is not android
- No clients are active for selected device
-  At least there is one client which supports inspector plugin.

For this I have added a SupportRequestManager class which loads the error screen or the litho form based on the above condition.

The UI is super basic. Will improve the design based on your feedback in the coming diffs.

Reviewed By: jknoxville

Differential Revision: D17790596

fbshipit-source-id: 2afc917c93c6e7321399633c5bf9d27a703742ee
2019-10-08 12:01:09 -07:00
Pascal Hartig
3730c523ec Add explicit StubLogger option for tests
Summary:
A bit ugly to have test-only code in prod logic,
but we don't need any of the logger logic in tests
and by pulling out the `StubLogger`, we can avoid
loading Electron during tests.

Reviewed By: jknoxville

Differential Revision: D17808479

fbshipit-source-id: d2295d7bbca2f09c3f23389ad9443648757d8d03
2019-10-08 08:45:05 -07:00
John Knox
e871822a05 Use API for eligibility check
Summary: Change flipper from using the dodgy webview check that requires auth, to using the interngraph api for eligibility checking.

Reviewed By: passy

Differential Revision: D17498724

fbshipit-source-id: b81fd8b7b0bd36a7fcf73ba05d9885b61e420c61
2019-09-23 06:44:38 -07:00
Pritesh Nandgaonkar
84c5067210 Create Support Requests from Flipper
Summary: This diff adds an initial support to prefill the app information and the revision information. This diff also copies the workplace url in the clipboard.

Reviewed By: passy

Differential Revision: D16990925

fbshipit-source-id: 4f354e52de5fea07c2ea36336761d6963c27ef66
2019-09-20 11:39:05 -07:00
John Knox
d3be6357ef Send dismiss event when popover is closed
Summary: Dismissing the popover will stiop the user from being prompted for a while, so we only want to send this event when the user was proactively prompted in the first place - which is when we're using the eligibility check.

Reviewed By: passy

Differential Revision: D17343227

fbshipit-source-id: 95a071e34ce318fe49640c6ee9f68127957f390c
2019-09-12 08:21:29 -07:00
John Knox
25739aebc2 Only show rating button when user is eligible to rate
Summary:
Behind a gk.

This uses a hidden webview to check if a user is eligible for star ratings. This means you can practively ask the user, and makes sure you'll get an unbiased distribution.

Reviewed By: danielbuechele

Differential Revision: D17343118

fbshipit-source-id: fe7471416aef947ec10f4734e4136868ab5ab3e5
2019-09-12 08:21:29 -07:00
Pascal Hartig
b19f08ba54 Fix promisify-child-process use
Summary: Per title. Somehow both typecheck, but importing the module like this doesn't work.

Reviewed By: jknoxville

Differential Revision: D17285507

fbshipit-source-id: 40a38db5dfb52213e0407f8bda83f2ebad5c50c7
2019-09-10 09:43:44 -07:00
Pascal Hartig
a29f2c3b10 Make iOSContainerUtility strict
Summary: _typescript_

Reviewed By: jknoxville

Differential Revision: D17259181

fbshipit-source-id: 5167be6cbf23b42d0f79246dae22f4e4a9417339
2019-09-09 08:39:35 -07:00
Pascal Hartig
a60bcf7aca Make fb-stubs/Logger.tsx strict
Summary: _typescript_

Reviewed By: jknoxville

Differential Revision: D17204281

fbshipit-source-id: c694aed012c30cc325fe507723476a3e6bc43e83
2019-09-09 07:04:53 -07:00
John Knox
be22cc711a Use API to get prompt values
Summary: To keep it in sync with the JS implementation.

Reviewed By: danielbuechele

Differential Revision: D17208786

fbshipit-source-id: 8d89f33bfef22317266a0ad1e0c5689540d54f9e
2019-09-06 08:32:48 -07:00
John Knox
612cfd81ae Change feedback to use ITSR
Summary:
This isn't ready to release yet, it's still behind a GK so noone will see it.
There has been no styling applied to the popover so it looks bad but is fully functional.

What it also doesn't have yet:
* Get the prompt text from the API (including the predefined selectable comments)
* Check with the server whether it should pop up proactively, it's completely passive at the moment.

Reviewed By: passy

Differential Revision: D17206158

fbshipit-source-id: f1734f3d6bc555c860ebbaad7515d4675e1700cb
2019-09-06 08:32:48 -07:00
Daniel Büchele
ef2c6787fa convert Layout plugin
Summary: _typescript_

Reviewed By: passy

Differential Revision: D17153997

fbshipit-source-id: 308a070b86430a9256beb93b4d3e5f8d5b6c6e52
2019-09-05 02:51:41 -07:00
Zoltán Gilián
9a9eda3da5 Expose internGraphAPIRequest
Summary: Needed to access the task attachment interngraph endpoint added in D17146262.

Reviewed By: danielbuechele

Differential Revision: D17146272

fbshipit-source-id: 6375a953d4b5389e05accb77f0242388c3e0254c
2019-09-02 09:27:03 -07:00
Daniel Büchele
5868946818 certificate provider
Summary: _typescript_

Reviewed By: passy

Differential Revision: D17096517

fbshipit-source-id: a6e69e8b9a82fe76bb1de51a3a93182f35f40b3f
2019-08-28 20:34:59 -07:00
Chaiwat Ekkaewnumchai
ea7578aa16 Expand/Collapse Sidebar V0
Summary:
- Show all or show 5 LRU plugins
- Update when close/reopen app, collapse sidebar, or expand sidebar

Reviewed By: danielbuechele

Differential Revision: D16917950

fbshipit-source-id: 1e7edc86945162ea14e1cdaa89aa47d3defa4c7d
2019-08-21 08:50:34 -07:00
Chaiwat Ekkaewnumchai
afd7634fd6 Add Button to Expand or Collapse Left Panel
Summary:
- Add `show more` and `show less` button to expand and collapse
- The element to show depends on its usage rank from Flipper dashboard (manually copied)

Reviewed By: danielbuechele

Differential Revision: D16917952

fbshipit-source-id: fc37d5c640be33794694e302341fa08849b8f97f
2019-08-21 08:50:33 -07:00
Chaiwat Ekkaewnumchai
b9e0aae1e4 Add Warning for FB Employee
Summary: Add warning dialog when FB employee uses OSS Flipper

Reviewed By: passy, danielbuechele

Differential Revision: D16783408

fbshipit-source-id: 3e7e533c5b96d4204fc38570a4e65c23ac0aaa25
2019-08-14 06:14:16 -07:00
Pascal Hartig
2a34125413 Migrate metrics
Summary:
Had to mess with the tagged union we had, to distinguish based on
a string rather a bool which is a bit rubbish.

Reviewed By: danielbuechele

Differential Revision: D16764797

fbshipit-source-id: c33536f17b0705ca40abef8448802f9961c4c114
2019-08-14 04:43:50 -07:00
Pascal Hartig
2e1dc7d40d Migrate ScribeLogger
Summary: _typescript_

Reviewed By: danielbuechele

Differential Revision: D16691033

fbshipit-source-id: 19da8bea4032e33a9bd219476aa12e2154dc3103
2019-08-09 10:47:13 -07:00
Pascal Hartig
b42abcbb59 Migrate logger
Summary:
Removed defunct log filtering functionality, but we probably want to rebuild that.
Funny that tsc caught this as non functioning but Flow happily accepted it.

Reviewed By: danielbuechele

Differential Revision: D16690959

fbshipit-source-id: b079dd6faba83ca0c443d00cbb69c8ff95c4fa69
2019-08-09 10:47:12 -07:00
Pascal Hartig
e56d3a4c6d Migrate user
Summary: Migrate user and introduce a global declarations file.

Reviewed By: danielbuechele

Differential Revision: D16690480

fbshipit-source-id: be4e5218715dcae4b403b24cdbc2f3e89728dd59
2019-08-09 10:47:12 -07:00
Pascal Hartig
c5be7c4a93 Migrate Prefetcher
Summary: _typescript_

Reviewed By: danielbuechele

Differential Revision: D16686489

fbshipit-source-id: 35a2f871868e5c06e45a0820d9b5870f852ac1e3
2019-08-09 04:02:45 -07:00
Pascal Hartig
c5563be56b Migrate BugReporter
Summary: _typescript_

Reviewed By: danielbuechele

Differential Revision: D16666761

fbshipit-source-id: 7dc1c21c5c9bdf56908af4e251de16dad14cae38
2019-08-09 04:02:45 -07:00
Pascal Hartig
3c2d9973e5 Migrate iOSContainerUtility
Summary: TSC actually found a type error here in `safeExec` which is nice.

Reviewed By: danielbuechele

Differential Revision: D16666740

fbshipit-source-id: 28a1ad12190d2351a48323f23c3a69947503625d
2019-08-09 04:02:45 -07:00
Pascal Hartig
5f3e84a96e Migrate LayoutInspectorSidebarExtensions
Summary: _typescript_

Reviewed By: danielbuechele

Differential Revision: D16666703

fbshipit-source-id: cf16f9cdc97a739f0de52f31319e8061eea03c6f
2019-08-09 03:25:06 -07:00
Pascal Hartig
798d6d2ed4 Migrate constants
Summary: We can't `*`-export as the symbols are invisible but being explicit about this seems like a good improvement anyway.

Reviewed By: danielbuechele

Differential Revision: D16666637

fbshipit-source-id: 8f9a14ed41f4d8ad93b4bab8dd54f3b6c9e24824
2019-08-09 03:25:06 -07:00
Pascal Hartig
e602e1ccae Migrate config
Summary:
Very mechanical migration. No syntactic changes, only moves and
file name changes.

Reviewed By: danielbuechele

Differential Revision: D16665891

fbshipit-source-id: afb1f2418f55bf6c5370b8a2b1d2c35ac5986dc3
2019-08-09 03:25:05 -07:00
Pascal Hartig
36a1c0046c Migrate createPaste
Summary: _typescript_

Reviewed By: jknoxville

Differential Revision: D16649018

fbshipit-source-id: c30d4ec390946e4b6de49ffeccc452d0a55c1e7a
2019-08-09 03:25:05 -07:00
Pascal Hartig
a314d1d930 Migrate ErrorReporter
Summary: _typescript_

Reviewed By: jknoxville

Differential Revision: D16648552

fbshipit-source-id: 969c549594d76dca6552338a25f6ab7d8047d14d
2019-08-09 02:42:37 -07:00
Pascal Hartig
fc0966a133 Migrate GK
Summary: _typescript_

Reviewed By: jknoxville

Differential Revision: D16647882

fbshipit-source-id: a5a7053379cd9468e1da9ab0ac2098be3443dda7
2019-08-08 14:32:20 -07:00