[docs] Update Appearance API docs, add Mermaid diagram support#5060
[docs] Update Appearance API docs, add Mermaid diagram support#5060huntie wants to merge 1 commit intofacebook:mainfrom
Conversation
Update the `Appearance` and `useColorScheme` API reference pages with clearer descriptions, consistent terminology ("color scheme" over "user interface style"), and aligned return value docs between the two pages.
Adds `@docusaurus/theme-mermaid`, and includes a Mermaid flowchart on the Appearance page illustrating the `setColorScheme` override behaviour.
|
@huntie is attempting to deploy a commit to the Meta Open Source Team on Vercel. A member of the Team first needs to authorize it. |
| - `null`: The user has not indicated a preferred color theme. | ||
| - `'light'`: The light color scheme is applied. | ||
| - `'dark'`: The dark color scheme is applied. | ||
| - `'unspecified'`: **_Never returned_** (incorrectly typed). |
There was a problem hiding this comment.
This is actually the motivation for this change — discovered mismatched manual TS types in React Native vs the source code. Intend to remove 'unspecified' entirely in the near future.
✅ Deploy Preview for react-native ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| mermaid: { | ||
| theme: { | ||
| light: 'neutral', | ||
| dark: 'dark', | ||
| }, | ||
| }, |
There was a problem hiding this comment.
Let's use the default website font family ("Optimistic Display",system-ui,-apple-system,sans-serif) for the Mermaid diagrams:
|
Looks good, thanks for updates and adding a Mermaid setup! 👍 Besides the comment above I have one more appearance request - can we center the diagram on the page? It looks like we can add |
Update the
AppearanceanduseColorSchemeAPI reference pages with clearer descriptions, consistent terminology ("color scheme" over "user interface style"), and aligned return value docs between the two pages.Adds
@docusaurus/theme-mermaid, and includes a Mermaid flowchart on the Appearance page illustrating thesetColorSchemeoverride behaviour.