Summary:
The website generation fails on newer versions of `flipper-plugin` as it contains an import-time side effect. This leads to this error during build time:
```
[ERROR] Docusaurus server-side rendering could not render static page with path /docs/extending/style-guide/.
[INFO] It looks like you are using code that should run on the client-side only.
To get around it, try using `<BrowserOnly>` (https://docusaurus.io/docs/docusaurus-core/#browseronly) or `ExecutionEnvironment` (https://docusaurus.io/doc
s/docusaurus-core/#executionenvironment).
It might also require to wrap your client code in `useEffect` hook and/or import a third-party library dynamically (if any).
```
This ain't pretty but by wrapping the entire file in a single function that conditionally imports the `flipper-plugin` if we are indeed in a browser environment fixes the problem.
Reviewed By: antonk52
Differential Revision: D43773298
fbshipit-source-id: 8e1099249626ca9fe745ce51014491fe9674a5a4
Summary:
The site loads the style guide in an iframe so that it's css is isolated from the main sites styles.
But it doesn't know how big to render the iframe, because it doesn't know the size of its contents.
Previously, the js running inside the iframe measured itself and then accessed itself using the parents frame and modified it's own size to match.
That doesn't work anymore because the iframe isn't allowed to interact directly with its parent.
So instead, i'm using message passing.
Also changing MutationObserver to ResizeObserver because the former does not always fire when new css gets loaded and applied.
Reviewed By: aigoncharov
Differential Revision: D41735809
fbshipit-source-id: 9e84a9b20741f5470012e25f240fb6a2b494f7e3
Summary: Prevent leaking Flipper styles and antd styles into the website by embedding the styleguide into an iframe.
Reviewed By: nikoant
Differential Revision: D34522771
fbshipit-source-id: a05bf1e7f54fe172fb012a0a02296b3a4e0100f1
Summary: Unfortunately optional require does not work with docusaurus bundler configuration in case file not exist, so open source build is failing now. I'm backing out this commit until solution for dynamic imports in docusaurus found.
Reviewed By: mweststrate
Differential Revision: D23679198
fbshipit-source-id: 9be008f19b5945d17ec31614a8d2cb80bad9ca2e
Summary: Unfortunately optional require does not work with docusaurus bundler configuration in case file not exist, so open source build is failing now. I'm backing out this commit until solution for dynamic imports in docusaurus found.
Reviewed By: mweststrate
Differential Revision: D23679147
fbshipit-source-id: 7934e0a7decf128c1914f52645adaf4617c97eea
Summary:
Show internal instructions for Flipper setup by default on "Getting Started" page. This is a follow up to https://fb.workplace.com/groups/flippersupport/permalink/955763464904312/.
I used tabs component to show both internal and external content in tabs. By default, internal content is shown, but it is possible to also switch to external.
Reviewed By: jknoxville
Differential Revision: D23649955
fbshipit-source-id: c4f956e0ee9fec69cf861d96a447f934f746dd7f