Skip to content

chore(TooltipV2): Remove the CSS modules feature flag from the TooltipV2 component #5872

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 25 commits into from
Apr 25, 2025

Conversation

jonrohan
Copy link
Member

@jonrohan jonrohan commented Apr 3, 2025

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

Changelog

New

Changed

Removed

Remove the CSS modules feature flag from the TooltipV2 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

Testing & Reviewing

Merge checklist

Copy link

changeset-bot bot commented Apr 3, 2025

🦋 Changeset detected

Latest commit: 142297d

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 3, 2025
Copy link
Contributor

github-actions bot commented Apr 3, 2025

👋 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 3, 2025
Copy link
Contributor

github-actions bot commented Apr 3, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 101.31 KB (-0.32% 🔽)
packages/react/dist/browser.umd.js 101.75 KB (-0.3% 🔽)

@github-actions github-actions bot temporarily deployed to storybook-preview-5872 April 3, 2025 19:43 Inactive
@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 3, 2025
jonrohan and others added 20 commits April 10, 2025 03:18
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Hector Garcia <[email protected]>
Co-authored-by: Josh Black <[email protected]>
Co-authored-by: Marie Lucca <[email protected]>
Co-authored-by: Marie Lucca <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
#5886)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marie Lucca <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marie Lucca <[email protected]>
@github-actions github-actions bot requested a deployment to storybook-preview-5872 April 10, 2025 03:27 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-5872 April 10, 2025 03:41 Inactive
@primer-integration
Copy link

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

@primer-integration
Copy link

🟢 golden-jobs completed with status success.

@jonrohan jonrohan marked this pull request as ready for review April 24, 2025 21:12
@Copilot Copilot AI review requested due to automatic review settings April 24, 2025 21:12
@jonrohan jonrohan requested a review from a team as a code owner April 24, 2025 21:12
@jonrohan jonrohan requested a review from francinelucca April 24, 2025 21:12
@jonrohan jonrohan enabled auto-merge April 24, 2025 21:12
@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 24, 2025
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 TooltipV2 component, streamlining the tooltip styling logic. Key changes include:

  • Removal of styled-components-based logic and the feature flag.
  • Replacement of the StyledTooltip with a new BaseComponent using toggleSxComponent.
  • Update of className usage to always include the Tooltip CSS module.

Reviewed Changes

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

File Description
packages/react/src/TooltipV2/Tooltip.tsx Removed CSS modules feature flag imports and conditional styling; replaced with BaseComponent
.changeset/petite-women-notice.md Added changeset notice for removing the CSS modules feature flag from TooltipV2
Files not reviewed (1)
  • packages/react/src/tests/snapshots/TextInput.test.tsx.snap: Language not supported
Comments suppressed due to low confidence (2)

packages/react/src/TooltipV2/Tooltip.tsx:84

  • [nitpick] Consider renaming 'BaseComponent' to a more descriptive name (e.g. 'TooltipContainer') to clearly indicate its role in the TooltipV2 component.
const BaseComponent = toggleSxComponent('span') as React.ComponentType< SxProp & React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLSpanElement> >

packages/react/src/TooltipV2/Tooltip.tsx:291

  • Ensure that the removal of the conditional CSS modules feature flag and the direct application of the Tooltip CSS class are fully covered by tests to prevent styling regressions across browsers.
<BaseComponent className={clsx(className, classes.Tooltip)} ref={tooltipElRef} data-direction={calculatedDirection} {...rest}>

Copy link
Member

@francinelucca francinelucca left a comment

Choose a reason for hiding this comment

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

@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 25, 2025
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!

@jonrohan jonrohan added this pull request to the merge queue Apr 25, 2025
Merged via the queue into main with commit 2b98c2c Apr 25, 2025
45 checks passed
@jonrohan jonrohan deleted the remove_css_modules_flag_tooltip branch April 25, 2025 02:38
@primer primer bot mentioned this pull request Apr 25, 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 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.

7 participants