From cc3c5aad2a303f6453ea5d125804ee78c41235ce Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Mon, 17 Aug 2026 11:17:20 +1000 Subject: [PATCH] fix(website): apply ThemeProvider to Playbook article layout so dark mode works LearningArticleLayout replaces PageShell for Playbook articles but never wrapped itself in a ThemeProvider, so its useTheme() call always fell back to Primer's light default regardless of the site's actual theme preference. Split the component into a thin ThemeProvider wrapper plus the existing implementation (now LearningArticleLayoutBody), matching the pattern already used by PageShell. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 80686fef-efe3-4cdd-8cd6-bfa61a5d0af6 --- .../src/components/brand/LearningArticleLayout.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/website/src/components/brand/LearningArticleLayout.tsx b/website/src/components/brand/LearningArticleLayout.tsx index cfc2e148..079633d6 100644 --- a/website/src/components/brand/LearningArticleLayout.tsx +++ b/website/src/components/brand/LearningArticleLayout.tsx @@ -17,6 +17,7 @@ import { Heading, Section, Text, + ThemeProvider, useTheme, } from "@primer/react-brand"; @@ -144,7 +145,15 @@ export type LearningArticleLayoutProps = { children: React.ReactNode; }; -export function LearningArticleLayout({ +export function LearningArticleLayout(props: LearningArticleLayoutProps) { + return ( + + + + ); +} + +function LearningArticleLayoutBody({ pageHref, currentPage, breadcrumbLabel,