Skip to content

Modernize Precursor theming, primitives, and releases - #71

Merged
danieldelcore merged 1 commit into
masterfrom
codex/precursor-theming-release
Dec 3, 2026
Merged

danieldelcore merged 1 commit into
masterfrom
codex/precursor-theming-release

Conversation

@danieldelcore

Copy link
Copy Markdown
Owner

Summary

  • Build composable theme tokens with Style Dictionary and load color, spacing, shape, and typography independently, including browser-driven light and dark modes and SSR.
  • Update the component catalog, add Bleed, Divider, and native Popup, and migrate Modal to the native dialog API.
  • Upgrade React, Trousers, Storybook, Changesets, and the Oxc tooling. Configure npm Trusted Publishing for releases.

Verification

  • yarn install --immutable, yarn validate, and yarn storybook build passed locally.
  • The Changesets plan contains 37 packages. Bleed, Divider, and Popup need first-publish bootstraps before npm can configure them for Trusted Publishing.

@changeset-bot

changeset-bot Bot commented Dec 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e7fb55b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 37 packages
Name Type
@precursor/badge Major
@precursor/bleed Minor
@precursor/blockquote Major
@precursor/button Major
@precursor/checkbox Major
@precursor/code Major
@precursor/divider Minor
@precursor/grid Major
@precursor/heading Major
@precursor/inline Major
@precursor/input Major
@precursor/keyboard Major
@precursor/label Major
@precursor/lozenge Major
@precursor/message Major
@precursor/modal Major
@precursor/panel Major
@precursor/radio Major
@precursor/range Major
@precursor/select Major
@precursor/skeleton Major
@precursor/spinner Major
@precursor/stack Major
@precursor/tabs Major
@precursor/text Major
@precursor/textarea Major
@precursor/theme Major
@precursor/toggle Major
@precursor/tokens Major
@precursor/popup Minor
@precursor/avatar Major
@precursor/emoji Major
@precursor/image Major
@precursor/list Major
@precursor/overlay Major
@precursor/copy-to-clipboard Patch
@precursor/types Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-02T22:52:50.096903Z e7fb55b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e7fb55b88e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

"react": ">=16.8.0"
},
"repository": "https://github.com/danieldelcore/precursor/tree/master/packages/theming/theme"
"react": "^19.0.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Require a React version that provides useEffectEvent

Consumers using React 19.0 or 19.1 satisfy this peer dependency, but ThemeProvider now imports and unconditionally calls useEffectEvent, which was introduced in React 19.2. Those supported installations therefore fail when importing or rendering the provider. Raise the minimum React peer version to 19.2, or implement the error callback without that newer hook.

Useful? React with 👍 / 👎.

Comment on lines +32 to +34
const scopeStyles = css({
display: 'contents',
color: 'var(--color-text)',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Apply a matching background when selecting dark colors

When a consumer wraps ordinary content in a dark ThemeProvider without supplying its own background, this scope sets light text colors but leaves the page background white. The previous Globals implementation painted the body background; its replacement no longer does, and this display: contents scope cannot paint a background itself. Consequently, plain text and headings become nearly unreadable in explicit dark mode or auto mode on a dark-preferring system. Provide a matching scoped surface or restore an appropriate root background treatment.

Useful? React with 👍 / 👎.

@danieldelcore
danieldelcore merged commit 91fc636 into master Dec 3, 2026
1 check passed
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.

1 participant