Skip to content

Conversation

@hectahertz
Copy link
Contributor

@hectahertz hectahertz commented Jul 28, 2025

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

Changelog

This pull request introduces a new useEffect hook in the SelectPanel component to manage loading announcements when loading is managed via props.

The change also ensures a smooth user experience by delaying announcements for quick-loading scenarios.

New

Added logic to handle announcements when the loading prop changes

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 AI review requested due to automatic review settings July 28, 2025 17:29
@hectahertz hectahertz requested a review from a team as a code owner July 28, 2025 17:29
@hectahertz hectahertz requested a review from pksjce July 28, 2025 17:29
@changeset-bot
Copy link

changeset-bot bot commented Jul 28, 2025

🦋 Changeset detected

Latest commit: 56779a3

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 integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Jul 28, 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!

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 adds accessibility improvements to the SelectPanel component by implementing loading state announcements when loading is managed externally via props. The change ensures screen reader users are informed when content is loading, with a delay mechanism to avoid unnecessary announcements for quick operations.

  • Adds a new useEffect hook to handle loading announcements when loadingManagedExternally is true
  • Implements delayed announcement logic to prevent announcing loading for quick operations
  • Provides proper cleanup of loading announcements when loading completes

@github-actions
Copy link
Contributor

github-actions bot commented Jul 28, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 92.36 KB (+0.06% 🔺)
packages/react/dist/browser.umd.js 92.47 KB (0%)

@hectahertz hectahertz enabled auto-merge July 29, 2025 17:40
@hectahertz hectahertz added this pull request to the merge queue Jul 29, 2025
Merged via the queue into main with commit c6bda10 Jul 29, 2025
43 checks passed
@hectahertz hectahertz deleted the hectahertz/selectpanel-announce-external-loading branch July 29, 2025 17:53
@primer primer bot mentioned this pull request Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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