Repository navigation
Drop @primer/react-brand from the docs site - #46
Merged
Merged
Conversation
…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.
Contributor
There was a problem hiding this comment.
🟡 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)
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.

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