Skip to content

fix: toggle theme switch appearing on the website pages#1978

Open
ayush00git wants to merge 1 commit intoapache:masterfrom
ayush00git:bug/dark-mode
Open

fix: toggle theme switch appearing on the website pages#1978
ayush00git wants to merge 1 commit intoapache:masterfrom
ayush00git:bug/dark-mode

Conversation

@ayush00git
Copy link
Contributor

Fixes: #1977

Changes:

  1. Removed the desktop rule that hid .react-toggle in website/src/css/customTheme.scss, so the theme switch is now visible in the navbar on all pages.

  2. Removed ThemeResetComponent from website/src/pages/index.tsx, which previously forced light mode and manually hid the toggle via DOM queries. The component was forcing light theme whenever the home page was being opened.

Result:
The color mode switch now appears and works consistently across the whole website, matching the behavior of the Blog and Case Studies page.

Screenshots of the change:

image Screenshot From 2025-12-17 13-53-41

@ayush00git
Copy link
Contributor Author

Hey @yzeng25 can you please review the PR, and please let me know if there are any changes.

@ayush00git
Copy link
Contributor Author

Hey @SkyeYoung @Baoyuantop
Can you please review this PR.

@yzeng25
Copy link
Contributor

yzeng25 commented Dec 24, 2025

Hey @yzeng25 can you please review the PR, and please let me know if there are any changes.

@ayush00git these 2 files are last modified by @guoqqqi and @LiteSun in #1866 and #1894 , suggest asking them to take a look.

@ayush00git
Copy link
Contributor Author

Hey @guoqqqi @LiteSun
Please review this PR.

@ayush00git
Copy link
Contributor Author

Hey @guoqqqi @LiteSun
Could you please take a look into this PR.
waiting for your response...

Copy link

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 missing theme toggle on most website pages by removing CSS and page-specific logic that was hiding/overriding the Docusaurus color mode switch, making the toggle consistently visible and functional across the site (Fixes #1977).

Changes:

  • Removed the desktop CSS rule that hid .react-toggle, allowing the theme switch to display on larger screens.
  • Removed the home page ThemeResetComponent that forced light mode and hid the toggle via DOM queries.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
website/src/pages/index.tsx Removes theme-forcing/hide-toggle component so homepage respects global color mode behavior.
website/src/css/customTheme.scss Stops hiding .react-toggle on desktop so the theme switch appears on all pages.

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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Site]: Missing theme toggle switch on website pages

2 participants

Comments