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
This commit is contained in:
John Knox
2020-04-27 04:01:24 -07:00
committed by Facebook GitHub Bot
parent 297ca61c49
commit 5f1a0548f5
101 changed files with 5110 additions and 2159 deletions

2
.gitignore vendored
View File

@@ -36,4 +36,4 @@ libs/*/bin/**/*.class
*.DS_Store *.DS_Store
# Automatically generated # Automatically generated
docs/extending/ui-components.md docs/extending/ui-components.mdx

View File

@@ -23,7 +23,7 @@ matrix:
skip-cleanup: true skip-cleanup: true
github-token: $GITHUB_TOKEN github-token: $GITHUB_TOKEN
fqdn: fbflipper.com fqdn: fbflipper.com
local-dir: website/build/flipper local-dir: website/build
keep-history: true keep-history: true
on: on:
branch: master branch: master

View File

@@ -47,7 +47,7 @@ type State = {
type Props = OwnProps & DispatchFromProps & StateFromProps; type Props = OwnProps & DispatchFromProps & StateFromProps;
/** /**
* Usage: <Sheet>{onHide => <YourSheetContent onHide={onHide} />}</Sheet> * Usage: `<Sheet>{onHide => <YourSheetContent onHide={onHide} />}</Sheet>`
*/ */
class Sheet extends Component<Props, State> { class Sheet extends Component<Props, State> {
static getDerivedStateFromProps(props: Props) { static getDerivedStateFromProps(props: Props) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 412 KiB

View File

@@ -2,6 +2,7 @@
id: client-plugin-lifecycle id: client-plugin-lifecycle
title: Client Plugin Lifecycle title: Client Plugin Lifecycle
--- ---
import useBaseUrl from '@docusaurus/useBaseUrl';
There are two types of client plugin: Regular and Background plugins. We recommend starting off as a regular plugin and switching it to a background plugin if necessary. There are two types of client plugin: Regular and Background plugins. We recommend starting off as a regular plugin and switching it to a background plugin if necessary.
@@ -9,7 +10,7 @@ For both types of plugin, we recommend starting work after `onConnect` is called
## Regular Plugin Lifecycle ## Regular Plugin Lifecycle
For regular plugins, `onConnect` and `onDisconnect` are triggered when the user opens the plugin in the Flipper UI, and when they switch to another plugin, respectively. For regular plugins, `onConnect` and `onDisconnect` are triggered when the user opens the plugin in the Flipper UI, and when they switch to another plugin, respectively.
![Regular Plugin Lifecycle diagram](assets/regular-plugin-lifecycle.png) <img alt="Regular Plugin Lifecycle diagram" src={useBaseUrl("img/regular-plugin-lifecycle.png")} />
## Background Plugin Lifecycle ## Background Plugin Lifecycle
For background plugins, `onConnect` is called when Flipper first connects, and `onDisconnect` when it disconnects. The user does not need to be viewing the plugin for it to send messages; they will be queued up until the next time the user opens the plugin where they will be processed. For background plugins, `onConnect` is called when Flipper first connects, and `onDisconnect` when it disconnects. The user does not need to be viewing the plugin for it to send messages; they will be queued up until the next time the user opens the plugin where they will be processed.
@@ -19,5 +20,4 @@ Even for background plugins, `onDisconnect` and `onConnect` may be called on a p
Note that a plugin must be enabled by the user for its messages to be queued up. Note that a plugin must be enabled by the user for its messages to be queued up.
</div> </div>
![Background Plugin Lifecycle diagram](assets/bg-plugin-lifecycle.png) <img alt="Background Plugin Lifecycle diagram" src={useBaseUrl("img/bg-plugin-lifecycle.png")} />

View File

@@ -9,7 +9,7 @@ To make building these kinds of plugins as easy as possible we have created an a
Below is a sample implementation of a desktop plugin based on `createTablePlugin`. It subscribes to updates from a client send using the `newRow` method. A row can have any structure you want as long as it has a unique field `id` of type `string`. Below is a sample implementation of a desktop plugin based on `createTablePlugin`. It subscribes to updates from a client send using the `newRow` method. A row can have any structure you want as long as it has a unique field `id` of type `string`.
See "[Create Plugin](create-plugin.md)" for how to create the native counterpart for your plugin. See "[Create Plugin](create-plugin)" for how to create the native counterpart for your plugin.
```javascript ```javascript
import {ManagedDataInspector, Panel, Text, createTablePlugin} from 'flipper'; import {ManagedDataInspector, Panel, Text, createTablePlugin} from 'flipper';

View File

@@ -2,6 +2,7 @@
id: debugging id: debugging
title: Debugging title: Debugging
--- ---
import useBaseUrl from '@docusaurus/useBaseUrl';
## Built-in Developer Tools ## Built-in Developer Tools
@@ -17,13 +18,13 @@ As an alternative to using built-in Developer Tools you can also attach to the r
To attach the running Flipper instance open new tab in Google Chrome, navigate to "http://localhost:9222" and choose "Flipper" in the opened list. To attach the running Flipper instance open new tab in Google Chrome, navigate to "http://localhost:9222" and choose "Flipper" in the opened list.
![Attach From Google Chrome](assets/debugging-from-google-chrome.png) <img alt="Attach From Google Chrome" src={useBaseUrl("img/debugging-from-google-chrome.png")} />
## Visual Studio Code ## Visual Studio Code
If you prefer to use the same editor for both coding and debugging, you can attach to the running Flipper instance for debugging right from Visual Studio Code. First of all, you need to install extension "Debugger for Chrome". Then, to start debugging, open folder `desktop` of Flipper repository in VSCode, execute `yarn start` in terminal to launch Flipper in development mode, select tab `Debug and Run`, and run task `Attach to Running Renderer`. By default this task is set as the first one, so you can just press `F5` to run it. If you prefer to use the same editor for both coding and debugging, you can attach to the running Flipper instance for debugging right from Visual Studio Code. First of all, you need to install extension "Debugger for Chrome". Then, to start debugging, open folder `desktop` of Flipper repository in VSCode, execute `yarn start` in terminal to launch Flipper in development mode, select tab `Debug and Run`, and run task `Attach to Running Renderer`. By default this task is set as the first one, so you can just press `F5` to run it.
![Attach From Visual Studio Code](assets/debugging-from-vscode.png) <img alt="Attach From Visual Studio Code" src={useBaseUrl("img/debugging-from-vscode.png")} />
## Plugin missing ## Plugin missing

View File

@@ -96,7 +96,7 @@ Important attributes of `package.json`:
- `bugs` Specify an email and/or url, where plugin bugs should be reported. - `bugs` Specify an email and/or url, where plugin bugs should be reported.
In `index.tsx` you will define the plugin in JavaScript. This file must export a default class that extends `FlipperPlugin`. Browse our [JS API docs](js-plugin-api) to see what you can do, and make sure to check out our [UI Component Library](ui-components.md) for lots of pre-made components. In `index.tsx` you will define the plugin in JavaScript. This file must export a default class that extends `FlipperPlugin`. Browse our [JS API docs](js-plugin-api) to see what you can do, and make sure to check out our [UI Component Library](ui-components) for lots of pre-made components.
Example `index.tsx`: Example `index.tsx`:
```js ```js

View File

@@ -2,11 +2,12 @@
id: layout-inspector id: layout-inspector
title: Extending Layout Inspector title: Extending Layout Inspector
--- ---
import useBaseUrl from '@docusaurus/useBaseUrl';
The Layout Inspector plugin can be extended to support new kinds of UI components. You can also extend it to customize the data made available in the sidebar. The Layout Inspector plugin can be extended to support new kinds of UI components. You can also extend it to customize the data made available in the sidebar.
Depending on whether you want to expose new data on Android or iOS, there are different interfaces you can use. Depending on whether you want to expose new data on Android or iOS, there are different interfaces you can use.
![Layout Inspector](assets/layoutinspector.png) <img alt="Layout Inspector" src={useBaseUrl("img/layoutinspector.png")} />
## Android ## Android

View File

@@ -2,12 +2,13 @@
id: crash-reporter-plugin id: crash-reporter-plugin
title: Crash Reporter title: Crash Reporter
--- ---
import useBaseUrl from '@docusaurus/useBaseUrl';
→ [See setup instructions for the Crash Reporter](setup/crash-reporter-plugin.md) → [See setup instructions for the Crash Reporter](setup/crash-reporter-plugin)
The Crash Reporter Plugin shows a notification in Flipper whenever an app crashes. You can click on the notification to see crash information like stacktrace and other metadata. For Android, you can click the "Open in Logs" button to jump to the row in the Logs plugin with the crash information. The Crash Reporter Plugin shows a notification in Flipper whenever an app crashes. You can click on the notification to see crash information like stacktrace and other metadata. For Android, you can click the "Open in Logs" button to jump to the row in the Logs plugin with the crash information.
![UI](assets/crashreporterplugin.png) <img alt="UI" src={useBaseUrl("img/crashreporterplugin.png")} />
![Notification](assets/crashreporterpluginnotification.png) <img alt="Notification" src={useBaseUrl("img/crashreporterpluginnotification.png")} />

View File

@@ -2,8 +2,9 @@
id: databases-plugin id: databases-plugin
title: Databases title: Databases
--- ---
import useBaseUrl from '@docusaurus/useBaseUrl';
→ [See setup instructions for the Databases plugin](setup/databases-plugin.md) → [See setup instructions for the Databases plugin](setup/databases-plugin)
The Databases plugin provides developers with read-write access to their databases: The Databases plugin provides developers with read-write access to their databases:
- browse your tables' data - browse your tables' data
@@ -13,7 +14,7 @@ The Databases plugin provides developers with read-write access to their databas
- see logs of past executed queries - see logs of past executed queries
![Databases Plugin 1](assets/databases-plugin-1.png) <img alt="Databases Plugin 1" src={useBaseUrl("img/databases-plugin-1.png")} />
![Databases Plugin 2](assets/databases-plugin-2.png) <img alt="Databases Plugin 2" src={useBaseUrl("img/databases-plugin-2.png")} />
Note: this plugin is only available for Android. Note: this plugin is only available for Android.

View File

@@ -2,14 +2,15 @@
id: images-plugin id: images-plugin
title: Images title: Images
--- ---
import useBaseUrl from '@docusaurus/useBaseUrl';
→ [See setup instructions for the images plugin](setup/images-plugin.md) → [See setup instructions for the images plugin](setup/images-plugin)
The images plugin allows you to inspect what images were fetched, where they are The images plugin allows you to inspect what images were fetched, where they are
coming from and selectively clear caches. Currently, the plugin supports coming from and selectively clear caches. Currently, the plugin supports
[Fresco](https://github.com/facebook/fresco/) as backend. [Fresco](https://github.com/facebook/fresco/) as backend.
![Images plugin](assets/images-plugin.png) <img alt="Images plugin" src={useBaseUrl("img/images-plugin.png")} />
## Cache Inspector ## Cache Inspector

View File

@@ -2,13 +2,14 @@
id: index id: index
title: Features title: Features
--- ---
import useBaseUrl from '@docusaurus/useBaseUrl';
Flipper itself only provides the architectural platform. What makes it useful are the plugins built on top of it: [Logs](logs-plugin.md), [Layout Inspector](layout-plugin.md) and [Network Inspector](network-plugin.md) are all plugins. Plugins can be built very specific to your business logic and the use-cases you have in your app. We are shipping Flipper with a couple of built-in all-purpose plugins, but we encourage you to build your own. Each plugin needs to be enabled individually. Flipper itself only provides the architectural platform. What makes it useful are the plugins built on top of it: [Logs](logs-plugin), [Layout Inspector](layout-plugin) and [Network Inspector](network-plugin) are all plugins. Plugins can be built very specific to your business logic and the use-cases you have in your app. We are shipping Flipper with a couple of built-in all-purpose plugins, but we encourage you to build your own. Each plugin needs to be enabled individually.
![Layout plugin](assets/plugins.png) <img alt="Plugins" src={useBaseUrl('img/plugins.png')} />
## Build your own plugin ## Build your own plugin
The Flipper desktop app and the mobile native SDK establish a connection which is used to send data to and from the device. Flipper does not make any restrictions on what kind of data is being sent. This enables a lot of different use-cases where you want to better understand what is going inside your app. For example you can visualize the state of local caches, events happening or trigger actions on your app from the desktop. The Flipper desktop app and the mobile native SDK establish a connection which is used to send data to and from the device. Flipper does not make any restrictions on what kind of data is being sent. This enables a lot of different use-cases where you want to better understand what is going inside your app. For example you can visualize the state of local caches, events happening or trigger actions on your app from the desktop.
If there is no plugin that does exactly what you want, you can build your own plugin, tailored to your needs. A plugin always consists of the native implementation sending and receiving data and the desktop plugin visualizing data. Learn more on how to [extend Flipper](extending/index.md) and build your own plugin. The native implementations are written in Java, Objective-C, or C++, the desktop UI is written in React. If there is no plugin that does exactly what you want, you can build your own plugin, tailored to your needs. A plugin always consists of the native implementation sending and receiving data and the desktop plugin visualizing data. Learn more on how to [extend Flipper](extending/index) and build your own plugin. The native implementations are written in Java, Objective-C, or C++, the desktop UI is written in React.

View File

@@ -2,8 +2,9 @@
id: layout-plugin id: layout-plugin
title: Layout Inspector title: Layout Inspector
--- ---
import useBaseUrl from '@docusaurus/useBaseUrl';
→ [See setup instructions for the Layout Inspector](setup/layout-plugin.md) → [See setup instructions for the Layout Inspector](setup/layout-plugin)
The Layout Inspector in Flipper is useful for a ton of different debugging scenarios. First of all, you can inspect what views the hierarchy is made up of as well as what properties each view has. This is incredibly useful when debugging issues with your product. The Layout Inspector in Flipper is useful for a ton of different debugging scenarios. First of all, you can inspect what views the hierarchy is made up of as well as what properties each view has. This is incredibly useful when debugging issues with your product.
@@ -11,7 +12,7 @@ The Layout tab supports [Litho](https://fblitho.com) and [ComponentKit](https://
If you hover over a view or component in Flipper we will highlight the corresponding item in your app. This is perfect for debugging the bounds of your views and making sure you have the correct visual padding. If you hover over a view or component in Flipper we will highlight the corresponding item in your app. This is perfect for debugging the bounds of your views and making sure you have the correct visual padding.
![Layout plugin](assets/layout.png) <img alt="Layout plugin" src={useBaseUrl("img/layout.png")} />
## Quick edits ## Quick edits

View File

@@ -3,7 +3,7 @@ id: leak-canary-plugin
title: LeakCanary title: LeakCanary
--- ---
→ [See setup instructions for the LeakCanary](setup/leak-canary-plugin.md) → [See setup instructions for the LeakCanary](setup/leak-canary-plugin)
The LeakCanary plugin provides developers with Flipper support for [LeakCanary](https://github.com/square/leakcanary), an open source memory leak detection library. The LeakCanary plugin provides developers with Flipper support for [LeakCanary](https://github.com/square/leakcanary), an open source memory leak detection library.

View File

@@ -2,10 +2,11 @@
id: logs-plugin id: logs-plugin
title: Logs title: Logs
--- ---
import useBaseUrl from '@docusaurus/useBaseUrl';
The Logs plugin shows device logs without any additional setup. This is a device plugin, meaning that it is not tied to any specific app and there is no additional setup needed to see the logs. The Logs plugin shows device logs without any additional setup. This is a device plugin, meaning that it is not tied to any specific app and there is no additional setup needed to see the logs.
![Logs plugin](assets/logs.png) <img alt="Logs plugin" src={useBaseUrl("img/logs.png")} />
## Filtering ## Filtering

View File

@@ -2,13 +2,14 @@
id: navigation-plugin id: navigation-plugin
title: Navigation title: Navigation
--- ---
import useBaseUrl from '@docusaurus/useBaseUrl';
→ [See setup instructions for the Navigation Plugin](setup/navigation-plugin.md) → [See setup instructions for the Navigation Plugin](setup/navigation-plugin)
The Navigation Plugin allows users to quickly navigate to deep links within their mobile applications to help speed up the development cycle. The plugin is designed to integrate easily within your existing navigation framework or as a stand alone tool. Users can bookmark deep links and jump to them via the button in the tool bar. The Navigation Plugin allows users to quickly navigate to deep links within their mobile applications to help speed up the development cycle. The plugin is designed to integrate easily within your existing navigation framework or as a stand alone tool. Users can bookmark deep links and jump to them via the button in the tool bar.
![Navigation Plugin Button](assets/navigation-plugin-1.png) <img alt="Navigation Plugin Button" src={useBaseUrl("img/navigation-plugin-1.png")} />
Navigation events within the app can also be logged to Flipper. This allows the user to view past navigation events and jump straight to them, or export the navigation events for reporting. Navigation events within the app can also be logged to Flipper. This allows the user to view past navigation events and jump straight to them, or export the navigation events for reporting.
![Navigation Plugin UI](assets/navigation-plugin-2.png) <img alt="Navigation Plugin UI" src={useBaseUrl("img/navigation-plugin-2.png")} />

View File

@@ -2,11 +2,12 @@
id: network-plugin id: network-plugin
title: Network title: Network
--- ---
import useBaseUrl from '@docusaurus/useBaseUrl';
→ [See setup instructions for the Network plugin](setup/network-plugin.md) → [See setup instructions for the Network plugin](setup/network-plugin)
Use the Network inspector to inspect outgoing network traffic in your apps. You can easily browse all requests being made and their responses. The plugin also supports gzipped responses. Use the Network inspector to inspect outgoing network traffic in your apps. You can easily browse all requests being made and their responses. The plugin also supports gzipped responses.
![Network plugin](assets/network.png) <img alt="Network plugin" src={useBaseUrl("img/network.png")} />
All request sent from the device will be listed in the plugin. Click on a request to see details like headers and body. You can filter the table for domain, method or status by clicking on the corresponding value in the table. All request sent from the device will be listed in the plugin. Click on a request to see details like headers and body. You can filter the table for domain, method or status by clicking on the corresponding value in the table.

View File

@@ -2,8 +2,9 @@
id: react-native id: react-native
title: React Native Support title: React Native Support
--- ---
import useBaseUrl from '@docusaurus/useBaseUrl';
![React Native + React DevTools](assets/react-native-react.png) <img alt="React Native + React DevTools" src={useBaseUrl("img/react-native-react.png")} />
The React Native and Developer tooling teams at Facebook work in close collaboration to make sure Flipper offers top-notch value out of the box for React Native development. The React Native and Developer tooling teams at Facebook work in close collaboration to make sure Flipper offers top-notch value out of the box for React Native development.
Integration between React Native and Flipper is enabled out of the box in React Native version 0.62 and higher. Integration between React Native and Flipper is enabled out of the box in React Native version 0.62 and higher.
@@ -16,7 +17,7 @@ In Flipper there is a dedicated device type, “React Native”, that connects t
If Metro is connected, two new buttons will appear in Flippers main toolbar: “Reload” and “Open Dev Menu”. Both do exactly what their name suggests, without needing the agility of a pianist to get to the right keyboard combo inside your emulator. The “React Native” device will feature two plugins out of the box: “Logs” and “React DevTools”. If Metro is connected, two new buttons will appear in Flippers main toolbar: “Reload” and “Open Dev Menu”. Both do exactly what their name suggests, without needing the agility of a pianist to get to the right keyboard combo inside your emulator. The “React Native” device will feature two plugins out of the box: “Logs” and “React DevTools”.
![React Native Action Buttons and Logs](assets/react-native-logs.png) <img alt="React Native Action Buttons and Logs" src={useBaseUrl("img/react-native-logs.png")} />
The React DevTools allows you to inspect the component tree and tune the props and state of your React components. The React DevTools allows you to inspect the component tree and tune the props and state of your React components.
@@ -39,7 +40,7 @@ Beyond the React Native specific Flipper plugins described above, with Flipper y
One of the greatest values of Flipper is its extensibility. Many teams across Facebook already have written their own one-off plugins that help with analysing very specific use cases. One of the greatest values of Flipper is its extensibility. Many teams across Facebook already have written their own one-off plugins that help with analysing very specific use cases.
Writing plugins for Flipper doesn't require any native code, as the Flipper SDK is exposed directly to JavaScript through the [react-native-flipper](https://www.npmjs.com/package/react-native-flipper) package. Writing plugins for Flipper doesn't require any native code, as the Flipper SDK is exposed directly to JavaScript through the [react-native-flipper](https://www.npmjs.com/package/react-native-flipper) package.
![Tic Tac Toe example plugin](assets/react-native-tictactoe.png) <img alt="Tic Tac Toe example plugin" src={useBaseUrl("img/react-native-tictactoe.png")} />
_Example Flipper plugin: playing a game of Tic Tac Toe using Flipper and some emulators_ _Example Flipper plugin: playing a game of Tic Tac Toe using Flipper and some emulators_
If you would love to build a specific (or generic) extension for Flipper check out the following pointers! Plugins for Flipper can be distributed through NPM so sharing them is trivial. If you would love to build a specific (or generic) extension for Flipper check out the following pointers! Plugins for Flipper can be distributed through NPM so sharing them is trivial.

View File

@@ -3,6 +3,6 @@ id: sandbox-plugin
title: Sandbox title: Sandbox
--- ---
→ [See setup instructions for the Sandbox plugin](setup/sandbox-plugin.md) → [See setup instructions for the Sandbox plugin](setup/sandbox-plugin)
The sandbox plugin allows developers to test changes in their apps by pointing them to a sandbox environment. It provides a simple UI to set and modify the URL to a development host that acts as a sandbox directly on the desktop, which prevents you from entering potentially long and complicated URL inside your app. The sandbox plugin allows developers to test changes in their apps by pointing them to a sandbox environment. It provides a simple UI to set and modify the URL to a development host that acts as a sandbox directly on the desktop, which prevents you from entering potentially long and complicated URL inside your app.

View File

@@ -2,6 +2,7 @@
id: share-flipper-data id: share-flipper-data
title: Share Flipper Data title: Share Flipper Data
--- ---
import useBaseUrl from '@docusaurus/useBaseUrl';
Flipper's diagnostic and profiling data is often used for debugging. But sometimes you can not solve the problem on your own and need some help from your colleagues. Rather than just sending screenshots, you can share the data you are seeing in Flipper with them. This includes all logs, the layout hierarchy, network requests, etc. and helps to get the bigger picture of why something didn't work as expected. Flipper's diagnostic and profiling data is often used for debugging. But sometimes you can not solve the problem on your own and need some help from your colleagues. Rather than just sending screenshots, you can share the data you are seeing in Flipper with them. This includes all logs, the layout hierarchy, network requests, etc. and helps to get the bigger picture of why something didn't work as expected.
@@ -9,7 +10,7 @@ Flipper's diagnostic and profiling data is often used for debugging. But sometim
You can export Flipper's data in a `.flipper` file. For the export to work, an active device needs to be connected to Flipper. Make sure you have selected the device you want to export in Flipper's device dropdown: You can export Flipper's data in a `.flipper` file. For the export to work, an active device needs to be connected to Flipper. Make sure you have selected the device you want to export in Flipper's device dropdown:
![selectedDevice](assets/shareFlipperData/selectedDevice.png) <img alt="selectedDevice" src={useBaseUrl("img/shareFlipperData/selectedDevice.png")} />
To export Flipper's into a file, select "File" → "Export" from the menu bar and save it where ever you like. This file now can be shared with your colleagues. To export Flipper's into a file, select "File" → "Export" from the menu bar and save it where ever you like. This file now can be shared with your colleagues.
@@ -19,6 +20,6 @@ To export Flipper's into a file, select "File" → "Export" from the menu bar an
Opening a `.flipper` file imports all the data and allows you to use Flipper as if the device was connected. However, note the device is marked as "offline". This means, while you are able to see all the date, you can not interact with it (e.g. change a view's background color), because the actual device is not present. Opening a `.flipper` file imports all the data and allows you to use Flipper as if the device was connected. However, note the device is marked as "offline". This means, while you are able to see all the date, you can not interact with it (e.g. change a view's background color), because the actual device is not present.
![importedDevice](assets/shareFlipperData/importedDevice.png) <img alt="importedDevice" src={useBaseUrl("img/shareFlipperData/importedDevice.png")} />
For advanced users, Flipper also provides a URL handler to import data. Linking to `flipper://import/?url={LINK_TO_FLIPPER_FILE}` will launch Flipper and display the downloaded data. For advanced users, Flipper also provides a URL handler to import data. Linking to `flipper://import/?url={LINK_TO_FLIPPER_FILE}` will launch Flipper and display the downloaded data.

View File

@@ -2,10 +2,12 @@
id: shared-preferences-plugin id: shared-preferences-plugin
title: Shared Preferences title: Shared Preferences
--- ---
→ [See setup instructions for the Shared Preferences plugin](setup/shared-preferences-plugin.md) import useBaseUrl from '@docusaurus/useBaseUrl';
→ [See setup instructions for the Shared Preferences plugin](setup/shared-preferences-plugin)
Easily inspect and modify the data contained within your app's shared preferences. Easily inspect and modify the data contained within your app's shared preferences.
![Shared Preferences Plugin](assets/shared-preferences.png) <img alt="Shared Preferences Plugin" src={useBaseUrl("img/shared-preferences.png")} />
All changes to the given shared preference file will automatically appear in Flipper. You may also edit the values in Flipper and have them synced to your device. This can be done by clicking on the value of the specific key you wish to edit, editing the value and then pressing enter. All changes to the given shared preference file will automatically appear in Flipper. You may also edit the values in Flipper and have them synced to your device. This can be done by clicking on the value of the specific key you wish to edit, editing the value and then pressing enter.

View File

@@ -108,7 +108,7 @@ dependencies {
## Enabling plugins ## Enabling 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. 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) and [Layout Inspector Plugin](setup/layout-plugin) 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

@@ -2,6 +2,7 @@
id: index id: index
title: Desktop App title: Desktop App
--- ---
import useBaseUrl from '@docusaurus/useBaseUrl';
Flipper helps you debug Android and iOS apps running in an emulator/simulator or connected physical development devices. Flipper consists of two parts: Flipper helps you debug Android and iOS apps running in an emulator/simulator or connected physical development devices. Flipper consists of two parts:
@@ -16,4 +17,4 @@ The desktop part of Flipper doesn't need any particular setup. Simply download t
Once you start Flipper and launch an emulator/simulator or connect a device, you will already be able to see the device logs in Flipper. To see app specific data, you need to integrate our native SDKs with your app. Once you start Flipper and launch an emulator/simulator or connect a device, you will already be able to see the device logs in Flipper. To see app specific data, you need to integrate our native SDKs with your app.
![Logs plugin](assets/initial.png) <img alt="Logs plugin" src={useBaseUrl("img/initial.png")} />

View File

@@ -223,7 +223,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
## Enabling plugins ## Enabling 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. 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) and [Layout Inspector Plugin](setup/layout-plugin) 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

@@ -4,7 +4,7 @@ title: Crash Reporter Setup
sidebar_label: Crash Reporter sidebar_label: Crash Reporter
--- ---
You do not have to instantiate it in your app in order to use its basic functionality mentioned [here](features/crash-reporter-plugin.md). You can also use crash reporter plugin to send the notifications for the exception which you suppress in your Android application. You could even use it to send the notifications when the [Litho Error Boundary](https://fblitho.com/docs/error-boundaries) is triggered. In order to send your custom notification you will have to follow the following steps. You do not have to instantiate it in your app in order to use its basic functionality mentioned [here](features/crash-reporter-plugin). You can also use crash reporter plugin to send the notifications for the exception which you suppress in your Android application. You could even use it to send the notifications when the [Litho Error Boundary](https://fblitho.com/docs/error-boundaries) is triggered. In order to send your custom notification you will have to follow the following steps.
## Android ## Android

View File

@@ -6,6 +6,6 @@ sidebar_label: Stetho Guidance
In 2015, we introduced [Stetho](http://facebook.github.io/stetho/), an Android debugging bridge built on top of [Chrome DevTools](https://developers.google.com/web/tools/chrome-devtools/). While it was a valuable tool to us and many members of the community, we felt that it limited us in what we could do with it. Stetho is Android-only and while Chrome DevTools gave us a nice foundation to build upon, they also limited us in what we could build. Stetho is an Android tool and Chrome DevTools is built for web developers. This means we can only provide a good experience for the intersection of those two development environments, which was very limiting. With Flipper being built as a standalone app, we can do more things, like handling adb connections and supporting iOS, which wasn't easily achievable with Stetho. In 2015, we introduced [Stetho](http://facebook.github.io/stetho/), an Android debugging bridge built on top of [Chrome DevTools](https://developers.google.com/web/tools/chrome-devtools/). While it was a valuable tool to us and many members of the community, we felt that it limited us in what we could do with it. Stetho is Android-only and while Chrome DevTools gave us a nice foundation to build upon, they also limited us in what we could build. Stetho is an Android tool and Chrome DevTools is built for web developers. This means we can only provide a good experience for the intersection of those two development environments, which was very limiting. With Flipper being built as a standalone app, we can do more things, like handling adb connections and supporting iOS, which wasn't easily achievable with Stetho.
This is why we built Flipper. We wanted to create a platform that gives us all the flexibility we need to build more advanced features and support for iOS. One of Flipper's core concepts is its extensibility using [plugins](extending/index.md). Plugins are written in React and we provide a set of ready-to-use UI components that allow developers to build great plugin UIs with a few lines of code. This is why we built Flipper. We wanted to create a platform that gives us all the flexibility we need to build more advanced features and support for iOS. One of Flipper's core concepts is its extensibility using [plugins](extending/index). Plugins are written in React and we provide a set of ready-to-use UI components that allow developers to build great plugin UIs with a few lines of code.
While offering many new features, Flipper also already covers most of the features provided by Stetho. This includes network and layout inspection and an advanced log viewer. We are committed to continuously improving Flipper with new features and plugins, however, we are aware that not all Stetho features are currently supported by Flipper. If you are using a particular feature of Stetho which isn't supported by Flipper, we are more than happy to hear about your use-case. Stetho will continue to work and we are not abandoning it so you can choose the tool that fits your needs best. We are confident that Flipper will work well for most use-cases and are more than happy to accept contributions from the open-source community adding new features. While offering many new features, Flipper also already covers most of the features provided by Stetho. This includes network and layout inspection and an advanced log viewer. We are committed to continuously improving Flipper with new features and plugins, however, we are aware that not all Stetho features are currently supported by Flipper. If you are using a particular feature of Stetho which isn't supported by Flipper, we are more than happy to hear about your use-case. Stetho will continue to work and we are not abandoning it so you can choose the tool that fits your needs best. We are confident that Flipper will work well for most use-cases and are more than happy to accept contributions from the open-source community adding new features.

View File

@@ -3,6 +3,7 @@ id: troubleshooting
title: Troubleshooting Issues title: Troubleshooting Issues
sidebar_label: Troubleshooting Issues sidebar_label: Troubleshooting Issues
--- ---
import useBaseUrl from '@docusaurus/useBaseUrl';
We hope that flipper works well out of the box, but the software is a work in progress and problems will occur. Below are some known issues and steps you can take to try to resolve them. We hope that flipper works well out of the box, but the software is a work in progress and problems will occur. Below are some known issues and steps you can take to try to resolve them.
@@ -99,7 +100,7 @@ If you experience errors such as `Undefined symbol: associated type descriptor f
1. Go to the tab `Build Settings`; 1. Go to the tab `Build Settings`;
1. Search for `LD_RUNPATH_SEARCH_PATHS` (make sure that `All` is selected); 1. Search for `LD_RUNPATH_SEARCH_PATHS` (make sure that `All` is selected);
1. Double-click `Runpath Search Paths` and, in the dialog that opens, click on the plus button at the bottom-left corner and paste `/usr/lib/swift $(inherited)` there; 1. Double-click `Runpath Search Paths` and, in the dialog that opens, click on the plus button at the bottom-left corner and paste `/usr/lib/swift $(inherited)` there;
![Screenshot showing the places mentioned in the first steps](assets/troubleshooting-react-native-ios-swift.png) <img alt="Screenshot showing the places mentioned in the first steps" src={useBaseUrl("img/troubleshooting-react-native-ios-swift.png")} />
1. Now search for `LIBRARY_SEARCH_PATHS`; 1. Now search for `LIBRARY_SEARCH_PATHS`;
1. Double-click `Library Search Paths` and, in the dialog that opens, add the following items: 1. Double-click `Library Search Paths` and, in the dialog that opens, add the following items:
@@ -112,6 +113,6 @@ If you experience errors such as `Undefined symbol: associated type descriptor f
_Note: all of them should be added as `non-recursive` (the default)._ _Note: all of them should be added as `non-recursive` (the default)._
In the end it should look like this: In the end it should look like this:
![Screenshot showing the places mentioned in the last steps](assets/troubleshooting-react-native-ios-swift-2.png) <img alt="Screenshot showing the places mentioned in the last steps" src={useBaseUrl("img/troubleshooting-react-native-ios-swift-2.png")} />
1. Now you can run your build normally. 1. Now you can run your build normally.

View File

@@ -2,8 +2,9 @@
id: android id: android
title: Building an Android Plugin title: Building an Android Plugin
--- ---
import useBaseUrl from '@docusaurus/useBaseUrl';
<img align="right" src="/docs/assets/android-tutorial-app.png" alt="Android Tutorial App" width="200"> <img alt="Android Tutorial App" src={useBaseUrl("img/android-tutorial-app.png")} />
For the purpose of the tutorial, we will assume you already have an existing For the purpose of the tutorial, we will assume you already have an existing
Android application in which you have a feed or list of items. As the Flipper Android application in which you have a feed or list of items. As the Flipper

View File

@@ -2,8 +2,9 @@
id: intro id: intro
title: Intro title: Intro
--- ---
import useBaseUrl from '@docusaurus/useBaseUrl';
![Android App Tutorial](assets/android-tutorial.png) <img alt="Android App Tutorial" src={useBaseUrl("img/android-tutorial.png")} />
In this tutorial, we show you how how easy it is to build a Flipper plugin In this tutorial, we show you how how easy it is to build a Flipper plugin
for Android and iOS that extracts data from your native application and for Android and iOS that extracts data from your native application and

View File

@@ -2,8 +2,9 @@
id: ios id: ios
title: Building an iOS Plugin title: Building an iOS Plugin
--- ---
import useBaseUrl from '@docusaurus/useBaseUrl';
<img align="right" src="/docs/assets/ios-tutorial-app.png" alt="iOS Tutorial App" width="200"> <img alt="iOS Tutorial App" src={useBaseUrl("img/ios-tutorial-app.png")} />
For the purpose of the tutorial, we will assume you already have an existing iOS application in For the purpose of the tutorial, we will assume you already have an existing iOS application in
which you have a feed or list of items. As the Flipper team, we obviously concern ourselves mostly which you have a feed or list of items. As the Flipper team, we obviously concern ourselves mostly

View File

@@ -3,13 +3,14 @@ id: js-custom
title: Building Custom UI title: Building Custom UI
sidebar_label: Custom UI sidebar_label: Custom UI
--- ---
import useBaseUrl from '@docusaurus/useBaseUrl';
Displaying your data in a table might work for many use-cases. However, depending on your plugin and data it might make sense to customize the way your data is visualized. Flipper uses React to render the plugins and provides a variety of ready-to-use UI components that can be used to build custom plugin UIs. Displaying your data in a table might work for many use-cases. However, depending on your plugin and data it might make sense to customize the way your data is visualized. Flipper uses React to render the plugins and provides a variety of ready-to-use UI components that can be used to build custom plugin UIs.
## Replacing the table ## Replacing the table
For our sea mammals app, we might not only want to see them listed as image URLs in a table but render the actual images in nice little cards. When selecting one of the cards we still want to display all details in the sidebar. For our sea mammals app, we might not only want to see them listed as image URLs in a table but render the actual images in nice little cards. When selecting one of the cards we still want to display all details in the sidebar.
![Custom cards UI for our sea mammals plugin](assets/js-custom.png) <img alt="Custom cards UI for our sea mammals plugin" src={useBaseUrl("img/js-custom.png")} />
Currently, the default export in our `index.tsx` is from `createTablePlugin`. Now we are going to replace this with a custom React component extending `FlipperPlugin`. Currently, the default export in our `index.tsx` is from `createTablePlugin`. Now we are going to replace this with a custom React component extending `FlipperPlugin`.
@@ -34,7 +35,7 @@ export default class SeaMammals extends FlipperPlugin<State, any, PersistedState
} }
``` ```
You can see how we are styling our components using [emotion](https://emotion.sh/). To learn more about this, make sure to read our guide on [styling components](extending/styling-components.md). You can see how we are styling our components using [emotion](https://emotion.sh/). To learn more about this, make sure to read our guide on [styling components](extending/styling-components).
## Adding data handling ## Adding data handling

View File

@@ -3,6 +3,7 @@ id: js-publishing
title: Publishing your Plugin title: Publishing your Plugin
sidebar_label: Publishing sidebar_label: Publishing
--- ---
import useBaseUrl from '@docusaurus/useBaseUrl';
Once you're happy with your plugin and want the world to see it, Once you're happy with your plugin and want the world to see it,
you can publish it to npm. Ensure that your plugin follows these you can publish it to npm. Ensure that your plugin follows these
@@ -51,7 +52,7 @@ in the bottom of the left sidebar and selecting the
"Install Plugins" tab. It may take a few moments for the "Install Plugins" tab. It may take a few moments for the
search index to update and your plugin to appear. search index to update and your plugin to appear.
![Install plugins](assets/install-plugins.png) <img alt="Install plugins" src={useBaseUrl("img/install-plugins.png")} />
## Native Distribution ## Native Distribution

View File

@@ -3,12 +3,13 @@ id: js-setup
title: Building a Desktop Plugin title: Building a Desktop Plugin
sidebar_label: Building a Desktop Plugin sidebar_label: Building a Desktop Plugin
--- ---
import useBaseUrl from '@docusaurus/useBaseUrl';
Now that we have the native side covered, let's display the data we're sending Now that we have the native side covered, let's display the data we're sending
on the desktop side. You can check out the full workflow of building Flipper desktop on the desktop side. You can check out the full workflow of building Flipper desktop
plugins here: https://fbflipper.com/docs/extending/js-setup.html. plugins here: https://fbflipper.com/docs/extending/js-setup.html.
![Custom cards UI for our sea mammals plugin](assets/js-custom.png) <img alt="Custom cards UI for our sea mammals plugin" src={useBaseUrl("img/js-custom.png")} />
## Dynamic Plugin loading ## Dynamic Plugin loading

View File

@@ -2,8 +2,9 @@
id: js-table id: js-table
title: Showing a table title: Showing a table
--- ---
import useBaseUrl from '@docusaurus/useBaseUrl';
![Android Tutorial App](assets/android-tutorial-desktop.png) <img alt="Android Tutorial App" src={useBaseUrl("img/android-tutorial-desktop.png")} />
## Building a Table ## Building a Table

13
website/.gitignore vendored
View File

@@ -3,9 +3,20 @@ node_modules
lib/core/metadata.js lib/core/metadata.js
lib/core/MetadataBlog.js lib/core/MetadataBlog.js
website/translated_docs website/translated_docs
website/build/ build/
website/yarn.lock website/yarn.lock
website/node_modules website/node_modules
website/i18n/* website/i18n/*
!website/i18n/en.json !website/i18n/en.json
.docusaurus
.cache-loader
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*

View File

@@ -1,82 +0,0 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
const React = require('react');
class Footer extends React.Component {
docUrl(doc, language) {
const baseUrl = this.props.config.baseUrl;
return baseUrl + 'docs/' + (language ? language + '/' : '') + doc;
}
pageUrl(doc, language) {
const baseUrl = this.props.config.baseUrl;
return baseUrl + (language ? language + '/' : '') + doc;
}
render() {
return (
<footer className="nav-footer" id="footer">
<section className="sitemap">
<a href={this.props.config.baseUrl} className="nav-home">
{this.props.config.footerIcon && (
<img
src={this.props.config.baseUrl + this.props.config.footerIcon}
alt="Flipper mascot"
title="I'm a dolphin not a whale!"
width="66"
/>
)}
</a>
<div>
<h5>Docs</h5>
<a href="/docs/getting-started/">Getting Started</a>
<a href="/docs/extending/js-setup.html">Creating Plugins</a>
</div>
<div>
<h5>Plugins</h5>
<a href="/docs/features/logs-plugin.html">Log Viewer</a>
<a href="/docs/features/layout-plugin.html">Layout Inspector</a>
<a href="/docs/features/network-plugin.html">Network Inspector</a>
</div>
<div>
<h5>More</h5>
<a href="https://twitter.com/flipper_fb">Twitter</a>
<a href={this.props.config.repoUrl}>GitHub</a>
<a
className="github-button"
href={this.props.config.repoUrl}
data-icon="octicon-star"
data-count-href="/facebook/flipper/stargazers"
data-show-count={true}
data-count-aria-label="# stargazers on GitHub"
aria-label="Star this project on GitHub">
Star
</a>
</div>
</section>
<a
href="https://code.facebook.com/projects/"
target="_blank"
className="fbOpenSource">
<img
src={this.props.config.baseUrl + 'img/oss_logo.png'}
alt="Facebook Open Source"
width="170"
height="45"
/>
</a>
<section className="copyright">{this.props.config.copyright}</section>
</footer>
);
}
}
module.exports = Footer;

View File

@@ -0,0 +1,101 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
const repoUrl = 'https://github.com/facebook/flipper';
const siteConfig = {
title: 'Flipper',
tagline: 'Extensible mobile app debugging',
url: 'https://fbflipper.com/',
baseUrl: '/',
projectName: 'flipper',
themeConfig: {
navbar: {
title: 'Flipper',
logo: {
alt: 'Flipper Logo',
src: 'img/icon.png',
},
links: [
{to: 'docs/features/index', label: 'Features', position: 'right'},
{to: 'docs/getting-started/index', label: 'Setup', position: 'right'},
{to: 'docs/extending/index', label: 'Extending', position: 'right'},
{href: repoUrl, label: 'GitHub', position: 'right'},
],
},
disableDarkMode: true,
footer: {
style: 'dark',
links: [
{
title: 'Learn',
items: [
{label: 'Getting Started', to: 'docs/getting-started/index'},
{label: 'Plugin Creation Tutorial', to: 'docs/tutorial/intro'},
],
},
{
title: 'Plugins',
items: [
{label: 'Core Plugins', to: 'docs/features'},
{
label: 'Community Plugins',
to: 'https://www.npmjs.com/search?q=keywords:flipper-plugin',
},
],
},
{
title: 'More',
items: [
{label: 'Twitter', to: 'https://twitter.com/flipper_fb'},
{label: 'GitHub', to: repoUrl},
],
},
],
copyright: 'Copyright © ' + new Date().getFullYear() + ' Facebook',
logo: {
alt: 'Flipper Mascot',
src: 'img/mascot.png',
title: "I'm a dolphin not a whale!",
},
},
algolia: {
apiKey: '2df980e7ffc95c19552790f7cad32666',
indexName: 'fbflipper',
algoliaOptions: {
hitsPerPage: 5,
},
},
},
favicon: 'img/icon.png',
scripts: [
'https://buttons.github.io/buttons.js',
'https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js',
'/js/code-blocks-buttons.js',
'/js/google-analytics.js',
],
stylesheets: [],
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
path: '../docs',
sidebarPath: require.resolve('./sidebars.json'),
editUrl: 'https://github.com/facebook/flipper/blob/master/website',
},
theme: {
customCss: require.resolve('./static/css/custom.css'),
},
},
],
],
};
module.exports = siteConfig;

View File

@@ -20,7 +20,7 @@ title: UI Components
Flipper has a lot of built in React components to build UIs. You can import them directly using e.g. \`import {Button} from 'flipper'\`.`; Flipper has a lot of built in React components to build UIs. You can import them directly using e.g. \`import {Button} from 'flipper'\`.`;
const TARGET = __dirname + '/../docs/extending/ui-components.md'; const TARGET = __dirname + '/../docs/extending/ui-components.mdx';
glob(__dirname + '/../desktop/app/src/ui/components/**/*.tsx', (err, files) => { glob(__dirname + '/../desktop/app/src/ui/components/**/*.tsx', (err, files) => {
const content = files const content = files

View File

@@ -1,22 +1,26 @@
{ {
"scripts": { "scripts": {
"examples": "docusaurus-examples", "start": "yarn generate-uidocs && docusaurus start",
"start": "yarn generate-uidocs && docusaurus-start", "build": "yarn generate-uidocs && docusaurus build",
"build": "yarn generate-uidocs && docusaurus-build", "publish-gh-pages": "docusaurus deploy",
"publish-gh-pages": "docusaurus-publish", "write-translations": "docusaurus write-translations",
"write-translations": "docusaurus-write-translations", "version": "docusaurus version",
"version": "docusaurus-version", "rename-version": "docusaurus rename-version",
"rename-version": "docusaurus-rename-version",
"generate-uidocs": "node ./generate-uidocs.js" "generate-uidocs": "node ./generate-uidocs.js"
}, },
"devDependencies": { "devDependencies": {
"@babel/parser": "^7.8.3", "@babel/parser": "^7.8.3",
"@docusaurus/core": "^2.0.0-alpha.50",
"@docusaurus/preset-classic": "^2.0.0-alpha.50",
"docblock-parser": "^1.0.0", "docblock-parser": "^1.0.0",
"docusaurus": "^1.11.1",
"glob": "^7.1.3", "glob": "^7.1.3",
"react-docgen": "^5.2.1" "react-docgen": "^5.2.1",
"classnames": "^2.2.6",
"react": "^16.13.1",
"react-dom": "^16.13.1"
},
"dependencies": {
}, },
"dependencies": {},
"resolutions": { "resolutions": {
"minimist": "1.2.3", "minimist": "1.2.3",
"kind-of": "6.0.3" "kind-of": "6.0.3"

View File

@@ -1,24 +0,0 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
const React = require('react');
class Docs extends React.Component {
render() {
return (
<script
dangerouslySetInnerHTML={{
__html: "window.location.href = '/docs/getting-started/index.html'",
}}
/>
);
}
}
module.exports = Docs;

View File

@@ -1,58 +0,0 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
const repoUrl = 'https://github.com/facebook/flipper';
const siteConfig = {
title: 'Flipper' /* title for your website */,
tagline: 'Extensible mobile app debugging',
url: 'https://fbflipper.com/' /* your website url */,
baseUrl: '/' /* base url for your project */,
projectName: 'flipper',
headerLinks: [
{doc: 'features/index', label: 'Features'},
{doc: 'getting-started/index', label: 'Setup'},
{doc: 'extending/index', label: 'Extending'},
{href: repoUrl, label: 'GitHub'},
],
editUrl: 'https://github.com/facebook/flipper/blob/master/docs/',
/* path to images for header/footer */
headerIcon: 'img/icon.png',
footerIcon: 'img/mascot.png',
favicon: 'img/icon.png',
/* colors for website */
colors: {
primaryColor: '#121020',
secondaryColor: '#121020',
accentColor: '#785BA3',
actionColor: '#008cf2',
},
copyright: 'Copyright © ' + new Date().getFullYear() + ' Facebook',
highlight: {
theme: 'default',
},
algolia: {
apiKey: '2df980e7ffc95c19552790f7cad32666',
indexName: 'fbflipper',
algoliaOptions: {
hitsPerPage: 5,
},
},
scripts: [
'https://buttons.github.io/buttons.js',
'https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js',
'/js/code-blocks-buttons.js',
'/js/google-analytics.js',
],
repoUrl,
stylesheets: [],
onPageNav: 'separate',
};
module.exports = siteConfig;

View File

@@ -3,15 +3,15 @@
* *
* This source code is licensed under the MIT license found in the * This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*
* @format
*/ */
const React = require('react'); import React from 'react';
import Layout from '@theme/Layout';
import useBaseUrl from '@docusaurus/useBaseUrl';
class Index extends React.Component { export default function Index() {
render() {
return ( return (
<Layout title="index">
<div> <div>
<div className="splash"> <div className="splash">
<div className="content"> <div className="content">
@@ -22,7 +22,7 @@ class Index extends React.Component {
desktop interface. Use Flipper as is or extend it using the plugin desktop interface. Use Flipper as is or extend it using the plugin
API. API.
</h2> </h2>
<div className="row"> <div>
<p <p
className="landing-btn landing-btn-left landing-btn-label" className="landing-btn landing-btn-left landing-btn-label"
href="https://www.facebook.com/fbflipper/public/mac"> href="https://www.facebook.com/fbflipper/public/mac">
@@ -43,16 +43,16 @@ class Index extends React.Component {
href="https://www.facebook.com/fbflipper/public/windows"> href="https://www.facebook.com/fbflipper/public/windows">
Windows Windows
</a> </a>
<a className="landing-btn" href="/docs/features/index.html"> <a className="landing-btn" href={useBaseUrl("docs/features/index")}>
Learn more Learn more
</a> </a>
</div> </div>
<div className="slideshow"> <div className="slideshow">
<img src="/docs/assets/logs.png" className="splashScreen" /> <img src={useBaseUrl("img/logs.png")} className="splashScreen" />
<img src="/docs/assets/layout.png" className="splashScreen" /> <img src={useBaseUrl("img/layout.png")} className="splashScreen" />
<img src="/docs/assets/network.png" className="splashScreen" /> <img src={useBaseUrl("img/network.png")} className="splashScreen" />
<img <img
src="/docs/assets/crashreporterplugin.png" src={useBaseUrl("img/crashreporterplugin.png")}
className="splashScreen" className="splashScreen"
/> />
</div> </div>
@@ -62,8 +62,8 @@ class Index extends React.Component {
<div className="content row"> <div className="content row">
<div className="col"> <div className="col">
<img <img
src="/img/inspector.png" src={useBaseUrl("img/inspector.png")}
srcSet="/img/inspector.png 1x, /img/inspector@2x.png 2x" srcSet={`${useBaseUrl('img/inspector.png')} 1x, ${useBaseUrl('img/inspector@2x.png')} 2x`}
/> />
</div> </div>
<div className="col"> <div className="col">
@@ -75,7 +75,7 @@ class Index extends React.Component {
useful tools including a log viewer, interactive layout inspector, useful tools including a log viewer, interactive layout inspector,
and network inspector. and network inspector.
</p> </p>
<a className="learnmore" href="/docs/features/index.html"> <a className="learnmore" href={useBaseUrl("docs/features/index")}>
Learn more Learn more
</a> </a>
</div> </div>
@@ -91,22 +91,22 @@ class Index extends React.Component {
data back and forth, calling functions, and listening for events data back and forth, calling functions, and listening for events
on the mobile app. on the mobile app.
</p> </p>
<a className="learnmore" href="/docs/extending/index.html"> <a className="learnmore" href={useBaseUrl("docs/extending/index")}>
Learn more Learn more
</a> </a>
</div> </div>
<div className="col center"> <div className="col center">
<img <img
src="/img/FlipperKit.png" src={useBaseUrl("img/FlipperKit.png")}
srcSet="/img/FlipperKit.png 1x, /img/FlipperKit@2x.png 2x" srcSet={`${useBaseUrl('img/FlipperKit.png')} 1x, ${useBaseUrl('img/FlipperKit@2x.png')} 2x`}
/> />
</div> </div>
</div> </div>
<div className="content row"> <div className="content row">
<div className="col"> <div className="col">
<img <img
src="/img/plugins.png" src={useBaseUrl("img/plugins.png")}
srcSet="/img/plugins.png 1x, /img/plugins@2x.png 2x" srcSet={`${useBaseUrl('img/plugins.png')} 1x, ${useBaseUrl('img/plugins@2x.png')} 2x`}
/> />
</div> </div>
<div className="col"> <div className="col">
@@ -139,8 +139,6 @@ class Index extends React.Component {
</a> </a>
</div> </div>
</div> </div>
</Layout>
); );
}
} }
module.exports = Index;

View File

@@ -5,6 +5,16 @@
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*/ */
:root {
--ifm-color-primary: #121020;
--ifm-navbar-background-color: var(--ifm-color-primary);
--ifm-navbar-link-color: #ebedf0;
--ifm-navbar-shadow: none;
--ifm-navbar-link-hover-color: var(--ifm-navbar-link-color);
--ifm-footer-link-color: #ebedf0;
--ifm-footer-link-hover-color: var(--ifm-footer-link-color);
}
body, body,
h1, h1,
h2, h2,
@@ -465,11 +475,6 @@ footer iframe {
margin-bottom: 0px; margin-bottom: 0px;
} }
.navListItem a[href='/docs/features/index.html'] {
/* Hide sidebar link to "Features"-pages, because it is linked in header */
display: none !important;
}
.content.row { .content.row {
position: relative; position: relative;
} }

View File

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 55 KiB

View File

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 92 KiB

View File

Before

Width:  |  Height:  |  Size: 345 KiB

After

Width:  |  Height:  |  Size: 345 KiB

View File

Before

Width:  |  Height:  |  Size: 722 KiB

After

Width:  |  Height:  |  Size: 722 KiB

View File

Before

Width:  |  Height:  |  Size: 241 KiB

After

Width:  |  Height:  |  Size: 241 KiB

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

Before

Width:  |  Height:  |  Size: 702 KiB

After

Width:  |  Height:  |  Size: 702 KiB

View File

Before

Width:  |  Height:  |  Size: 666 KiB

After

Width:  |  Height:  |  Size: 666 KiB

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 MiB

After

Width:  |  Height:  |  Size: 1.5 MiB

View File

Before

Width:  |  Height:  |  Size: 216 KiB

After

Width:  |  Height:  |  Size: 216 KiB

View File

Before

Width:  |  Height:  |  Size: 188 KiB

After

Width:  |  Height:  |  Size: 188 KiB

View File

Before

Width:  |  Height:  |  Size: 472 KiB

After

Width:  |  Height:  |  Size: 472 KiB

View File

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

View File

Before

Width:  |  Height:  |  Size: 176 KiB

After

Width:  |  Height:  |  Size: 176 KiB

View File

Before

Width:  |  Height:  |  Size: 315 KiB

After

Width:  |  Height:  |  Size: 315 KiB

View File

Before

Width:  |  Height:  |  Size: 201 KiB

After

Width:  |  Height:  |  Size: 201 KiB

View File

Before

Width:  |  Height:  |  Size: 467 KiB

After

Width:  |  Height:  |  Size: 467 KiB

View File

Before

Width:  |  Height:  |  Size: 173 KiB

After

Width:  |  Height:  |  Size: 173 KiB

View File

Before

Width:  |  Height:  |  Size: 188 KiB

After

Width:  |  Height:  |  Size: 188 KiB

BIN
website/static/img/plugins.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 412 KiB

View File

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

View File

Before

Width:  |  Height:  |  Size: 423 KiB

After

Width:  |  Height:  |  Size: 423 KiB

View File

Before

Width:  |  Height:  |  Size: 995 KiB

After

Width:  |  Height:  |  Size: 995 KiB

View File

Before

Width:  |  Height:  |  Size: 695 KiB

After

Width:  |  Height:  |  Size: 695 KiB

View File

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 102 KiB

View File

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

Before

Width:  |  Height:  |  Size: 132 KiB

After

Width:  |  Height:  |  Size: 132 KiB

View File

Before

Width:  |  Height:  |  Size: 753 KiB

After

Width:  |  Height:  |  Size: 753 KiB

View File

Before

Width:  |  Height:  |  Size: 705 KiB

After

Width:  |  Height:  |  Size: 705 KiB

Some files were not shown because too many files have changed in this diff Show More