Skip to content

Drop @primer/react-brand from the docs site - #46

Merged
echarles merged 5 commits into
mainfrom
chore/drop-react-brand
Nov 20, 2026
Merged

echarles merged 5 commits into
mainfrom
chore/drop-react-brand

Conversation

@echarles

Copy link
Copy Markdown
Member

The docs site moves from @primer/react-brand to Primer React, as in the other Datalayer repositories:

  • @primer/react-brand removed from package.json, with its imports and CSS.
  • src/theme/Root wraps every page in Primer React's provider.
  • PrimerRoot follows Docusaurus' colour mode.

…ackage.json; the Docusaurus theme components without the react-brand ThemeProvider and CSS; pages keep their text as plain markdown (labels as inline code, buttons as links)
…ot wraps every page in PrimerRoot (Primer's ThemeProvider with Datalayer's theme, colour mode auto, BaseStyles, the primitives' CSS), the same file in every Datalayer site; @primer/react, @primer/primitives and styled-components 5 declared; markdown format 'detect'; IconsTitle on primer-addons' Box
…6): Primer's colorMode is day or night from the data-theme Docusaurus sets on <html>, read then watched with a MutationObserver (Root sits above Docusaurus' ColorModeProvider), the first render, the server's included, from themeConfig.colorMode.defaultMode. With colorMode auto, a dark system gave Primer dark on a site pinned to light. The same file in every Datalayer Docusaurus site.
Copilot AI balanced review requested due to automatic review settings November 20, 2026 18:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The BaseStyles wrapper breaks the Docusaurus flex layout, preventing short pages from filling the viewport and causing the footer to move upward.

1 open issue
What changed in this PR

This PR replaces the docs site's Primer Brand integration with Primer React, providing a shared theme that follows Docusaurus’ color mode.

Changes:

  • Add a site-wide Primer React provider synchronized with Docusaurus’ light/dark mode.
  • Remove Primer Brand imports and CSS, and update dependencies and component imports.
  • Enable extension-based Markdown format detection.
File Description
docs/​src/​theme/​Root.tsx Wrap every page in PrimerRoot.
docs/​src/​theme/​PrimerRoot.tsx Configure the shared theme, CSS primitives, and color-mode synchronization.
docs/​src/​theme/​IconsTitle.tsx Use the addons Box and remove Brand CSS.
docs/​src/​theme/​CustomDocItem.tsx Remove the page-level Brand provider and CSS.
docs/​package.json Replace Brand with Primer React and supporting dependencies.
docs/​docusaurus.config.js Enable Markdown format detection.

Review effort: Balanced

}, []);
return (
<ThemeProvider theme={datalayerTheme} colorMode={colorMode}>
<BaseStyles style={INHERIT}>{children}</BaseStyles>
…t 37's Dialog (title, onClose); isOpen, onDismiss and Dialog.Header are gone from it, and the package build failed on them (TS2322) since 2 November
…n flex box, so .main-wrapper fills short pages and the footer stays at the bottom (Copilot review)
@echarles
echarles merged commit f057f2f into main Nov 20, 2026
4 checks passed
@echarles
echarles deleted the chore/drop-react-brand branch November 20, 2026 18:51
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.

2 participants