Skip to content

[docs] Update Appearance API docs, add Mermaid diagram support#5060

Open
huntie wants to merge 1 commit intofacebook:mainfrom
huntie:appearance-docs-update
Open

[docs] Update Appearance API docs, add Mermaid diagram support#5060
huntie wants to merge 1 commit intofacebook:mainfrom
huntie:appearance-docs-update

Conversation

@huntie
Copy link
Copy Markdown
Member

@huntie huntie commented Apr 26, 2026

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.

image

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 huntie requested a review from Simek April 26, 2026 17:56
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 26, 2026

@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.

Comment thread docs/appearance.md
- `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).
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 26, 2026

Deploy Preview for react-native ready!

Name Link
🔨 Latest commit d33e33e
🔍 Latest deploy log https://app.netlify.com/projects/react-native/deploys/69ee51db4a96c50008146547
😎 Deploy Preview https://deploy-preview-5060--react-native.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment on lines +619 to +624
mermaid: {
theme: {
light: 'neutral',
dark: 'dark',
},
},
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use the default website font family ("Optimistic Display",system-ui,-apple-system,sans-serif) for the Mermaid diagrams:

@Simek
Copy link
Copy Markdown
Collaborator

Simek commented Apr 27, 2026

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 text-align: center to .docusaurus-mermaid-container class to achieve that inside our custom SCSS theme file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants