Skip to content

Conversation

pksjce
Copy link
Contributor

@pksjce pksjce commented Sep 3, 2025

Closes #https://github.com/github/primer/issues/5729

The original issue was a complaint that popover does not have customisable width and that they were replacing it with an AnchoredOverlay. In #6303, I fixed this and also premptively added support for height and overflow. However, overflow:hidden default property makes the caret disappear. Fixing this here by removing overflow property altogether. If a need for this property arises in the future, we can look into how to safely add it. Probably by changing the implementation of the caret visual.

Changelog

New

Changed

Removed

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

@Copilot Copilot AI review requested due to automatic review settings September 3, 2025 03:29
@pksjce pksjce requested a review from a team as a code owner September 3, 2025 03:29
@pksjce pksjce requested a review from TylerJDev September 3, 2025 03:29
Copy link

changeset-bot bot commented Sep 3, 2025

🦋 Changeset detected

Latest commit: 0394474

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

This PR includes changesets to release 2 packages
Name Type
@primer/react Minor
@primer/styled-react Major

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

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 overflow property from the Popover component to fix an issue where the default overflow:hidden was causing the popover's caret to disappear.

  • Removes the overflow prop from PopoverContentProps interface and its default value
  • Removes overflow-related CSS styles and data attributes from the component implementation
  • Updates Storybook stories to remove overflow controls and usage

Reviewed Changes

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

File Description
packages/react/src/Popover/Popover.tsx Removes overflow prop from PopoverContentProps interface and removes overflow handling in PopoverContent component
packages/react/src/Popover/Popover.stories.tsx Updates Playground story to remove overflow prop usage and removes overflow controls from argTypes
packages/react/src/Popover/Popover.module.css Removes default overflow:hidden style and all overflow-related CSS rules

Copy link
Contributor

github-actions bot commented Sep 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 Sep 3, 2025
Copy link
Contributor

github-actions bot commented Sep 3, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 88.61 KB (-0.03% 🔽)
packages/react/dist/browser.umd.js 88.67 KB (-0.07% 🔽)

@github-actions github-actions bot requested a deployment to storybook-preview-6709 September 3, 2025 03:33 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-6709 September 3, 2025 03:42 Inactive
@pksjce pksjce added the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Sep 3, 2025
@primer primer bot requested a review from a team as a code owner September 3, 2025 04:53
@primer primer bot requested a review from mperrotti September 3, 2025 04:53
@github-actions github-actions bot removed the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Sep 3, 2025
@github-actions github-actions bot temporarily deployed to storybook-preview-6709 September 3, 2025 05:03 Inactive
@pksjce pksjce added the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Sep 4, 2025
@github-actions github-actions bot temporarily deployed to storybook-preview-6709 September 4, 2025 04:04 Inactive
@@ -45,6 +45,9 @@ const stories = [
disableAnimations: true,
async setup(page: Page) {
await page.keyboard.press('Tab') // focus on icon button
await page.getByText('Bold').waitFor({
state: 'visible',
})
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is just a fix for the flakiness I experienced.

@pksjce pksjce marked this pull request as ready for review September 5, 2025 13:59
@github-actions github-actions bot requested a deployment to storybook-preview-6709 September 5, 2025 14:03 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-6709 September 5, 2025 14:11 Inactive
Copy link
Contributor

@langermank langermank left a comment

Choose a reason for hiding this comment

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

@pksjce not sure if you've accounted for this but since the caret was broken, we had to suggest teams use the overflow prop to get around it: https://primer-query.githubapp.com/?query=popover+attribute%3Aoverflow

I wonder if we should just change the default prop to visible, and then remove the prop in a separate PR as a major breaking change?

@pksjce
Copy link
Contributor Author

pksjce commented Sep 8, 2025

I see that this affects two uages. I can have a github-ui PR ready to go when this change is released. Does that work?
IMO, making overflow:visible for all popovers could have other side-effects?
cc- @joshblack (current RC), @llastflowers (next RC)
Would you be able to accomodate this?

@pksjce
Copy link
Contributor Author

pksjce commented Sep 9, 2025

Fixes for release(path-to-green)- Will update in release tracking PR after merge https://github.com/github/github-ui/pull/2049/commits/9194c3449bfb80a3977e7814edcedeeedc40d05b

@github-actions github-actions bot temporarily deployed to storybook-preview-6709 September 9, 2025 05:17 Inactive
@pksjce pksjce requested a review from langermank September 9, 2025 12:11
@pksjce pksjce added the integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh label Sep 9, 2025
Copy link
Contributor

github-actions bot commented Sep 9, 2025

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

Copy link
Member

@siddharthkp siddharthkp left a comment

Choose a reason for hiding this comment

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

Left a couple comments to confirm if the visual changes are intentional

Approving in advance

Copy link
Member

Choose a reason for hiding this comment

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

Caret is back, but it seems like the background color has changed? Is that intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did notice this and checked that its the same color that primitive offers. I refreshed my node modules and ran the tests on local and there's no change to the snapshots. The primitives changed the color three months back. Do you think the snapshots were just never updated since it doesn't register color change as an error?

Copy link
Member

@siddharthkp siddharthkp Sep 10, 2025

Choose a reason for hiding this comment

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

that's strange!

Do you think the snapshots were just never updated since it doesn't register color change as an error?

possible, don't think i haven't seen that before 🤔 maybe others have? worth asking

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe @langermank knows?

Copy link
Contributor

Choose a reason for hiding this comment

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

This happens sometimes. When the change is really minimal it just doesn't always pick it up.

Copy link
Member

Choose a reason for hiding this comment

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

I can't see what has changed here? 😅 Do you know? (safe to ignore?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think its a flaky test. I tried to make it robust. I think its safe to ignore

@pksjce pksjce enabled auto-merge September 10, 2025 23:13
@pksjce pksjce disabled auto-merge September 11, 2025 22:03
@pksjce pksjce added this pull request to the merge queue Sep 11, 2025
Merged via the queue into main with commit 78784b3 Sep 11, 2025
43 of 44 checks passed
@pksjce pksjce deleted the pk/popover-overflow-regression branch September 11, 2025 22:11
@primer primer bot mentioned this pull request Sep 11, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants