Commit Graph

169 Commits

Author SHA1 Message Date
Andrey Goncharov
88bc3110a5 Add server add-on documentation
Reviewed By: nikoant

Differential Revision: D36446375

fbshipit-source-id: dfa9098428413bff454b5893f022735267dba5b8
2022-05-18 02:20:53 -07:00
Kevin Strider
78d395ad51 loading-custom-plugins.mdx (Creating Plugins - Dynamically Loading Plugins)
Summary: Restyle of page, including changes to spelling, grammar, links, and structure (where relevant).

Reviewed By: nikoant

Differential Revision: D36445433

fbshipit-source-id: 6e0033607cf58d5da51dd9910b40f158ceed84cf
2022-05-17 10:03:37 -07:00
Kevin Strider
96e0fffc25 supporting-layout.mdx (SetUp - Implementing Layout Inspection)
Summary: Restyle of the page, including changes to spelling, grammar, links, and structure (where relevant).

Reviewed By: lblasa

Differential Revision: D36315001

fbshipit-source-id: 6a628abb9328e1c9dbe38c98fd6a12f84563efd4
2022-05-12 03:21:01 -07:00
Kevin Strider
ab8bd29822 establishing-a-connection.mdx (SetUp - Secure Connection)
Summary: Restyle of the page, including changes to spelling, grammar, links, and structure (where relevant).

Reviewed By: lblasa

Differential Revision: D36313447

fbshipit-source-id: 99f94779caefd7f9f64121a40928c2be2d1f3ff4
2022-05-12 03:19:32 -07:00
Kevin Strider
6cdda85ec9 new-clients.mdx (SetUp - Implementing a Flipper Client)
Summary: Restyle of the page, including changes to spelling, grammar, links, and structure (where relevant).

Reviewed By: nikoant

Differential Revision: D36312999

fbshipit-source-id: 737a1f8a9dc659c7351ac55e0ccc1d4083393aa5
2022-05-11 08:36:41 -07:00
Andrey Goncharov
01a5f3da90 Add generics to server add-on connection
Reviewed By: mweststrate

Differential Revision: D34307356

fbshipit-source-id: 27e61355a85995368ebb197c42d58f4145473567
2022-02-28 03:50:34 -08:00
Andrey Goncharov
bed23c586b Replace style guide references
Summary:
allow-large-files
See D34339758

Reviewed By: jknoxville

Differential Revision: D34378570

fbshipit-source-id: ad451afc1774e6d38902d510629ce1b92457adf0
2022-02-22 08:25:28 -08:00
Andrey Goncharov
342c316c84 Add style guide
Summary:
allow-large-files
See D34339758

Reviewed By: jknoxville

Differential Revision: D34378571

fbshipit-source-id: a7c845f4676b25998dc63bf3029c5d1ec8205611
2022-02-22 08:25:28 -08:00
Lorenzo Blasa
395708348d Remove RSocket documentation references
Summary:
^
Changelog: Remove RSocket documentation references

Reviewed By: jknoxville

Differential Revision: D34345316

fbshipit-source-id: 5b9fac8c04e325f3f02ef3713b0146b17e694c9d
2022-02-21 06:22:44 -08:00
Anton Kastritskiy
f2abbf63db ban interface usage for component props and state
Summary: another eslint rule for flipper codebase

Reviewed By: passy

Differential Revision: D33917213

fbshipit-source-id: e60b867d359ef5b94a481edf0eda318ecff17eee
2022-02-02 05:09:45 -08:00
Anton Kastritskiy
75f874a5dd error for I prefixed interface names
Summary: {gif:kosnw403}

Reviewed By: mweststrate

Differential Revision: D33845782

fbshipit-source-id: 2b9bd70e3b2d930e8f4cd8fe7976ac76f43b2496
2022-01-31 05:34:58 -08:00
Anton Kastritskiy
1aff8466b1 let linter handle type naming conventions
Summary: {gif:kosnw403}

Reviewed By: passy

Differential Revision: D33846715

fbshipit-source-id: 5de4bb0cf88f24f5a26acedb82a0816417fb0787
2022-01-31 02:49:09 -08:00
Anton Kastritskiy
4c83fbb524 warn about ts file extension
Summary: remove statically analysable life from typescript guidelines and let eslint handle it

Reviewed By: passy

Differential Revision: D33819891

fbshipit-source-id: 3cc3cb512607c3651cd3a9e48228d83bab5bb64a
2022-01-28 05:43:46 -08:00
Pascal Hartig
6258169afe Edit dev-setup.mdx using inpage editor
Summary:
Adding this to another place that people seem to overlook.

This diff has been automatically generated by the inpage editor.
                        If you want to update this diff, go through the preview link that would be attached to the test plan.
                        Please ensure you are editing the same page that was used to create this diff.

Reviewed By: antonk52

Differential Revision: D33528019

fbshipit-source-id: ce6bf60b42161fc409277fb8c62ff38fd91b05cf
2022-01-11 07:36:00 -08:00
Michel Weststrate
7efad4201c Document how to use Node.js api's
Summary:
* Documented `npx flipper-server`
* Documented how to properly interact with the OS from Flipper plugins

Reviewed By: antonk52

Differential Revision: D33361929

fbshipit-source-id: 3028de2bf77a9ee6d9e521c1a53cff2388c936ea
2022-01-04 09:06:15 -08:00
Michel Weststrate
87833c759e Fixed an exception when logging unserializable errors
Reviewed By: nikoant

Differential Revision: D33276412

fbshipit-source-id: 615b2cc523a3ab4445a1208f460753b8634f6812
2021-12-22 03:18:51 -08:00
Andrey Goncharov
c96558a524 Remove fs and os usage from Mobile Builds plugin
Summary: Changelog: Expose env info and FS rm command to flipper plugins.

Reviewed By: mweststrate

Differential Revision: D32988478

fbshipit-source-id: 3d0233f9eb34d3478b07e39b9401c0e30ca95135
2021-12-10 06:36:13 -08:00
Andrey Goncharov
5610f8f058 Remove 'path' from plugins
Summary:
1. Add `path` replacement
1. Remove Node's path for all plugins but MobileBuildsPluginContainer (it is probably going to be moved to the server)

Reviewed By: mweststrate

Differential Revision: D32766327

fbshipit-source-id: e636f273842506e752b97cf1b28ce7ac51ce9a12
2021-12-02 04:14:51 -08:00
Anton Nikolaev
ceba421997 Prepend mdx files which used as includes with underscore to avoid creating and indexing pages from them
Summary:
By default docusaurus generates pages and routes for every mdx file it finds under the root dir. So even for the mdx files which are only used as includes and don't even have headers, page is still created, then index and often looks very weird, e.g. title is the same as file name etc. See e.g. this one: https://www.internalfb.com/intern/staticdocs/flipper/docs/fb/portal-troubleshooting/

I went through Flipper docs and renamed all mdx files which are only used as includes to prepend them with underscore. Everything which name is starting with underscore, or which is inside a folder which name is starting with underscore is considered private by docusaurus and skipped.

Reviewed By: passy

Differential Revision: D32722547

fbshipit-source-id: 0524d4dd56960714fbdd2b01ad8383cd16de4948
2021-11-30 13:26:17 -08:00
Andrey Goncharov
b82c41eedd Add FileSelector shared component
Summary: Add shared FileSelector component compatibe with the new FlipperLib API

Reviewed By: mweststrate

Differential Revision: D32667100

fbshipit-source-id: dca1e8b7693d134a99617e916c7cfd30432cef78
2021-11-26 08:30:13 -08:00
Anton Kastritskiy
7d4a6437ef Force trailing slash for flipper website
Summary: Use docusaurus new config option to force trailing slashes for all routes and fail build when extensions are not specified in markdown links to prevent flapping urls that lead to 404 in certain situations.

Reviewed By: jknoxville

Differential Revision: D32533292

fbshipit-source-id: a2d5fdff396b3bb4319893634dd637275ea9f598
2021-11-18 09:32:30 -08:00
Andrey Goncharov
ed5c2bd39f Add plugin actions menu
Summary: See D32311662 for details

Reviewed By: mweststrate

Differential Revision: D32329804

fbshipit-source-id: 26670353fdf8580643afcb8bc3493384146f5574
2021-11-12 07:13:56 -08:00
Andrey Goncharov
9b16d0c29a Add documentation
Summary: Document Flipper integration with JavaScript clients.

Reviewed By: passy

Differential Revision: D31827187

fbshipit-source-id: c40d8820241c0f85bd2366a0c087d4270d316c71
2021-10-22 06:30:15 -07:00
Daniel Parreira
6bd4a07286 Fix typo in setup documentation
Summary: Typo on Prettier extension recommendation for internals.

Reviewed By: passy

Differential Revision: D31796887

fbshipit-source-id: c69d0938be198ec6120c2ffb871e109253e00211
2021-10-20 09:17:13 -07:00
Pascal Hartig
1d5a2d876f Add sparse profile
Summary:
If you just use this profile `hg sparse switch tools/scm/sparse/xplat/flipper-js`, your total checkout will only be around 9 gigs.

I officially ran out of patience and out of space with the recent addition of `/arvr` which alone is about 40GB and I mostly touch Flipper files.

I also included staticdocs and the Rust third-party libraries so Launcher, plugin-metrics etc. are supported, too.

Reviewed By: mweststrate

Differential Revision: D31243980

fbshipit-source-id: 650d67d89298901610fa20330b7737f0a304569e
2021-09-29 06:05:22 -07:00
Michel Weststrate
c4538c48d6 Remove deprecated documentation
Summary: Sandy is idiomatic now, cleaned up old docs to avoid confusion as in https://github.com/facebook/flipper/issues/2611.

Reviewed By: passy

Differential Revision: D30908794

fbshipit-source-id: c4076f1d24b193f71923d19eeed631763bb9dacb
2021-09-14 03:12:41 -07:00
Michel Weststrate
9160563ad7 Edit dev-setup.mdx using inpage editor
Summary:
This diff has been automatically generated by the inpage editor.
                        If you want to update this diff, go through the preview link that would be attached to the test plan.
                        Please ensure you are editing the same page that was used to create this diff.

Reviewed By: passy

Differential Revision: D30898394

fbshipit-source-id: ae581edf6a8a84b6ccf2eb75f849bec8bf290f0b
2021-09-13 03:43:50 -07:00
Pascal Hartig
c2aa8bcb59 Edit new-clients.mdx using inpage editor
Summary: Fix broken link.

Reviewed By: mweststrate

Differential Revision: D30805274

fbshipit-source-id: e1c61cde01818b7c087d5e3d7b2f6b247b210358
2021-09-08 05:13:48 -07:00
Wenhuan Li
69924e26e0 Edit sandy-migration.mdx using inpage editor
Summary:
This diff has been automatically generated by the inpage editor.
                        If you want to update this diff, go through the preview link that would be attached to the test plan.
                        Please ensure you are editing the same page that was used to create this diff.

Reviewed By: timur-valiev

Differential Revision: D30767036

fbshipit-source-id: 8e828f9f6fb6a5590be428ed325418a62df55c4d
2021-09-06 09:42:25 -07:00
Wenhuan Li
07e82aae9f Edit sandy-migration.mdx using inpage editor
Summary:
This diff has been automatically generated by the inpage editor.
                        If you want to update this diff, go through the preview link that would be attached to the test plan.
                        Please ensure you are editing the same page that was used to create this diff.

Reviewed By: nikoant

Differential Revision: D30685168

fbshipit-source-id: cf5fa06d23390e293b8986e513d9b739efd5210b
2021-09-01 11:46:27 -07:00
Pascal Hartig
23dd014075 Add keyserver note
Summary: Got a question about this. Writing it down here for future reference.

Reviewed By: jknoxville

Differential Revision: D30452788

fbshipit-source-id: b2d4610b8df6027cd6045d37b941779f1f6096d1
2021-08-23 05:22:56 -07:00
Hafiz Saqib Javed
029b00c4ca Added missing quotation marks (#2709)
Summary:
The documentation had a missing quotation mark.

## Changelog
Fixed missing quotation mark

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

Test Plan: No code affected

Reviewed By: passy

Differential Revision: D30450063

Pulled By: jknoxville

fbshipit-source-id: 8e70d321d5cbf51439c67cca23471e208d0861b2
2021-08-20 08:20:50 -07:00
Alex Dickson
352e7e3a01 Edit establishing-a-connection.mdx using inpage editor
Summary:
This diff has been automatically generated by the inpage editor.
                        If you want to update this diff, go through the preview link that would be attached to the test plan.
                        Please ensure you are editing the same page that was used to create this diff.

Reviewed By: jknoxville

Differential Revision: D30392627

fbshipit-source-id: b7040f0ccb338d78c92186bf3a910d9ffbeb8019
2021-08-18 02:17:33 -07:00
Pascal Hartig
781df776f2 Rename default branch references to main (#2689)
Summary:
I really hope I hit everything and didn't break anything that wasn't
referring to branch names.

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

Test Plan:
_eyes

CI

|[Site Preview: flipper](https://our.intern.facebook.com/intern/staticdocs/eph/D30305789/V2/flipper/)

Reviewed By: timur-valiev

Differential Revision: D30305789

Pulled By: passy

fbshipit-source-id: 5daaa09250bb96bb50be679fc01dae86c666eb73
2021-08-13 15:00:39 -07:00
Michel Weststrate
5e8c968222 Move devices to server folder
Summary:
This is the first of many diffs that extracts the connection, device, client detection out of the flipper core, to create a reusable flipper-server library that can be used in e.g. flipper-dump.

To keep diffs a little smaller, the current connection logic is first moved to the `server/` directory, and decoupled manually from the rest of the core, before moving it over to a separate package.

This first diffs moves the `comms/`, `devices/` and certificate utilities to the `server` directory.

Further untangling will follow in next diffs

Reviewed By: timur-valiev

Differential Revision: D30246551

fbshipit-source-id: c84259bfb1239119b3267a51b015e30c3c080866
2021-08-12 05:43:43 -07:00
Ananya Arun
5e350add4f Update desktop-plugin-structure.mdx to add supportedApps
Summary:
This diff has been automatically generated by the inpage editor

Addresses the comment https://www.internalfb.com/diff/D30193668?dst_version_fbid=579384449899538&transaction_fbid=938191196910073

Reviewed By: passy, mweststrate

Differential Revision: D30248046

fbshipit-source-id: 1ef1e5ad75cdabf716ab7b81314e77e2dd9de5ce
2021-08-12 03:51:18 -07:00
Michel Weststrate
8d7caa9dd4 Introduce Dialog.alert
Summary: Introduce `Dialog.alert` to show users a FYI message, and be able to wait for it to be handled, as utility around several `Modal` utilities.

Reviewed By: jknoxville

Differential Revision: D29875484

fbshipit-source-id: 5d2ea83e486631ac18a81800b467f97dfaac6d34
2021-08-10 13:24:23 -07:00
Michel Weststrate
b757bff9f6 Document the new deeplink format [2/n]
Summary:
Added docs on how to use deeplink.

Note that not all features are implemented yet.

Reviewed By: fabiomassimo

Differential Revision: D29845044

fbshipit-source-id: 835fba8ce97c2106d160f347675e11d1ed749fba
2021-08-10 13:24:23 -07:00
Pascal Hartig
4f3ee3ea57 Bump gradle-maven-publish-plugin from 0.16.0 to 0.17.0
Summary:
From the changelog:

> Removed the deprecated uploadArchives and installArchives tasks. Use publish and publishToMavenLocal instead.

Made the necessary changes to docs and scripts.

Reviewed By: nikoant

Differential Revision: D29752895

fbshipit-source-id: 6e96c7ea9b26be2acb40b9089cb361837ab10a1b
2021-07-29 09:35:04 -07:00
Michel Weststrate
62674da74e Introduce Spinner and Dialog.loading
Summary: Per title

Reviewed By: nikoant

Differential Revision: D29790505

fbshipit-source-id: 7c995be59418ffd4c337eb8d1905bd2f2466e5cd
2021-07-22 04:17:45 -07:00
Michel Weststrate
f74029699f Introduce Dialog abstraction
Summary: Introduce convenience abstractions to make it easier to manage dialogs imperatively, by promisyfying common dialog abstractions.

Reviewed By: jknoxville, nikoant

Differential Revision: D29790462

fbshipit-source-id: c092c15cf569ec353b9c1042f25cd67e6c76db01
2021-07-22 04:17:45 -07:00
Michel Weststrate
d23ccfcd44 Restore copy on text
Summary:
Some folks were missing the copy as text ManagedTable used to have, so introduced both the options to either copy as text (visible columns or custom copy handler) or as JSON

Changelog: It is now possible to both copy as text or as JSON from data tables

Reviewed By: jknoxville

Differential Revision: D29712096

fbshipit-source-id: 27bd2e869a247bd0896ce2774c08651123fd531d
2021-07-16 03:43:36 -07:00
Michel Weststrate
2b6cb0ac3a Enable configuring OnDemand for testing
Summary: While working on D29694696, noticed it is tricky to test against an OnDemand, as the URL format is pretty specific and authentication flow uses an unrelated URL base constant. Introduced `FB_ONDEMAND` env var to make testing easier. If this is a common scenario we could consider making it a setting in the long run.

Reviewed By: timur-valiev

Differential Revision: D29694707

fbshipit-source-id: 747ceb80c95c3bdf0276497c41c9ff5ed9a198f2
2021-07-15 01:54:20 -07:00
Michel Weststrate
5dbd3bd414 Make getFlipperLib generally available, and use it to decouple opening links from Electron
Summary:
This stack reduces our direct dependency on Electron, for example by exposing our own API to open links.

Also exposing `getFlipperLib` as API from `flipper-plugin`, so that these utility methods are available outside plugin contexts as well.

Reviewed By: timur-valiev

Differential Revision: D29661689

fbshipit-source-id: 0c0523326eeb0d9d8fbe3e03c4609327bb53596b
2021-07-15 01:54:20 -07:00
Michel Weststrate
25373a3089 Introduce localStorage support to createState
Summary:
Per title.

Feature will be used in several plugins in next diffs.

Differential Revision: D29514456

fbshipit-source-id: c12427c2a7c53fa01cd1c7f429be8611be55496d
2021-07-01 07:20:32 -07:00
Michel Weststrate
279f3c41b7 Introduce shallow serialization
Summary:
Changelog: [Flipper] Improve serialisation mechanism format & speed

The default serialisation mechanism used by Flipper to serialise plugin states is very flexible, taking care of maps, sets, dates etc. However, it is also really slow, leading to issues like in the related tasks, and work arounds like D17402443 (98bc01618f) to skip the whole process for plugins.

This diff changes the serialisation mechanism to have a better trade off between speed and convenience: For now we will only apply the smart serialisation for objects living at the _root_ of the serialised object, but it won't be applied recursively.

This sounds like a dangerous change, but works well in practice:
* I went through all `persistedState` and `createState` definition (the types), and the idea that complex types like Map and Set only live at the root of the persisted state holds up nicely. That makes sense as well since plugins typically store literally the same data as that they have received over the wire, except that they put it in some maps, sets etc.
* I introduced `assertSerializable` that only runs in dev/test, which will check (recursively, but without all the cloning) to see if a tree is indeed serialisable.
* The fact that by swapping this mechanism rarely existing unit test for exportData needed changes proves that the assumption that only roots are relevant generally upholds (or that plugin authors don't write enough tests ;-)).
* I verified that popular plugins still import / export correctly (actually *more* plugins are exportable now than before, thanks to sandy wrapper introduced earlier)

Reviewed By: jknoxville

Differential Revision: D29327499

fbshipit-source-id: 0ff17d9c5eb68fccfc2937b634cfa8f4f924247d
2021-06-29 08:04:22 -07:00
Michel Weststrate
fac991b538 Document createTablePlugin
Summary: Per title

Reviewed By: priteshrnandgaonkar

Differential Revision: D28991859

fbshipit-source-id: 1af38d8922157b1613e43d987871e664d8e6f5ba
2021-06-09 07:26:57 -07:00
Michel Weststrate
0ba08150f6 Document example plugin to demo bidi communcation
Summary: per title. As follow up for previous diff

Reviewed By: fabiomassimo

Differential Revision: D28965865

fbshipit-source-id: 440c8143ac44011d895b3f194cabe7c69c51af72
2021-06-09 07:26:57 -07:00
Michel Weststrate
23402dfff6 Convert network plugin to Sandy
Summary:
converted the network plugin to use DataSource / DataTable. Restructured the storage to contain a single flat normalised object that will be much more efficient for rendering / filtering (as columns currently don't support nested keys yet, and lazy columns are a lot less flexible)

lint errors and further `flipper` package usages will be cleaned up in the next diff to make sure this diff doesn't become too large.

The rest of the plugin is converted in the next diff

Reviewed By: nikoant

Differential Revision: D27938581

fbshipit-source-id: 2e0e2ba75ef13d88304c6566d4519b121daa215b
2021-05-06 04:27:59 -07:00
Michel Weststrate
be3cdedf52 Some UI / docs fine-tuning
Summary: Added wash color option to Toolbar, made codeblocks transparent rather than gray & bordered, which looks cleaner

Reviewed By: passy

Differential Revision: D28119720

fbshipit-source-id: 9d1f4db5b39a91d9d117046bd5482726ac2f555d
2021-05-04 13:50:31 -07:00