Commit Graph

18 Commits

Author SHA1 Message Date
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
f49745448c Pass the status Msg as an argument
Summary: Before this diff whenever one called serialize method it showed `Serializing Flipper  ` msg without showing the explicit details of which data we are serializing. Thus with this diff one can pass the status msg as an argument which will be displayed while serializing.

Reviewed By: jknoxville

Differential Revision: D18173024

fbshipit-source-id: a4e7e073498993626204061d4e774099f00b8c5a
2019-10-29 13:47:00 -07:00
Michel Weststrate
494ffd26b3 Introduce support for categorizing plugins
Summary:
This PR introduces the possibility to group plugins in categories.
The category can be determined by setting the `category` field in `package.json`.
Categories are sorted alphabetically.
Categories are shown below all uncategorized items.
Within categories, items are sorted as before: by last recently usage.

Design wise, the category name might now look more prominent than the app name, this is to be addressed in a follow up PR.

Reviewed By: jknoxville

Differential Revision: D18169459

fbshipit-source-id: 77deb0f27a0462a0d449944ddc262396160687a2
2019-10-28 06:21:37 -07:00
Pritesh Nandgaonkar
ef43878286 Add Marketing Bar for Flipper Support Form
Summary: This diff shows marketing bar for support feature when someone inspects the litho view. Once it is inspected it will shown for the rest of the time till the plugin is unmounted.

Reviewed By: jknoxville

Differential Revision: D18086347

fbshipit-source-id: cb906614f571e8ece2293b028f809d1aa5c211e5
2019-10-23 10:40:03 -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
6e6873a4f6 Pass idler and statusupdate callback as an argument to the export persisted state function
Summary: This diff passes the idler and statusUpdate arguments to the export persisted state, as it is being used in the MobileConfig's export function

Reviewed By: passy

Differential Revision: D17715815

fbshipit-source-id: 98a0f0f5950254de2139c4aaa52cb73401c86c3c
2019-10-04 05:33:44 -07:00
Pascal Hartig
22f8d26c33 Use explicit cast in plugin.tsx
Summary:
Marginally safer than ignoring the entire line, which
makes type-checking weaker on subsequent references.

Reviewed By: jknoxville

Differential Revision: D17736479

fbshipit-source-id: 13afcb5f08e53016b7a6cdc7ea135e726586a67b
2019-10-03 08:47:26 -07:00
Pascal Hartig
25cdca1d6f Explicit cast instead of ts-ignore
Summary: Slightly safer.

Reviewed By: jknoxville

Differential Revision: D17686947

fbshipit-source-id: 2c478707e20a1475427be4a652283960e4515cf9
2019-10-01 08:48:11 -07:00
Pascal Hartig
cbbe32b9b9 Remove FlowFixMe's from TypeScript
Summary: This diff was a joy to draft.

Reviewed By: jknoxville

Differential Revision: D17344676

fbshipit-source-id: 0694d0393fa243edef61408ecfee92912fbbfa32
2019-09-12 10:20:08 -07:00
Pascal Hartig
f48fe21eaa Make client.device fulfill type constraints
Summary:
This is an interesting invariant that TS caught here. We
expect `getDevice()` to always return a device but it
cannot because it's set lazily. John Knox suggested we instead
set up a promise in the constructor and resolve it instead of
overriding the stateful promise later.

Reviewed By: jknoxville

Differential Revision: D17313468

fbshipit-source-id: 8fd75f2720546abf67beead23db56216f1a5e0df
2019-09-11 05:38:19 -07:00
John Knox
6aab0bd826 Make plugin.tsx strict
Reviewed By: danielbuechele

Differential Revision: D17228192

fbshipit-source-id: 74e5edf9dfd3260a3463e57a16d1f9c8c0399137
2019-09-09 06:54:37 -07:00
Pritesh Nandgaonkar
566f2bf96e Do not use custom serializer for all the plugins
Summary:
This diff solves the problem where the export for the graphql plugin was super super super sloooooowwww...... The reason being that the graphql plugin had chunky graphql responses which were json blob which was being serialized by our custom serializer. Instead of serializing those with custom serializer we can directly serialize them as they won't have any map's, sets, classes etc.

This diff adds the two static functions on the plugin which will provide the serialized and deserialized object for the persistedstate. As the plugin knows the structure of its state it can optimize the serialization and deserialization of its data.

This change solves the slow export issue and makes it blazing fast..... 🏎

Bug:

{F206550514}

Reviewed By: danielbuechele

Differential Revision: D17166054

fbshipit-source-id: 058b903c03c12c9194702162c46763ef5b5e7283
2019-09-09 06:13:39 -07:00
Daniel Büchele
57fb3853ba remove generics from static methods
Summary:
Generics on static methods don't seem to work the way we are using them.
I looked into how react types getDerivedStateFromProps as this is a very similar concept, and they don't seem to type it at all. For that reason I've given up and just type the persistedState passed to our static methods as `Object`.

Reviewed By: passy

Differential Revision: D17152767

fbshipit-source-id: d9c2159be26fa341c5411dd0b40895d4c8ddf71e
2019-09-02 10:49:07 -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
Daniel Büchele
0ec48d4fc9 index
Summary:
This converts the index file to TypeScript which is used as an export for all plugins. Alongside, I had to fix a couple of errors in various files to make sure everything works correctly.

For plugins using flow, we define an interface which uses the type definition for FlipperPlugin and types all UI components as `any`.

Reviewed By: passy

Differential Revision: D16936890

fbshipit-source-id: dacd9a63a82b9f0bbb530b06072186874cba7b6f
2019-08-22 10:02:27 -07:00
Pascal Hartig
6c7aeef7ed Migrate exportMetrics
Summary: _typescript_

Reviewed By: jknoxville

Differential Revision: D16712087

fbshipit-source-id: 63dc45a26eb8112aef2b1bfa0d67bf57aa9ec72a
2019-08-12 03:53:16 -07:00
Pritesh Nandgaonkar
47a55b0f26 Migrate BaseDevice from js to tsx
Summary: As per the title

Reviewed By: passy

Differential Revision: D16687261

fbshipit-source-id: a9d85424fb0a08fada7edd0355c356907518d366
2019-08-09 06:56:54 -07:00
John Knox
3bfb7faf0a Convert plugin.js to plugin.tsx
Summary:
* Deletes plugin.js
* Adds plugin.tsx
* Adds plugin flow-typed module that has the old flow types

Reviewed By: passy

Differential Revision: D16668067

fbshipit-source-id: b2f0ce47c4cf7125b4e352821e921b97675d12a9
2019-08-08 12:06:11 -07:00