Skip to content

feat: add scopeClassName to ThemeProvider and merge context values#2723

Merged
noahwaldner merged 4 commits into
mainfrom
feat/add-scoping-class-to-theme-provider
May 12, 2026
Merged

feat: add scopeClassName to ThemeProvider and merge context values#2723
noahwaldner merged 4 commits into
mainfrom
feat/add-scoping-class-to-theme-provider

Conversation

@noahwaldner
Copy link
Copy Markdown
Contributor

Added scopeClassName prop

This prop can be used to set a classname for scoped styles, such as guideline blocks.
The value is passed to all portals through the theme context, so also apply in dialogs etc.

I avoided using the name className as it is misleading in what the prop does. It does not set the classname of the Provider component, but add one additional class to the existing set.

Context merging

Previously, every nested ThemeProvider overrode the theme context with the default values.
We now merge the context and only override the values explicitly passed to the nested ThemeProvider

Screenshot 2026-05-12 at 11 13 39

@noahwaldner noahwaldner requested a review from a team as a code owner May 12, 2026 10:04
@noahwaldner noahwaldner requested a review from SamuelAlev May 12, 2026 10:04
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 12, 2026

⚠️ No Changeset found

Latest commit: e8ac838

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@netlify
Copy link
Copy Markdown

netlify Bot commented May 12, 2026

Deploy Preview for fondue-components ready!

Name Link
🔨 Latest commit df96381
🔍 Latest deploy log https://app.netlify.com/projects/fondue-components/deploys/6a030187b73f5a00089ce1e8
😎 Deploy Preview https://deploy-preview-2723.components.fondue-components.frontify.com
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment thread packages/components/src/components/ThemeProvider/ThemeProvider.tsx Outdated
Comment thread packages/components/src/components/ThemeProvider/ThemeProvider.tsx Outdated
@noahwaldner noahwaldner requested a review from SamuelAlev May 12, 2026 10:16
@noahwaldner noahwaldner merged commit aee34c3 into main May 12, 2026
9 checks passed
@noahwaldner noahwaldner deleted the feat/add-scoping-class-to-theme-provider branch May 12, 2026 13:17
@github-actions
Copy link
Copy Markdown
Contributor

Lead time: 3 hours, 20 minutes, 59 seconds (3.35 total hours) from first commit to close.
Review time: 3 hours, 12 minutes, 30 seconds (3.21 total hours) from ready for review to close.

  • First commit: 12.5.2026, 11:56:15.
  • Ready for review: 12.5.2026, 12:04:44.
  • Closed: 12.5.2026, 15:17:14.

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