Commit Graph

25 Commits

Author SHA1 Message Date
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
Daniel Büchele
378638a451 website updates for TS
Summary: update website to use TS instead of JS

Reviewed By: passy

Differential Revision: D16986666

fbshipit-source-id: 969de3ffcdf4aa594d9811947e5b440e594838e7
2019-08-24 03:28:28 -07:00
Pritesh Nandgaonkar
a89b732765 Fix typo
Summary: Fixes a typo

Reviewed By: jknoxville

Differential Revision: D15200593

fbshipit-source-id: baf5679e095e7bc430f56de03793033c16d59f5f
2019-05-07 04:08:50 -07:00
Pritesh Nandgaonkar
0c54699371 iOS tutorial setup
Summary:
I copied the wordings from Pascal's android setup and changed the API's to match the iOS one. 🙈
This doc explains how to build custom plugin in iOS

Reviewed By: passy

Differential Revision: D15200426

fbshipit-source-id: 0a3c966f7c74aae410c6b3ee643e5a38d33880de
2019-05-07 04:08:50 -07:00
Daniel Büchele
f3876fbaad update custom JS tutorial
Summary: Update according to changes in D15200794

Reviewed By: jknoxville

Differential Revision: D15200901

fbshipit-source-id: ef0e0895f30d6eb98536c9a7df7a0d46bb4af8d2
2019-05-03 16:24:51 -07:00
Pascal Hartig
531b5e850c JS custom UI tutorial
Summary:
- Adding tutorial for custom JS UI
- optimizing screenshots
- fixing overlapping screenshots on landing page

Reviewed By: jknoxville

Differential Revision: D15198105

fbshipit-source-id: db53403b84a2c422650a4f80e959dad6e984d274
2019-05-03 10:21:22 -07:00
Pascal Hartig
1afece19e7 JS table tutorial
Summary: Image is a placeholder, again.

Reviewed By: jknoxville

Differential Revision: D15185033

fbshipit-source-id: 6c60709d35da97c41a7c4328ef597747d6cea389
2019-05-03 10:21:21 -07:00
Pascal Hartig
2b0e91aa69 Add tutorial section and Android part
Summary:
JS is next. Screenshot on the intro page is really bad.
I hope danielbuechele can replace this. :)

Reviewed By: jknoxville

Differential Revision: D15184371

fbshipit-source-id: 2faaf46450d192ae400675c13b8d71fa1b7dab14
2019-05-03 10:21:21 -07:00