-
Notifications
You must be signed in to change notification settings - Fork 646
chore: add portal context #6815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 1884fcc The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
|
👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks! |
|
@copilot add tests to ensure elements render correctly inside custom Portal when PortalContext is supplied and on the default otherwise |
|
@francinelucca I've opened a new pull request, #6816, to work on those changes. Once the pull request is ready, I'll request review from you. |
size-limit report 📦
|
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: francinelucca <40550942+francinelucca@users.noreply.github.com>
|
@copilot add a storybook story that demonstrates how to use PortalContext to render items within a different Portal than the default |
|
@francinelucca I've opened a new pull request, #6821, to work on those changes. Once the pull request is ready, I'll request review from you. |
…#6821) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: francinelucca <40550942+francinelucca@users.noreply.github.com> Co-authored-by: Marie Lucca <francinelucca@github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
|
@copilot fix the accessibility issue with the dark theme by using token background colors from the theme |
|
@francinelucca I've opened a new pull request, #6847, to work on those changes. Once the pull request is ready, I'll request review from you. |
…ckground colors (#6847) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: francinelucca <40550942+francinelucca@users.noreply.github.com>
|
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
|
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Adam Dierkens <adierkens@users.noreply.github.com>
This pull request introduces a new
PortalContextto the@primer/reactlibrary, allowing more flexible and context-driven control over where portal content is rendered. The changes include updates to the corePortalcomponent, its exports, new Storybook examples, and additional tests to ensure correct behavior when usingPortalContextand container overrides.Changelog
New
PortalContexttoPortal.tsx, allowing consumers to specify aportalContainerNamevia React context, which determines the portal root container for content rendering. ThePortalcomponent now prioritizes the context value unless overridden by its owncontainerNameprop.Portal.test.tsxto verify correct portal rendering behavior when usingPortalContext, including context-only, default fallback, undefined context, and prop override scenarios.WithPortalContext) inPortal.features.stories.tsxto demonstrate how to usePortalContextfor controlling portal rendering, including context and prop override cases.Changed
index.tsand the package entry point to includePortalContext, making it available for consumers.Removed
Rollout strategy
Testing & Reviewing
Merge checklist