fix(theme): revert prefers-color-scheme detection; dark is unconditio…#116
Merged
Conversation
…nal default - Remove OS-level prefers-color-scheme detection from useTheme.tsx and the inline themeScript in root.tsx - New visitors with no stored preference always get dark mode; light mode is only restored when localStorage explicitly holds "light" - Fixes PageSpeed Insights auditing in light mode (headless Chrome reports prefers-color-scheme: light, so the removed branch was switching it) - Update styleguide.md to document dark as the unconditional default Signed-off-by: Sinduri Guntupalli <sinduri.guntupalli@dynatrace.com>
…hicLayoutEffect The guard was dead code: in SSR useIsomorphicLayoutEffect resolves to useEffect, and React never runs effect callbacks during SSR, so the body was never reached on the server. In the browser window is always defined so the check always evaluated to false. Update styleguide.md to document the correct pattern (try/catch for fallible browser APIs) and explain why no typeof window guard is needed. Signed-off-by: Sinduri Guntupalli <sinduri.guntupalli@dynatrace.com>
Contributor
|
- Correct refresh cadence from "daily" to "hourly" in useDiscussionPosts and useAdventureLeaderboard (both refreshed by the same hourly workflow) - Extend useDiscussionPosts @returns to include solvers and loaded fields - Fix WalkthroughStep.content description: pre-rendered HTML, not raw markdown - Update TopPlayer and AdventureLevel.solvedCount/topPlayers comments: CommunitySidebar already uses real hook data; these fields are unused - Replace misleading Tailwind content-scanner rationale in MarkdownContent with the accurate reason (module-level constants, created once) - Remove false "kept in sync" claim in root.tsx; JSON-LD description and BRAND_SHORT_DESCRIPTION are intentionally separate - Add matchMedia regression tests to useTheme.test.tsx Signed-off-by: Sinduri Guntupalli <sinduri.guntupalli@dynatrace.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…nal default
Type of change
featnew featurefixbug fixrefactorno behavior changedocs/chore/config/perf/style/securityManual checks