Skip to content

fix: avoid injecting a layout wrapper - #2697

Open
ayaanoncrypto wants to merge 1 commit into
rainbow-me:mainfrom
ayaanoncrypto:fix/provider-dom-wrapper
Open

fix: avoid injecting a layout wrapper#2697
ayaanoncrypto wants to merge 1 commit into
rainbow-me:mainfrom
ayaanoncrypto:fix/provider-dom-wrapper

Conversation

@ayaanoncrypto

Copy link
Copy Markdown

Summary

Fixes #2164.

Remove the extra div injected by RainbowKitProvider when a theme is active. The provider now uses a fragment, so application children keep their original DOM structure and layout behavior. Theme CSS injection remains unchanged.

Validation

  • git diff --check passed.
    • The repository dependency tree did not include local Prettier or TypeScript binaries, so those checks were unavailable in the sandbox.

@ayaanoncrypto
ayaanoncrypto requested a review from a team as a code owner August 19, 2026 18:09
@changeset-bot

changeset-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown

鈿狅笍 No Changeset found

Latest commit: 1d09adb

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

@vercel

vercel Bot commented Aug 19, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the rainbowdotme Team on Vercel.

A member of the Team first needs to authorize it.

@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: 1d09adb991

鈩癸笍 About Codex in GitHub

Codex has been enabled to automatically 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 馃憤.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

<ModalProvider>
{theme ? (
<div {...createThemeRootProps(id)}>
<>

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 Keep a data-rk ancestor for inline components

With the default non-null theme, replacing this element with a fragment removes the only data-rk ancestor from ordinary provider children. The build prefixes all Vanilla Extract selectors with [data-rk], and components such as ConnectButton do not call useThemeRootProps, so a normally rendered connect button no longer matches its CSS rules or inherits the theme variables; only portal dialogs explicitly add the attribute themselves. Retain a non-layout theme root or attach the theme-root props to every inline RainbowKit component root.

AGENTS.md reference: AGENTS.md:L75-L79

Useful? React with 馃憤聽/ 馃憥.

<ModalProvider>
{theme ? (
<div {...createThemeRootProps(id)}>
<>

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 Add a changeset for the provider behavior change

This changes the default provider's rendered DOM and is explicitly a user-facing bug fix, but the commit contains no .changeset entry for @rainbow-me/rainbowkit. Without one, the release queue will not version or document this package change, so it can be omitted from the next release unless an unrelated changeset happens to include the package.

AGENTS.md reference: AGENTS.md:L99-L104

Useful? React with 馃憤聽/ 馃憥.

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.

[bug] Provider affects the DOM

1 participant