Skip to content

[CSS Anchor Positioning] Disable feature flag if portalContainerName is true#7805

Open
TylerJDev wants to merge 3 commits intomainfrom
tylerjdev/disable-css-anchor-positioning-custom-portal
Open

[CSS Anchor Positioning] Disable feature flag if portalContainerName is true#7805
TylerJDev wants to merge 3 commits intomainfrom
tylerjdev/disable-css-anchor-positioning-custom-portal

Conversation

@TylerJDev
Copy link
Copy Markdown
Member

@TylerJDev TylerJDev commented May 5, 2026

Closes https://github.com/github/primer/issues/6648

Disables primer_react_css_anchor_positioning if portalContainerName is true.

Changelog

Changed

  • Disables primer_react_css_anchor_positioning if portalContainerName is present.

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 5, 2026

🦋 Changeset detected

Latest commit: 301953d

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

This PR includes changesets to release 1 package
Name Type
@primer/react 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

@github-actions github-actions Bot added the staff Author is a staff member label May 5, 2026
@TylerJDev TylerJDev added the Canary Release Apply this label when you want CI to create a canary release of the current PR label May 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

⚠️ Action required

👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. Check the integration testing docs for step-by-step instructions. Or, apply the integration-tests: skipped manually label to skip these checks.

To publish a canary release for integration testing, apply the Canary Release label to this PR.

@github-actions github-actions Bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label May 5, 2026
@primer-integration
Copy link
Copy Markdown

👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/19933

@primer-integration
Copy link
Copy Markdown

Integration test results from github/github-ui:

Passed  CI   Passed
Passed  VRT   Passed
Passed  Projects   Passed

All checks passed!

@TylerJDev TylerJDev marked this pull request as ready for review May 5, 2026 12:16
@TylerJDev TylerJDev requested a review from a team as a code owner May 5, 2026 12:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR narrows when AnchoredOverlay uses CSS anchor positioning so overlays fall back to JS positioning when a named portal container is provided. It targets the overlay/portal integration in @primer/react, specifically the feature-flagged CSS anchor positioning path.

Changes:

  • Gate cssAnchorPositioning behind the absence of overlayProps.portalContainerName.
  • Preserve existing popover/CSS-anchor behavior when no named portal container is supplied.
  • Add a patch changeset describing the AnchoredOverlay behavior change.
Show a summary per file
File Description
packages/react/src/AnchoredOverlay/AnchoredOverlay.tsx Disables the CSS anchor positioning code path when overlayProps.portalContainerName is set.
.changeset/evil-coins-tease.md Records the AnchoredOverlay behavior change for release notes.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 2

Comment thread packages/react/src/AnchoredOverlay/AnchoredOverlay.tsx
Comment on lines +178 to +179
const cssAnchorPositioning =
cssAnchorPositioningFlag && supportsNativeCSSAnchorPositioning && !overlayProps?.portalContainerName
Copy link
Copy Markdown
Contributor

@llastflowers llastflowers left a comment

Choose a reason for hiding this comment

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

💖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Canary Release Apply this label when you want CI to create a canary release of the current PR integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm staff Author is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants