Skip to content

Conversation

@francinelucca
Copy link
Member

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

Changelog

Changed

  • Refactored AutocompleteOverlay to merge className prop with default style class
  • Re-enabled and updated the Autocomplete.Overlay className test by mocking the context and using AutocompleteContext.Provider to ensure the overlay menu is shown

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

changeset-bot bot commented Dec 23, 2025

🦋 Changeset detected

Latest commit: 4f74127

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

👋 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. Or, apply the integration-tests: skipped manually label to skip these checks.

@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 Dec 23, 2025
@github-actions github-actions bot temporarily deployed to storybook-preview-7364 December 23, 2025 17:13 Inactive
Prevent user-defined className from overriding default styles in Autocomplete.Overlay.
@github-actions github-actions bot requested a deployment to storybook-preview-7364 December 23, 2025 17:41 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-7364 December 23, 2025 17:56 Inactive
@primer-integration
Copy link

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

@primer-integration
Copy link

🔬 github-ui Integration Test Results

Check Status Details
CI ✅ Passed View run
Projects (Memex) ✅ Passed View run
VRT ✅ Passed View run

All checks passed! Your integration PR is ready for review.

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 PR fixes a bug where user-defined className props were overriding default styles in the Autocomplete.Overlay component instead of being merged with them. The fix uses the clsx utility to properly merge CSS classes, ensuring both default and custom classes are applied.

Key changes:

  • Refactored AutocompleteOverlay to merge the user-provided className prop with the default classes.Overlay class using clsx
  • Re-enabled and updated the previously skipped Autocomplete.Overlay className test with proper context mocking

Reviewed changes

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

File Description
packages/react/src/Autocomplete/AutocompleteOverlay.tsx Added clsx import and updated className handling to merge default and custom classes
packages/react/src/Autocomplete/Autocomplete.test.tsx Re-enabled className test with complete AutocompleteContext mock to ensure overlay is properly rendered
.changeset/dry-carrots-bathe.md Added changeset documenting the patch-level fix

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

Labels

do not merge 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.

2 participants