Commit Graph

149 Commits

Author SHA1 Message Date
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
Michel Weststrate
5bf9541e05 Standardize CodeBlock component
Summary:
Code blocks are quite common in Flipper, and a bit verbose in Ant, so let's standardize!

Changelog: Standardize CodeBlock component

Reviewed By: passy

Differential Revision: D28117560

fbshipit-source-id: 5a5538a49b59ef40c814d22055fac56e7598cbbb
2021-05-04 13:50:31 -07:00
Michel Weststrate
dd7a9f5195 introduce onReady life-cycle
Summary: Flipper Sandy plugins didn't have an event to hook into that is run _after_ any state snapshot is loaded, which was needed by the graphQL plugin, as they do some post processing when a data snapshot is restored.

Reviewed By: passy

Differential Revision: D28189573

fbshipit-source-id: 4ef992f3fafc32787eab3bc235059f2c41396c80
2021-05-04 12:52:26 -07:00
Michel Weststrate
699343a9ca Fix bug causing archived devices trying to connect
Reviewed By: nikoant

Differential Revision: D28064540

fbshipit-source-id: 43f05c4348a33e9633751bb9f69cd8d17ddd13c4
2021-04-29 12:12:57 -07:00
Michel Weststrate
e26a8c5ad0 Provide standardised MasterDetail
Summary:
Noticed in reviews during the convertathon there is still quite some boilerplate in things that happen on the boundary of UI and plugin state, such as setting up menu entries and providing common functionality like clear, master/detail layout, etc.

This diff introduces the `MasterDetail` component, which takes a higher level approach by merely needing to provide the state atoms and desired features, and taking care of the wiring.

Applied it to createTablePlugin, to prove that going from `createTablePlugin` to `MasterDetail` will be a much smaller step now.

Verified on the funnel logger plugin

Reviewed By: passy

Differential Revision: D28090362

fbshipit-source-id: 146f8c315fea903901ad4e3e46711642f16cf0e6
2021-04-29 07:31:54 -07:00
Michel Weststrate
05bf55419f Introduce createTablePlugin
Summary: This diff exposes the createTablePlugin from flipper-plugin, so that createTablePlugin based plugins can be converted to Sandy as well

Reviewed By: jknoxville

Differential Revision: D28031227

fbshipit-source-id: 8e9c82da08a83fddab740b46be9917b6a1023117
2021-04-28 12:28:37 -07:00
John Knox
808d173c89 Fix docs: Typography.Heading => Typography.Title
Summary:
Noticed this while migrating

Created from Diffusion's 'Open in Editor' feature.

Reviewed By: passy

Differential Revision: D28057969

fbshipit-source-id: a8b7c1159c13e666abc3bab54fafae302e18e8dd
2021-04-28 06:52:37 -07:00
Michel Weststrate
8e02b2ec10 Expose Toolbar from Sandy
Summary: Moved Toolbar to flipper-plugin. No further changes.

Reviewed By: nikoant

Differential Revision: D28027334

fbshipit-source-id: 35de13d87734ae3a8af037166945b1a669106274
2021-04-28 05:48:20 -07:00
Michel Weststrate
d26ea5fa46 Allow onExport handler to return nothing
Summary:
In many cases, the onExport handler doesn't try to customise the format, but merely fetch some additional information before creating an export.

By allowing the `onExport` handler to also return nothing, and instead merely update existing state, this case will be easier to express now;

Reviewed By: nikoant

Differential Revision: D28026558

fbshipit-source-id: 2b90b3e1ced6a6a5b42938b6f6b74b0eb9ceafc0
2021-04-27 14:53:40 -07:00
Anton Nikolaev
140cf38ffd Expose subscribe / unsubscribe functions from Atom
Summary: Allow subscribing to Atom state changes

Reviewed By: mweststrate

Differential Revision: D28027692

fbshipit-source-id: 24fd7ea16b013c364bbb1d25b30c48bc698db014
2021-04-27 09:31:11 -07:00
Michel Weststrate
37a7b16774 Introduce Tabs
Summary:
Ant'd tabs didn't allow for vertical fill out. Introduced our own tiny wrapper that has `grow` by default.

Also made sure the users last selection is remembered.

Reviewed By: cekkaewnumchai

Differential Revision: D28026345

fbshipit-source-id: 7703bc241cd1427336b7c917bdb5be9f56bba9b9
2021-04-27 08:13:16 -07:00
Michel Weststrate
fe10e9dcc2 Additional migration notes
Summary: Extended migration notes a bit based on feedback of the process so far

Reviewed By: passy

Differential Revision: D28025556

fbshipit-source-id: a3743a76c8a91b16cc3e669494de07baaa8199e6
2021-04-27 08:13:16 -07:00
Michel Weststrate
34e5e3a11a Fine tuning and docs for Panel
Summary: Better documentation for Panel. Fixes styling issue for uncollapsible panels

Reviewed By: passy

Differential Revision: D28025557

fbshipit-source-id: db0f9fd44f501fa36be3fc31ebbe7917d7c0a88c
2021-04-27 08:13:16 -07:00
Michel Weststrate
844abca78c Expose logger from client
Summary: The `logger` was currently only available in a React context, and not directly exposed from the `client` API as well. This diff fixes it. The infrastructure including test stubs were present already, so the change is minimal.

Reviewed By: nikoant

Differential Revision: D28010120

fbshipit-source-id: cdd09ed236f5d92d07005d4e5a699360596281e4
2021-04-27 01:43:42 -07:00
Michel Weststrate
c89d18fd68 Introduce DataList
Summary: Introduce the DataList component. Not feature complete yet, but core functionality is present so that people can use it during the convertathon. It is used to implement the route list in the network mock dialog

Reviewed By: priteshrnandgaonkar

Differential Revision: D27046716

fbshipit-source-id: a247ce7032b350b31bf55962ca4268e30f43471a
2021-04-27 01:43:42 -07:00
John Knox
13ce7741a6 Fix broken links
Summary: Noticed some broken links while converting plugins

Reviewed By: priteshrnandgaonkar

Differential Revision: D27997670

fbshipit-source-id: fd2715db010a042f749e0908b44a3fb3c6aa6f18
2021-04-26 08:29:12 -07:00
Michel Weststrate
c005753018 Expose Panel and useLocalStorageState
Summary: Expose a Panel api from Sandy, which is quite similar to the old one, except that it uses Antd, and it will remember the users closed / open preference through sessions, a much requested feature.

Reviewed By: nikoant

Differential Revision: D27966607

fbshipit-source-id: 9b18df377215c1e6c5844d0bf972058c8c574cbb
2021-04-23 09:29:59 -07:00
Michel Weststrate
0e08b63ce3 Fix several links
Summary: Per discussion in parent diff, fixed the links to be idiomatic so that they work in both internal and public builds

Reviewed By: jknoxville

Differential Revision: D27963896

fbshipit-source-id: 35504b04e8975acc419be668804c5d7ad7aa2a16
2021-04-23 04:14:43 -07:00
Michel Weststrate
3af41bfdd1 Add migration guide to convert from classic to Sandy plugins
Summary: Added migration guide from classic to Sandy plugins

Reviewed By: passy

Differential Revision: D27908674

fbshipit-source-id: d4b5a0b45e314226825375d762902041f90c04c8
2021-04-23 01:55:54 -07:00
Michel Weststrate
e29222fba7 Update and patch loading React DevTools
Summary:
When trying to run some React component performance profiles, the updates registered made absolutely no sense (components rerendering without any parent or other cause causing them to render etc). That turned out to be caused by having an outdated version of the React devTools in Flipper.

Sadly the newer version of the React DevTools didn't work with our current Electron version anymore. Some horrible hacking is needed to work around that.

To help with updating the tools in the future (they are by default cached forever on the local machine), I've introduced the `FLIPPER_UPDATE_DEV_TOOLS` variable.

The plugin loading work around is inspired by https://github.com/electron/electron/issues/23662#issuecomment-787420799

Reviewed By: passy

Differential Revision: D27685981

fbshipit-source-id: c35e49aff9b2457b63122eeee0d5c042ddd3b08b
2021-04-15 07:48:33 -07:00
Michel Weststrate
69de9bc92d Initial move to flipper-plugin
Summary:
This diff moves the core of ElementsInspector to flipper-plugin and decouples it from legacy design system and Electron, without any significant improvements or API changes yet, which will follow later.

Colors and docs will be added later in this stack.

Reviewed By: passy

Differential Revision: D27660300

fbshipit-source-id: 96abfa3b3174fa852cf04ae119c23c3d629fee74
2021-04-15 07:48:33 -07:00