Skip to content

[docs] Fix RTL toggle highlight in docs settings drawer#48476

Merged
sai6855 merged 1 commit into
mui:masterfrom
sai6855:toggle-theme
May 5, 2026
Merged

[docs] Fix RTL toggle highlight in docs settings drawer#48476
sai6855 merged 1 commit into
mui:masterfrom
sai6855:toggle-theme

Conversation

@sai6855
Copy link
Copy Markdown
Member

@sai6855 sai6855 commented May 5, 2026

The left-to-right button remains highlighted even after selecting RTL in the settings drawer.

Before

image

After

image

@sai6855 sai6855 changed the title [docs] Pass direction prop to BrandingCssThemeProvider in BrandingCssVarsProvider [docs] Fix RTL toggle highlight in docs settings drawer May 5, 2026
@sai6855 sai6855 added type: bug It doesn't behave as expected. docs Improvements or additions to the documentation. labels May 5, 2026
@code-infra-dashboard
Copy link
Copy Markdown

Deploy preview

https://deploy-preview-48476--material-ui.netlify.app/

Bundle size

Bundle Parsed size Gzip size
@mui/material 0B(0.00%) 0B(0.00%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/private-theming 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@sai6855 sai6855 requested review from silviuaavram and siriwatknp May 5, 2026 13:30
@sai6855 sai6855 marked this pull request as ready for review May 5, 2026 13:42
Copilot AI review requested due to automatic review settings May 5, 2026 13:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the docs settings drawer so the selected text-direction toggle reflects the actual direction state by propagating the current direction into the docs branding theme provider. In the broader docs app, this keeps useTheme() consumers aligned with the direction managed in ThemeOptionsContext.

Changes:

  • Pass the current direction prop from BrandingCssVarsProvider into BrandingCssThemeProvider.
  • Ensure components reading theme.direction inside the docs shell, including the settings drawer toggle state, stay in sync with RTL/LTR changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sai6855 sai6855 merged commit de22378 into mui:master May 5, 2026
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to the documentation. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants