Add Setup and Extending top level navs

Summary: Distinguish between integrating flipper, and developing plugins.

Reviewed By: passy

Differential Revision: D15148448

fbshipit-source-id: 7c772fa1cea7d5ed789a984039afc37bc0b8a927
This commit is contained in:
John Knox
2019-04-30 11:02:56 -07:00
committed by Facebook Github Bot
parent 4c282cea1f
commit b3ec8b052b
15 changed files with 62 additions and 65 deletions

View File

@@ -1,7 +1,6 @@
--- ---
id: arch id: arch
title: Architecture title: Architecture
sidebar_label: Architecture
--- ---
Flipper is built to be a universal pluggable platform for development tools. Currently Flipper focuses on Android and iOS development but its design does not limit it to these platforms. Another way to think of Flipper is a more general purpose implementation of Chrome DevTools. Flipper is built to be a universal pluggable platform for development tools. Currently Flipper focuses on Android and iOS development but its design does not limit it to these platforms. Another way to think of Flipper is a more general purpose implementation of Chrome DevTools.

View File

@@ -1,7 +1,6 @@
--- ---
id: create-plugin id: create-plugin
title: Mobile Setup title: Mobile Setup
sidebar_label: Mobile Setup
--- ---
## Implement FlipperPlugin ## Implement FlipperPlugin

View File

@@ -1,7 +1,6 @@
--- ---
id: create-table-plugin id: create-table-plugin
title: Create Table Plugin title: Create Table Plugin
sidebar_label: Create Table Plugin
--- ---
A very common kind of Flipper plugin is a plugin which fetches some structured data from the device and presents it in a table. A very common kind of Flipper plugin is a plugin which fetches some structured data from the device and presents it in a table.

View File

@@ -1,7 +1,6 @@
--- ---
id: error-handling id: error-handling
title: Error Handling title: Error Handling
sidebar_label: Error Handling
--- ---
Errors in Flipper plugins should be hidden from the user while providing actionable data to the plugin developer. Errors in Flipper plugins should be hidden from the user while providing actionable data to the plugin developer.

View File

@@ -1,7 +1,6 @@
--- ---
id: establishing-a-connection id: establishing-a-connection
title: Establishing a connection title: Establishing a connection
sidebar_label: Establishing a connection
--- ---
Below is an outline of how a connection is established between an app with with our SDK integrated, and the desktop app. This all goes on behind the scenes inside the mobile SDK, so users shouldn't need to worry about it. Below is an outline of how a connection is established between an app with with our SDK integrated, and the desktop app. This all goes on behind the scenes inside the mobile SDK, so users shouldn't need to worry about it.

8
docs/extending/index.md Normal file
View File

@@ -0,0 +1,8 @@
---
id: index
title: Clients and Plugins
---
Flipper was designed with extensibility in mind from the start, to enable engineers to quickly build quality, easy-to-use tools for their own needs and applications.
In addition to building plugins for the existing platforms, you can also extend the capabilities of Flipper to other platforms by conforming to the `FlipperClient` API. After this, you can make use of the existing desktop plugins by writing client plugins that conform to the same API.

View File

@@ -1,7 +1,6 @@
--- ---
id: js-setup id: js-setup
title: JavaScript Setup title: JavaScript Setup
sidebar_label: JavaScript Setup
--- ---
## Creating the plugin UI ## Creating the plugin UI

View File

@@ -1,7 +1,6 @@
--- ---
id: send-data id: send-data
title: Sending Data to Plugins title: Sending Data to Plugins
sidebar_label: Send Data
--- ---
It is often useful to get an instance of a Flipper plugin to send data to it. Flipper makes this simple with built-in support. It is often useful to get an instance of a Flipper plugin to send data to it. Flipper makes this simple with built-in support.

View File

@@ -1,7 +1,6 @@
--- ---
id: styling-components id: styling-components
title: Styling Components title: Styling Components
sidebar_label: Styling Components
--- ---
We are using [emotion](https://emotion.sh) to style our components. For more details on how this works, please refer to emotion's documentation. We heavily use their [Styled Components](https://emotion.sh/docs/styled) approach, which allows you to extend our built-in components. We are using [emotion](https://emotion.sh) to style our components. For more details on how this works, please refer to emotion's documentation. We heavily use their [Styled Components](https://emotion.sh/docs/styled) approach, which allows you to extend our built-in components.

View File

@@ -1,7 +1,6 @@
--- ---
id: testing id: testing
title: Testing title: Testing
sidebar_label: Testing
--- ---
Developer tools are only used if they work. We have built APIs to test plugins. Developer tools are only used if they work. We have built APIs to test plugins.

View File

@@ -1,7 +1,6 @@
--- ---
id: writing-a-plugin id: writing-a-plugin
title: Writing a plugin in JavaScript title: Writing a plugin in JavaScript
sidebar_label: Writing a plugin
--- ---
Every plugin needs to be self-contained in its own folder. At the root-level of this folder we are expecting a `package.json` for your plugin and an `index.js` file which is the entry-point to your plugin. To learn more about the basic setup of a plugin, have a look at [JavaScript Setup](jssetup.md). Every plugin needs to be self-contained in its own folder. At the root-level of this folder we are expecting a `package.json` for your plugin and an `index.js` file which is the entry-point to your plugin. To learn more about the basic setup of a plugin, have a look at [JavaScript Setup](jssetup.md).

View File

@@ -279,7 +279,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
## Ready for takeoff ## Ready for takeoff
Finally, you need to add plugins to your Flipper client. Above we have only added the Layout Inspector plugin to get you started. See [Network Plugin](network-plugin.md) and [Layout Inspector Plugin](layout-plugin.md) for information on how to add them, and also enable Litho or ComponentKit support. You can check the sample apps in the [GitHub repo](https://github.com/facebook/flipper) for examples of integrating other plugins. Finally, you need to add plugins to your Flipper client. Above we have only added the Layout Inspector plugin to get you started. See [Network Plugin](setup/network-plugin.md) and [Layout Inspector Plugin](setup/layout-plugin.md) for information on how to add them, and also enable Litho or ComponentKit support. You can check the sample apps in the [GitHub repo](https://github.com/facebook/flipper) for examples of integrating other plugins.
## Having trouble? ## Having trouble?

View File

@@ -5,33 +5,46 @@
"previous": "Previous", "previous": "Previous",
"tagline": "Extensible mobile app debugging", "tagline": "Extensible mobile app debugging",
"docs": { "docs": {
"arch": {
"title": "Architecture",
"sidebar_label": "Architecture"
},
"communicating": { "communicating": {
"title": "Device Communication", "title": "Device Communication",
"sidebar_label": "Device Communication" "sidebar_label": "Device Communication"
}, },
"create-plugin": {
"title": "Mobile Setup",
"sidebar_label": "Mobile Setup"
},
"create-table-plugin": {
"title": "Create Table Plugin",
"sidebar_label": "Create Table Plugin"
},
"custom-ports": { "custom-ports": {
"title": "Running Flipper with different ports", "title": "Running Flipper with different ports",
"sidebar_label": "Using different ports" "sidebar_label": "Using different ports"
}, },
"error-handling": { "extending/arch": {
"title": "Error Handling", "title": "Architecture"
"sidebar_label": "Error Handling"
}, },
"establishing-a-connection": { "extending/create-plugin": {
"title": "Establishing a connection", "title": "Mobile Setup"
"sidebar_label": "Establishing a connection" },
"extending/create-table-plugin": {
"title": "Create Table Plugin"
},
"extending/error-handling": {
"title": "Error Handling"
},
"extending/establishing-a-connection": {
"title": "Establishing a connection"
},
"extending/index": {
"title": "Clients and Plugins"
},
"extending/js-setup": {
"title": "JavaScript Setup"
},
"extending/send-data": {
"title": "Sending Data to Plugins"
},
"extending/styling-components": {
"title": "Styling Components"
},
"extending/testing": {
"title": "Testing"
},
"extending/writing-a-plugin": {
"title": "Writing a plugin in JavaScript"
}, },
"features/crash-reporter-plugin": { "features/crash-reporter-plugin": {
"title": "Crash Reporter" "title": "Crash Reporter"
@@ -63,14 +76,6 @@
"getting-started": { "getting-started": {
"title": "Getting Started" "title": "Getting Started"
}, },
"js-setup": {
"title": "JavaScript Setup",
"sidebar_label": "JavaScript Setup"
},
"send-data": {
"title": "Sending Data to Plugins",
"sidebar_label": "Send Data"
},
"setup/crash-reporter-plugin": { "setup/crash-reporter-plugin": {
"title": "Crash Reporter Setup", "title": "Crash Reporter Setup",
"sidebar_label": "Crash Reporter" "sidebar_label": "Crash Reporter"
@@ -99,14 +104,6 @@
"title": "Stetho Guidance", "title": "Stetho Guidance",
"sidebar_label": "Stetho Guidance" "sidebar_label": "Stetho Guidance"
}, },
"styling-components": {
"title": "Styling Components",
"sidebar_label": "Styling Components"
},
"testing": {
"title": "Testing",
"sidebar_label": "Testing"
},
"troubleshooting": { "troubleshooting": {
"title": "Troubleshooting Issues", "title": "Troubleshooting Issues",
"sidebar_label": "Troubleshooting Issues" "sidebar_label": "Troubleshooting Issues"
@@ -114,23 +111,21 @@
"ui-components": { "ui-components": {
"title": "UI Components", "title": "UI Components",
"sidebar_label": "UI Components" "sidebar_label": "UI Components"
},
"writing-a-plugin": {
"title": "Writing a plugin in JavaScript",
"sidebar_label": "Writing a plugin"
} }
}, },
"links": { "links": {
"Features": "Features", "Features": "Features",
"Docs": "Docs", "Setup": "Setup",
"Extending": "Extending",
"GitHub": "GitHub" "GitHub": "GitHub"
}, },
"categories": { "categories": {
"Features": "Features", "Features": "Features",
"Using Flipper": "Using Flipper", "Using Flipper": "Using Flipper",
"Plugin Setup": "Plugin Setup", "Plugin Setup": "Plugin Setup",
"Plugin Development": "Plugin Development",
"Advanced Usage": "Advanced Usage", "Advanced Usage": "Advanced Usage",
"Extending Flipper": "Extending Flipper",
"Plugin Development": "Plugin Development",
"Internals": "Internals" "Internals": "Internals"
} }
}, },

View File

@@ -12,7 +12,7 @@
"features/share-flipper-data" "features/share-flipper-data"
] ]
}, },
"docs": { "setup": {
"Using Flipper": [ "Using Flipper": [
"getting-started", "getting-started",
"share-flipper-data", "share-flipper-data",
@@ -26,19 +26,22 @@
"setup/leak-canary-plugin", "setup/leak-canary-plugin",
"setup/crash-reporter-plugin" "setup/crash-reporter-plugin"
], ],
"Advanced Usage": ["custom-ports", "stetho"]
},
"extending": {
"Extending Flipper": ["extending/index"],
"Plugin Development": [ "Plugin Development": [
"js-setup", "extending/js-setup",
"writing-a-plugin", "extending/writing-a-plugin",
"create-table-plugin", "extending/create-table-plugin",
"communicating", "extending/communicating",
"ui-components", "extending/ui-components",
"styling-components", "extending/styling-components",
"create-plugin", "extending/create-plugin",
"send-data", "extending/send-data",
"error-handling", "extending/error-handling",
"testing" "extending/testing"
], ],
"Advanced Usage": ["custom-ports", "stetho"],
"Internals": ["arch", "establishing-a-connection"] "Internals": ["arch", "establishing-a-connection"]
} }
} }

View File

@@ -14,7 +14,8 @@ const siteConfig = {
projectName: 'flipper', projectName: 'flipper',
headerLinks: [ headerLinks: [
{doc: 'features/index', label: 'Features'}, {doc: 'features/index', label: 'Features'},
{doc: 'getting-started', label: 'Docs'}, {doc: 'getting-started', label: 'Setup'},
{doc: 'extending/index', label: 'Extending'},
{href: repoUrl, label: 'GitHub'}, {href: repoUrl, label: 'GitHub'},
], ],
editUrl: 'https://github.com/facebook/flipper/blob/master/docs/', editUrl: 'https://github.com/facebook/flipper/blob/master/docs/',