Skip to content

Conversation

@francinelucca
Copy link
Member

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

Changelog

Removed

  • use of useResponsiveValue in AnchoredOverlay in favor of css solution

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

@francinelucca francinelucca requested a review from a team as a code owner October 29, 2025 20:19
@changeset-bot
Copy link

changeset-bot bot commented Oct 29, 2025

⚠️ No Changeset found

Latest commit: c37bbf6

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

@francinelucca francinelucca added the skip changeset This change does not need a changelog label Oct 29, 2025
@github-actions github-actions bot added staff Author is a staff member integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Oct 29, 2025
@github-actions
Copy link
Contributor

👋 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!

top={position?.top || 0}
left={position?.left || 0}
responsiveVariant={variant.narrow === 'fullscreen' ? 'fullscreen' : undefined}
data-variant={currentResponsiveVariant}
Copy link
Member Author

Choose a reason for hiding this comment

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

from what I can tell there is not real usage to this

Copy link
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 pull request refactors the Overlay component to use CSS custom properties (CSS variables) for positioning instead of inline styles. The changes move position values (top, left, right, bottom) from direct inline style properties to CSS custom properties that are consumed by the CSS module.

Key changes:

  • CSS custom properties (--top, --left, --right, --bottom) are now set in the inline style instead of direct CSS properties
  • The CSS module consumes these custom properties to apply positioning
  • Removed unused useResponsiveValue import and logic from AnchoredOverlay
  • Removed data-variant attribute from the overlay element

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
packages/react/src/Overlay/Overlay.tsx Changed positioning from inline CSS properties to CSS custom properties
packages/react/src/Overlay/Overlay.module.css Added CSS rules to consume the custom properties for positioning
packages/react/src/AnchoredOverlay/AnchoredOverlay.tsx Removed unused responsive variant logic and simplified position prop passing
packages/react/src/AnchoredOverlay/snapshots/AnchoredOverlay.test.tsx.snap Updated snapshot to reflect new CSS custom property style format

Comment on lines -257 to -258
top={currentResponsiveVariant === 'anchored' ? position?.top || 0 : undefined}
left={currentResponsiveVariant === 'anchored' ? position?.left || 0 : undefined}
Copy link
Member Author

Choose a reason for hiding this comment

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

this css rule already takes care of resetting top/left, switched up the inline styles in the BaseOverlay as well to be css variables applied by the className so that they don't win over specificity

@primer-integration
Copy link

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

@github-actions github-actions bot added integration-tests: failing Changes in this PR cause breaking changes in gh/gh and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Oct 30, 2025
@github-actions github-actions bot requested a deployment to storybook-preview-7098 October 30, 2025 02:40 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-7098 October 30, 2025 02:49 Inactive
@github-actions github-actions bot added integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh and removed integration-tests: failing Changes in this PR cause breaking changes in gh/gh labels Oct 30, 2025
@primer-integration
Copy link

🟢 ci completed with status success.

@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 Oct 31, 2025
@github-actions
Copy link
Contributor

👋 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!

@francinelucca
Copy link
Member Author

Waiting to merge until landing dotcom changes https://github.com/github/github-ui/pull/6032

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

Labels

integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh skip changeset This change does not need a changelog staff Author is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants