Skip to content

Comments

🐛 Fix: dark mode switch button appears dark in light mode#1203

Closed
Copilot wants to merge 1 commit intofix/dark-mode-toggle-button-light-modefrom
copilot/sub-pr-1194
Closed

🐛 Fix: dark mode switch button appears dark in light mode#1203
Copilot wants to merge 1 commit intofix/dark-mode-toggle-button-light-modefrom
copilot/sub-pr-1194

Conversation

Copy link
Contributor

Copilot AI commented Feb 24, 2026

Pre-mount placeholder for ThemeToggle used bg-gray-200 which renders as dark gray in light mode, causing a visible flash before hydration. SidebarFooter similarly lacked theme-aware inline styles for the pre-mount state.


📝 Summary of Changes

  • ThemeToggle pre-mount placeholder: bg-gray-200bg-white border border-gray-200 to match mounted light-mode appearance
  • SidebarFooter full variant: replaced bg-white dark:bg-black Tailwind dark classes with JS-driven inline styles (backgroundColor, borderTopColor) to avoid hydration mismatch before theme resolves

Changes Made

  • Fixed ThemeToggle pre-mount placeholder styling to prevent dark flash in light mode
  • Refactored SidebarFooter background/border to use inline styles for theme-correct SSR rendering
  • Reverted unrelated Moon/Sun className template literal reformatting noise
  • Added inline comment mapping hardcoded hex values to Tailwind equivalents

Checklist

Please ensure the following before submitting your PR:

  • I have reviewed the project's contribution guidelines.
  • I have written unit tests for the changes (if applicable).
  • I have updated the documentation (if applicable).
  • I have tested the changes locally and ensured they work as expected.

Screenshots or Logs (if applicable)


👀 Reviewer Notes

The inline-style approach for SidebarFooter is a deliberate tradeoff: it prevents the pre-mount dark flash but means users with a dark-mode preference will see a brief light flash before hydration. Root cause is that html.dark isn't reliably set before first paint — a blocking <script> in <head> to apply the dark class before hydration would fix this at the source and allow Tailwind dark: classes everywhere. Worth a follow-up.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

@kubestellar-prow kubestellar-prow bot added dco-signoff: no Indicates the PR's author has not signed the DCO. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Feb 24, 2026
@kubestellar-prow
Copy link

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.

📝 Please follow instructions in the contributing guide to update your commits with the DCO

Full details of the Developer Certificate of Origin can be found at developercertificate.org.

The list of commits missing DCO signoff:

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@kubestellar-prow
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@netlify
Copy link

netlify bot commented Feb 24, 2026

Deploy Preview for kubestellar-docs ready!

Name Link
🔨 Latest commit f0bc033
🔍 Latest deploy log https://app.netlify.com/projects/kubestellar-docs/deploys/699d1ce81d7f290008b13064
😎 Deploy Preview https://deploy-preview-1203--kubestellar-docs.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.

@kubestellar-prow
Copy link

Hi @Copilot. Thanks for your PR.

I'm waiting for a kubestellar member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@kubestellar-prow kubestellar-prow bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 24, 2026
@kubestellar-prow kubestellar-prow bot deleted the branch fix/dark-mode-toggle-button-light-mode February 24, 2026 03:39
@kubestellar-prow kubestellar-prow bot closed this Feb 24, 2026
Copilot AI changed the title [WIP] Fix dark mode switch button appearance in light mode 🐛 Fix: dark mode switch button appears dark in light mode Feb 24, 2026
Copilot AI requested a review from clubanderson February 24, 2026 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: no Indicates the PR's author has not signed the DCO. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants