Commit Graph

57 Commits

Author SHA1 Message Date
Kevin Strider
81d21c6e8b new sub-folder 'Building a Desktop Plugin' (Creating Plugins)
Summary:
Major changes to js-custom.mdx

The content for the following pages is moved to the new sub-folder 'Building a Desktop Plugin':
* js-custom.mdx
* js-setup.mdx
* js-table.mdx

The Title and Sidebar labels have been changed accordingly.

Changes made to sidebar.js,

Reviewed By: lblasa

Differential Revision: D36415874

fbshipit-source-id: 8f1634abc1459d1905da62a1b76bac4b621d0da5
2022-05-19 04:31:06 -07:00
Kevin Strider
99fb7875cd js-publishing.mdx (Creating Plugins - Publishing)
Summary: Change to Sidebar label and Title

Reviewed By: nikoant

Differential Revision: D36475587

fbshipit-source-id: 425deb13d67965c433773563718365403097cb37
2022-05-18 10:25:16 -07:00
Kevin Strider
76d4f01934 js-publishing.mdx (Creating Plugins - Publishing)
Summary: Restyle of page, including changes to spelling, grammar, links, and structure (where relevant).

Reviewed By: nikoant

Differential Revision: D36444128

fbshipit-source-id: 1689d36d7ad0b101ea4793a1ac51ba619291b668
2022-05-17 10:07:32 -07:00
Kevin Strider
f31011fd6c ios.mdx (Creating Plugins - Building an iOS Plugin)
Summary: Minor change to end of the page.

Reviewed By: passy

Differential Revision: D36411396

fbshipit-source-id: 204bfb54a4f36e5472fa164daeed3f106abe22a8
2022-05-17 08:47:23 -07:00
Kevin Strider
47c1b7e464 Android.mdx (Creating Plugins - Building an Android Plugin)
Summary: Minor change to end of the page.

Reviewed By: lblasa

Differential Revision: D36411616

fbshipit-source-id: 2792144d89bd657c457b8f5ff685d200c5f8c946
2022-05-17 08:46:47 -07:00
Kevin Strider
2f30c51e14 js-table.mdx (Creating Plugins - Desktop Plugin - Table)
Summary: Restyle of page, including changes to spelling, grammar, links, and structure (where relevant).

Reviewed By: lblasa

Differential Revision: D36414496

fbshipit-source-id: 5fb895deb53f8f322904380d88f76c22e4bbf4d2
2022-05-17 04:20:20 -07:00
Kevin Strider
656b04ed53 js-setup.mdx (Creating Plugins - Building an javaScript (browser) Plugin)
Summary: Restyle of page, including changes to spelling, grammar, links, and structure (where relevant).

Reviewed By: lblasa

Differential Revision: D36412815

fbshipit-source-id: d844bb745fcd483878b47c6f9736f24de0000655
2022-05-17 04:19:25 -07:00
Kevin Strider
ce83f2c01b javascript.mdx (Creating Plugins - Building an javaScript (browser) Plugin)
Summary: Restyle of page, including changes to spelling, grammar, links, and structure (where relevant)

Reviewed By: nikoant

Differential Revision: D36410938

fbshipit-source-id: b1b4d7753c16d2d2a3b9a7aa779f196247f10579
2022-05-17 01:36:39 -07:00
Kevin Strider
4b05532fae react-native.mdx (Creating Plugins - Building an React Native Plugin)
Summary: Restyle of page, including changes to spelling, grammar, links, and structure (where relevant).

Reviewed By: nikoant

Differential Revision: D36410352

fbshipit-source-id: 9a05b24811adedea2a5e97e6865e3fd42aadb344
2022-05-17 01:34:11 -07:00
Kevin Strider
5cd8c16cbd intro.mdx (Creating Plugins - Building an Android Plugin)
Summary: Restyle of page, including changes to spelling, grammar, links, and structure (where relevant).

Reviewed By: aigoncharov

Differential Revision: D36378263

fbshipit-source-id: 80a59bbb3386abc620a0fde848ccf8e96c287c6c
2022-05-16 04:22:34 -07:00
Kevin Strider
80ef1e04df ios.mdx (Creating Plugins - Building an iOS Plugin)
Summary: Restyle of page, including changes to spelling, grammar, links, and structure (where relevant).

Reviewed By: aigoncharov

Differential Revision: D36377198

fbshipit-source-id: 99179c9c8132be51e13d9f8ab7d9f84f35b601bf
2022-05-16 02:43:26 -07:00
Kevin Strider
287349f537 intro.mdx (Creating Plugins - Introduction)
Summary: Restyle of page, including changes to spelling, grammar, links, and structure (where relevant).

Reviewed By: passy

Differential Revision: D36375849

fbshipit-source-id: a26053269878b65c05f6529994d153008d9c4038
2022-05-13 08:56:32 -07: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
Xin Yue
9833105764 Edit intro.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: D34249537

fbshipit-source-id: cc64c219d3400633af7bbcb5ab002c13dfb83899
2022-02-16 11:36:15 -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
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
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
f7732ed4fd Insert a proper flipper-plugin version
Summary:
`flipper-pkg init` would always introduce `flipper-plugin` peer with version `latest`. Since that can never be checked against the current flipper version, it always generated a warning. Updated the init process to take the version the plugin was generated with as base version instead.

Note that in the test the version will always display as 0.0.0, will double check after release that the proper version will show up when running from npx, but don't see a reason why not (famous last words)

Reviewed By: nikoant, priteshrnandgaonkar

Differential Revision: D28992531

fbshipit-source-id: c32aad1650f575f790c2e04d089104b7a616d26f
2021-06-10 04:45:18 -07:00
Michel Weststrate
d2095d5937 Update to pure Sandy and update custom docs
Summary: Per title

Reviewed By: priteshrnandgaonkar

Differential Revision: D28991625

fbshipit-source-id: cab9cf59d1d053e2f8a47c588cb05abc44a527cc
2021-06-09 07:26:57 -07:00
Michel Weststrate
a0c872dd38 Update setup and createTable tutorial to 100% Sandy
Summary:
The current desktop plugin tutorial was outdated as it has several steps that are now automated, and still referred to old APIs. This has been updated now.

Additionally left the intermediate code of the tutorial in the plugin, but splitting `index.tsx` into `index_table.tsx` and `index_custom.tsx` (which will be updated in the next diff)

Clarified the tutorial page labels a little bit to show that 3 pages are covering the Desktop plugin development process.

Changelog: Updated the Desktop plugin tutorial

Reviewed By: jknoxville

Differential Revision: D28990029

fbshipit-source-id: a06a7a774ceca3daf10f8e8fbd4e03191dbfd1cc
2021-06-09 07:26:57 -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
d903a862d2 Use DataTable as list base
Summary:
Changelog: Standardized DataList component

This diff standardizes the DataList component, by reusing the DataList. This is done to be able to take full advantage of all its features like virtualisation, keyboard support, datasource support, etc.

Also cleaned up DataTable properties a bit, by prefixing all flags with `enableXXX` and setting clear defaults

Reviewed By: passy

Differential Revision: D28119721

fbshipit-source-id: b7b241ea18d788bfa035389cc8c6ae7ea95ecadb
2021-05-04 13:50:31 -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
Anton Nikolaev
830e380127 Update public plugins location in docs
Summary: Updated docs after moving public plugins to "desktop/plugins/public". Additionally edited the pages related to plugins which were a bit outdated.

Reviewed By: jknoxville

Differential Revision: D27646670

fbshipit-source-id: 26499aff492db817156fecf20fa8358efc70ae8f
2021-04-09 05:22:01 -07:00
Bartosz Kaszubowski
40e6cdebb1 improve docs code blocks highlighting (#2049)
Summary:
This PR adds missing Objective-C entry to the Docusaurus config, fixes Objective-C code blocks label and adds or replaces several code block labels to improve the currently highlighted blocks.

Prism in Docusaurus by default also includes syntax highlight for `jsx` and `tsx`, which improves the nodes and props highlight, so I have used those syntaxes in few places too.

I have also fixed one typo that I have spotted and my IDE made a cleanup of whitespaces in edited files.

## Changelog

* [website] improve docs code blocks highlighting

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

Test Plan:
The changes have been tested running Flipper website on `localhost`.

## Preview

<img width="650" alt="Screenshot 2021-03-12 150934" src="https://user-images.githubusercontent.com/719641/110951135-fff20d00-8344-11eb-96db-1bdc82c8d5ea.png">

<img width="649" alt="Screenshot 2021-03-12 151022" src="https://user-images.githubusercontent.com/719641/110951268-2ca62480-8345-11eb-9d3b-1a48f1267776.png">

Reviewed By: priteshrnandgaonkar

Differential Revision: D27336599

Pulled By: passy

fbshipit-source-id: c2dfb3d8cad4675da0f5e1270cada1e56a0175c0
2021-03-29 02:46:11 -07:00
John Knox
08b594db5c Upgrade static docs plugin
Summary:
Upgrade the static docs plugin.

You no longer need to import OssOnly and FbInternalOnly in markdown files, so removed those imports too.

Reviewed By: passy

Differential Revision: D26580059

fbshipit-source-id: 2763de2f5fbef41ec2ac7f7bdd147418badb78b6
2021-02-22 09:17:44 -08:00
Michel Weststrate
69dae5c8e5 Restructured dev workflow docs
Summary: This diff unifies setup and workflow information that was scattered a bit around into one cohesive 'Development workflow' subsection in the 'creating plugins' section of Flipper.

Reviewed By: nikoant

Differential Revision: D25612288

fbshipit-source-id: 5fa7f2d000fb7ab3e1b5c5a4fc8cc1f209252f41
2020-12-17 07:40:58 -08:00
Michel Weststrate
f9c8826090 Use the same create-plugin tutorial for FB and non-FB users
Summary: Per title

Reviewed By: passy

Differential Revision: D25558871

fbshipit-source-id: 85fbc73143a5ca172115169d08f8cdce502eb833
2020-12-15 12:34:14 -08:00
Michel Weststrate
d08aa5d33e Removed void intro page to the tutorial
Summary: The 'extending flipper' introduction page didn't contain anything meaty, so collapsed it into the tutorial introduction, cleaning up the top level navigation.

Reviewed By: passy

Differential Revision: D25531718

fbshipit-source-id: ca0f98186e889e13cb97be8818db3588738e5039
2020-12-15 08:22:31 -08:00
Michel Weststrate
cc438e60ad Update public docs to use Sandy
Summary: This updates the docs of Flipper to use Sandy, rather than `FlipperPlugin` class. Restructured the docs a bit as a result.

Reviewed By: passy

Differential Revision: D24991285

fbshipit-source-id: 66d5760c25cf9cf3983515433dfd64348d51db3d
2020-11-16 13:10:32 -08:00
Pascal Hartig
b2e8070af2 Fix relative links
Summary: Translated all cases where we had a parent-relative link to use the base URL instead.

Reviewed By: jknoxville

Differential Revision: D22256229

fbshipit-source-id: 81ee6fecb77dbaa19d112cb319771c22ff66d02a
2020-06-26 05:13:48 -07:00
Vamshi krishna
72880d3f3a wording mistake in plugin docs (#1164)
Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/1164

Reviewed By: mweststrate

Differential Revision: D21613194

Pulled By: passy

fbshipit-source-id: 787232a5edc6a0dcd39280c8d1587b07f24de68e
2020-05-20 03:33:02 -07:00
John Knox
7e4682b694 Fix the remaining broken links on fbflipper.com
Summary:
Used https://www.brokenlinkcheck.com/broken-links.php#status for now to find broken links and fixed them all.

Would be better to use some automated tool to check this at diff time, but that's not setup yet.

Reviewed By: passy

Differential Revision: D21301702

fbshipit-source-id: f13c8769b15d9f99563fc65dc0544320d07a2bfb
2020-04-29 07:33:43 -07:00
John Knox
6554f23853 Fix numbered list syntax
Summary:
Numbered list syntax changed during the docusaurus migration from v1 to v2.

It looks wrong at https://fbflipper.com/docs/extending/js-setup/

This fixes it.

I searched for "1)" and replaced all numbered lists it found.

Reviewed By: mweststrate

Differential Revision: D21283693

fbshipit-source-id: adeb6e04693f50e0a0cfe4b2de5f4663075c34ce
2020-04-28 17:33:25 -07:00
Anton Nikolaev
d08dfee018 "init" command for flipper-pkg tool
Summary: Added command "init" to "flipper-pkg" which helps to quickly initialise Flipper desktop plugin.

Reviewed By: passy

Differential Revision: D21253819

fbshipit-source-id: 85a2fbde07ecb63737d180d2a7e5cc2846b4f533
2020-04-27 17:34:12 -07:00
Anton Nikolaev
21c574ac80 "lint" command for flipper-pkg tool
Summary:
Implemented json schema for flipper plugin package.json and used it for validation in "flipper-pkg lint" command.

Nice thing about json schema is that it not only allows to validate json, but also can be referenced using "$schema" property in json so IDEs like VSCode can find it and use for code completion, validation and to show properties documentation. I'm going to deploy the schema as a part of documentation website so it can be referenced as https://fbflipper.com/schemas/plugin-package/v2.json.

Also the "$schema" field can be used instead of "specVersion" to determine the specification according to which the plugin is defined. E.g., if specification version 3 would be created, it will be described in schema https://fbflipper.com/schemas/plugin-package/v3.json, etc.

Reviewed By: passy

Differential Revision: D21228294

fbshipit-source-id: f21351e584ef936a7d6b314436448489691f83a6
2020-04-27 17:34:11 -07:00
John Knox
5f1a0548f5 Migrate website to Docusaurus 2
Summary:
Docusaurus 2 is quite a lot more powerful than docu 1 it turns out.
This should convert the website fully.

* [done] Go through migration guide https://v2.docusaurus.io/docs/migrating-from-v1-to-v2
* [done] Convert landing page html
* [done] Convert all images to img tags
* [done] Convert all .md files to .mdx
* [done] Make sure ui-doc generation and including still works
* [done] Scan every page visually for sanity check
* [done] Make sure footer still works
* [done] Make sure search still works
* [done] Change all links/ to links/index
* [done] Change all links.md to links
* [done] Add some custom css to make the navbar look like the old one and darken the footer.

Reviewed By: passy

Differential Revision: D21158717

fbshipit-source-id: 5f45b711b1b6fd5ece4c5c15c55635c7ebbfb568
2020-04-27 04:05:01 -07:00
Michel Weststrate
7ba57dae33 Expose flipper as peer-, not full dependency
Summary: Flipper should never be a normal dependency of a flipper plugin. And since this an example, lets do it properly :)

Reviewed By: jknoxville, passy

Differential Revision: D21228427

fbshipit-source-id: 72166c8706a213e2cb649f1201984dd722b63d2f
2020-04-24 10:44:49 -07:00
Anton Nikolaev
fe09dae237 Update tutorial to reflect changes in plugin packaging format
Summary: Tutorial updated to reflect changes in plugin packaging format

Reviewed By: passy

Differential Revision: D21161268

fbshipit-source-id: b7c6d272be8dd56b76a0af87acdc347df4216f6c
2020-04-23 05:58:39 -07:00
Anton Nikolaev
e165c2cd95 Desktop plugin development workflow
Summary: Updated docs describing workflow for creating Flipper desktop plugins

Reviewed By: passy

Differential Revision: D21129688

fbshipit-source-id: 68921e5d3784e3ab6b3e8397199b10101348a86a
2020-04-23 05:58:39 -07:00
John Knox
5ad8106e3f Fix image links with baseUrl
Summary:
When using baseUrl in site config, it adds a prefix to all link paths.

But for assets, it doesn't work if you refer to them as `docs/assets/...`, you have to use just `assets/...`. Source: https://github.com/facebook/Docusaurus/issues/861

Reviewed By: passy

Differential Revision: D20796933

fbshipit-source-id: 2346e42b8b548f576a1e143f56ee5236eab55073
2020-04-02 03:14:08 -07:00
Michel Weststrate
da89a92875 Update getting started docs for RN 0.62
Summary:
Kinda what is in the title. But shouldn't be merged yet as RN 0.62 didn't ship yet.

Also, the iOS tutorial hasn't been verified yet, as the relevant diff hasn't been merged yet (see D19391739)

Reviewed By: passy

Differential Revision: D19468497

fbshipit-source-id: 9e7d90123d3637a1a552c4a9def6420137cf8246
2020-03-24 13:33:32 -07:00
Anton Nikolaev
10d990c32c Move plugins to "sonar/desktop/plugins"
Summary:
Plugins moved from "sonar/desktop/src/plugins" to "sonar/desktop/plugins".

Fixed all the paths after moving.

New "desktop" folder structure:
- `src` - Flipper desktop app JS code executing in Electron Renderer (Chrome) process.
- `static` - Flipper desktop app JS code executing in Electron Main (Node.js) process.
- `plugins` - Flipper desktop JS plugins.
- `pkg` - Flipper packaging lib and CLI tool.
- `doctor` - Flipper diagnostics lib and CLI tool.
- `scripts` - Build scripts for Flipper desktop app.
- `headless` - Headless version of Flipper desktop app.
- `headless-tests` - Integration tests running agains Flipper headless version.

Reviewed By: mweststrate

Differential Revision: D20344186

fbshipit-source-id: d020da970b2ea1e001f9061a8782bfeb54e31ba0
2020-03-14 14:35:18 -07:00
Anton Nikolaev
85c13bb1f3 Move desktop-related code to "desktop" subfolder (#872)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/872
Move all the JS code related to desktop app to "desktop" subfolder.

The structure of "desktop" folder:
- `src` - JS code of Flipper desktop app executing in Electron Renderer (Chrome) process. This folder also contains all the Flipper plugins in subfolder "src/plugins".
- `static` - JS code of Flipper desktop app bootstrapping executing in Electron Main (Node.js) process
- `pkg` - Flipper packaging lib and CLI tool
- `doctor` - Flipper diagnostics lib and CLI tool
- `scripts` - Build scripts for Flipper desktop app
- `headless` - Headless version of Flipper app
- `headless-tests` - Integration tests running agains Flipper headless version

Reviewed By: passy

Differential Revision: D20249304

fbshipit-source-id: 9a51c63b51b92b758a02fc8ebf7d3d116770efe9
2020-03-14 14:35:17 -07:00
Michel Weststrate
426d17b08d Update docs for JS only plugins
Summary: Added docs on how to write React-Native JavaScript based plugins

Reviewed By: passy

Differential Revision: D19344803

fbshipit-source-id: ad1ea66f1031760729fdaea8a7e6c1ef5dcd5439
2020-01-23 07:11:31 -08:00
Anton Nikolaev
c0f902f81a Upgrade to emotion v10
Summary: React 16 is not compatible with react-emotion 9 (it prints warnings, see also https://github.com/emotion-js/emotion/issues/644). So we should upgrade to 10.

Reviewed By: mweststrate

Differential Revision: D18905889

fbshipit-source-id: c00d2dbbadb1c08544632cb9bfcd63f2b1818a25
2019-12-11 09:43:24 -08:00
Michel Weststrate
2f5096ddc8 Improve setup documentation
Summary:
Random observations

1. RN already generates the Flipper initialization code out of the box
2. This code assumes a prefixed namespace: `facebook.flipper`. Maybe it would be better if that were `appname`, but that seems an unnecessary burden at this point, preventing direct copy / paste possibilities
3. Out of the box, the generated code by RN doesn't align with the code provided here, because no `ReactInstanceManager` argument is passed in (nor does it seem to be available in a straight-forward way)
4. patch MainApplication.java with `getReactNativeHost().getReactInstanceManager()`
5. turn this into an explicit section: https://fbflipper.com/docs/tutorial/js-table.html#dynamic-plugin-loading. Also explain that when using `node_modules`, config doesn't need to be changed?
6. xcode 10! sudo xcode-select -s /Applications/Xcode_10.XXX/Contents/Developer/
7. Also tried to install Reactotron plugins by Infinite Red, got that compilable in the end, but the andoid / ios implementations still seems to be stub, so I'll try to follow up with them later, to be notified when they actually have something

Reviewed By: passy

Differential Revision: D18349098

fbshipit-source-id: 233bbe20a37c57c7dfe08c8fccdd4508bdefe96f
2019-11-08 04:40:27 -08: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
Pascal Hartig
9bce894b71 Add publishing/installing docs
Summary:
Adding publishing and installation procedure docs to
our tutorial to round things off.

Reviewed By: jknoxville

Differential Revision: D17711800

fbshipit-source-id: 57c848c559208eb2a0ca790a72bcd493730baf16
2019-10-02 08:56:38 -07:00
Daniel Büchele
a72eac27a7 add flipper-plugin keyword to package.json
Summary: For plugins to be discoverable through NPM, they need to have `flipper-plugin` as a keyword. This adds this keyword to all existing plugins (although they are currently not distributed via NPM) and the webside/docs.

Reviewed By: passy

Differential Revision: D17395079

fbshipit-source-id: e42dd31ca39c3754cf729052ee783687748bafe8
2019-09-17 06:21:29 -07:00