Commit Graph

17 Commits

Author SHA1 Message Date
Michel Weststrate
32a75ecb58 Restructure extending docs
Summary:
This diff restructures the 'extending' section of the docs, and rebrands it to 'creating plugins'. It then restructures this section into 4 top-level items

* Tutorial
* Desktop plugin APIs
* Client plugin APIs
* Workflow

Pages are put under the relevant sections, including pages which were before under internal. Some pages that didn't relate directly to plugin development have been moved to other top level sections (e.g. testing RN).

I didn't do de-duplication between pages yet, that will be done in the next diff.

Overview of changes:

* Extending -> Creating Plugins
* Moved Extending > Other platforms to Setup > Other platforms (as this is about clients, not plugins)
* Moved Internal FB plugin development stuff into Creating Plugins
* Separated Creating Plugins into ‘Tutorial’, Desktop API Reference, Cient API Reference, Workflow
* Remove TypeScript strict page, we are already strict
* Moved QPL linters to api docs and named id QPL lints
* Grouped the different pages on extending Layout plugin (needs deduping still)
* Warning about avoiding custom styling in general
* Moved internal index page to the top of the navigation of FB Internal, rather than at the bottom

Reviewed By: passy

Differential Revision: D25585172

fbshipit-source-id: ba2aa891395097d6aa101809084b915f115ee69d
2020-12-16 05:55:23 -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
John Knox
8249498b36 Use static docs preset and upgrade helpers
Summary: After this we can inline internal/external content among pages, and safely transclude markdown files that won't be present on GitHub.

Reviewed By: mweststrate

Differential Revision: D25338530

fbshipit-source-id: 3ce4b44081766aca8b52183c2e02a98c5be09a59
2020-12-07 04:28:30 -08:00
John Knox
142eb8f9ea Add doc markers to code
Summary: Referencing these from the wiki should be better than copy-pasting so we know they are up-to-date

Reviewed By: passy

Differential Revision: D23564251

fbshipit-source-id: ad90fcaa88c3c638212a277ce49a5faa41cd07df
2020-09-07 06:40:30 -07:00
John Knox
f33d4b3f9e Add internaldocs-fb-helpers lib
Summary:
This adds a new npm package "internaldocs-fb-helpers", and shows example usage in the flipper package.

This will stop everyone from having to inline the function definitions everywhere as is currently the case.

(It's using the old internaldocs name, to match the existing docusaurus-plugin-internaldocs-fb package - I don't think that's a big deal.)

It currently exports two methods:

* `fbContent(internalContent, publicContent)`
  * Allows you to return internal or external content based on build variant.
  * Has named args so you don't accidentally put internal stuff in the external arg.

* `isInternal(): boolean`
  * Not strictly necessary, but helps if you want to write your docs using an boolean variable rather than a switching function every time.

* `fbInternalOnly(internalContent)`
  * Convenience method for when you want internal content, or nothing.

I could have put these inside the existing docusaurus plugin, but that has docu v2 as a peer dependency, and I want these helpers to work on v1 as well, so made it a standalone package.

Reviewed By: passy

Differential Revision: D23474462

fbshipit-source-id: 22e5be6de2f3233deb298f1542a06e3575b6555a
2020-09-07 03:41:10 -07:00
John Knox
c6569470f4 Import internal pages from wiki
Summary:
This is the unadulterated output from running:
`yarn start static-docs-from-wiki --wiki_name Flipper --site_dir xplat/sonar/website`

Reviewed By: passy

Differential Revision: D23241773

fbshipit-source-id: 136e99130c77bedfb66bb31e31a7b331278857bb
2020-08-20 12:48:57 -07:00
John Knox
6e0b407063 Make it light mode by default
Summary:
The new version's disableSwitch isn't equivalent to disabling dark mode like it did before. The default is still dark but now there's no way to change it.

This makes the default light again. Would be nice to enable the dark mode switch, we just need someone to make sure the CSS colours have good enough contrast etc. PRs very welcome!

Dark mode:

{F287823751}

Reviewed By: mweststrate

Differential Revision: D23161145

fbshipit-source-id: fa887afbffa8a1e1e753833b2dba618c5f93435f
2020-08-17 06:19:34 -07:00
John Knox
21a7655322 Upgrade docusaurus version
Summary:
Upgrading to 61 to get support for absolute links with markdown syntax.

All other changes here are required by the new config validators.

Reviewed By: passy

Differential Revision: D23130020

fbshipit-source-id: cadb3c629d6a8e64931a8db0b86621d05ee5c30e
2020-08-14 10:33:02 -07:00
Pascal Hartig
4d28524fb4 Add links to legal and privacy
Summary: This is an OSS requirement now.

Reviewed By: mweststrate

Differential Revision: D22549763

fbshipit-source-id: 8666904fff2c1c30ac514ac3af5e5e14e6b73b09
2020-07-16 03:41:46 -07:00
Michel Weststrate
c902a27bce Add Sandy to internal documentation
Summary:
Scaffolded some internal Sandy notes and made them only internally available.

Since most of the pipeline was already set up by jknoxville, it is unclear to me if something needs to be done to set up the auto redirect from fbflipper.com

Reviewed By: jknoxville

Differential Revision: D22233534

fbshipit-source-id: 4bdf5535f5745e7e4d335647759c6cf1b7cc73c6
2020-07-01 09:12:36 -07:00
John Knox
62581a588e Add comment markers for live documentation
Reviewed By: passy

Differential Revision: D21998029

fbshipit-source-id: 9eb563dedd2a13de0b4b9798e529c4ad3293560a
2020-06-11 09:32:20 -07:00
John Knox
2a5d1d8ff9 Fix website syntax highlighting
Summary:
We have a bunch of code blocks using languages that aren't rendered by default, so adding syntax highlighting for those languages.

Also, some uses are using the wrong "name" for the language, so I've fixed them.

Reviewed By: mweststrate

Differential Revision: D21974341

fbshipit-source-id: 17146ea5ae4979241c51b3707035470e9742a104
2020-06-10 08:44:51 -07:00
John Knox
1895dd111a Upgrade docusaurus
Summary:
Upgrade docusaurus version. This one opens all external links in new tabs so you don't need to remember to do that yourself.
In static docs, all external links must do this, so this makes it no longer error prone.

Reviewed By: nikoant

Differential Revision: D21815718

fbshipit-source-id: c89a17daeb2bace3e14e0997e7442abc032aef89
2020-06-01 09:05:31 -07:00
John Knox
8e60f4abbb Use href instead of 'to' for external links
Summary: 'to' is for internal pages. href is for generic links, and has tweaks such as opening in new tabs and making sure sites work in iframes.

Reviewed By: passy

Differential Revision: D21550098

fbshipit-source-id: 306dd92378ca721c435b9f4f031136fc421cbb81
2020-05-13 09:32:52 -07:00
John Knox
c5cd182ac6 Use docusaurus-plugin-internaldocs-fb
Summary: Adds a docusaurus plugin to direct fb employees to the internal documentation.

Reviewed By: nikoant

Differential Revision: D21348579

fbshipit-source-id: 5093d68a23ec6ba91c6ae94bf7cb0e58fcf3e7ef
2020-05-01 07:03:01 -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
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