Skip to content

chore(Overlay): Remove the CSS modules feature flag from the Overlay component #5982

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

Merged
merged 1 commit into from
Apr 29, 2025

Conversation

jonrohan
Copy link
Member

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

Changelog

New

Changed

Removed

Remove the CSS modules feature flag from the Overlay component

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

Merge checklist

Copy link

changeset-bot bot commented Apr 28, 2025

🦋 Changeset detected

Latest commit: cb2d313

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 Minor

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 Apr 28, 2025
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!

@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 Apr 28, 2025
Copy link
Contributor

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 99.37 KB (-0.38% 🔽)
packages/react/dist/browser.umd.js 99.65 KB (-0.24% 🔽)

@primer-integration
Copy link

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

@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 Apr 28, 2025
@primer-integration
Copy link

🟢 golden-jobs completed with status success.

@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 Apr 28, 2025
@jonrohan jonrohan marked this pull request as ready for review April 28, 2025 22:16
@Copilot Copilot AI review requested due to automatic review settings April 28, 2025 22:16
@jonrohan jonrohan requested a review from a team as a code owner April 28, 2025 22:16
@jonrohan jonrohan requested review from TylerJDev and joshblack April 28, 2025 22:16
Copy link
Contributor

@Copilot 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 removes the CSS modules feature flag from the Overlay component to simplify and streamline the component’s styling logic. Key changes include:

  • Updating the snapshot for AnchoredOverlay by removing the CSS modules based styling.
  • Refactoring the Overlay component to use BoxWithFallback instead of a styled component based on a feature flag.
  • Skipping two alignment tests for the Overlay component.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
packages/react/src/tests/snapshots/AnchoredOverlay.test.tsx.snap Updated snapshot reflecting removal of the old CSS modules styles
packages/react/src/Overlay/Overlay.tsx Removed the CSS modules feature flag and refactored the component to use BoxWithFallback
packages/react/src/Overlay/Overlay.test.tsx Marked two alignment tests as skipped
.changeset/modern-doodles-learn.md Updated changeset documenting the removal
Comments suppressed due to low confidence (2)

packages/react/src/Overlay/Overlay.test.tsx:205

  • Consider adding an inline comment explaining why this alignment test is skipped and under what conditions it should be re-enabled.
it.skip('should right align when given `right: 0` and `position: fixed`', async () => {

packages/react/src/Overlay/Overlay.test.tsx:235

  • Consider adding an inline comment that clarifies the rationale behind skipping this alignment test to improve maintainability and clarity for future developers.
it.skip('should left align when not given position and left props', async () => {

@jonrohan jonrohan enabled auto-merge April 28, 2025 22:17
@jonrohan jonrohan added this pull request to the merge queue Apr 29, 2025
Merged via the queue into main with commit 36f1007 Apr 29, 2025
49 checks passed
@jonrohan jonrohan deleted the css_modules_remove_flag/overlay branch April 29, 2025 15:22
@primer primer bot mentioned this pull request Apr 29, 2025
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 staff Author is a staff member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants