Skip to content

[SelectPanel] Announce loading prop changes - #6404

Merged
hectahertz merged 2 commits into
mainfrom
hectahertz/selectpanel-announce-external-loading
Jul 29, 2025
Merged

[SelectPanel] Announce loading prop changes#6404
hectahertz merged 2 commits into
mainfrom
hectahertz/selectpanel-announce-external-loading

Conversation

@hectahertz

@hectahertzhectahertz commented Jul 28, 2025

Copy link
Copy Markdown
Contributor

Closeshttps://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

CopilotAI review requested due to automatic review settings July 28, 2025 17:29
@hectahertz
hectahertz requested a review from a team as a code ownerJuly 28, 2025 17:29
@hectahertz
hectahertz requested a review from pksjceJuly 28, 2025 17:29
@changeset-bot

changeset-botBot commented Jul 28, 2025

Copy link
Copy Markdown

🦋 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
NameType
@primer/reactPatch

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-actionsgithub-actionsBot 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
Copy Markdown
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!

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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

Comment threadpackages/react/src/SelectPanel/SelectPanel.tsx
Comment threadpackages/react/src/SelectPanel/SelectPanel.tsx
@github-actions

github-actionsBot commented Jul 28, 2025

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
packages/react/dist/browser.esm.js92.36 KB (+0.06% 🔺)
packages/react/dist/browser.umd.js92.47 KB (0%)

@hectahertz
hectahertz enabled auto-merge July 29, 2025 17:40
@hectahertz
hectahertz added this pull request to the merge queueJul 29, 2025
@github-actions
github-actionsBottemporarily deployed to storybook-preview-6404 July 29, 2025 17:49 Inactive
Merged via the queue into main with commit c6bda10Jul 29, 2025
43 checks passed
@hectahertz
hectahertz deleted the hectahertz/selectpanel-announce-external-loading branch July 29, 2025 17:53
@primerprimerBot mentioned this pull request Jul 29, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: recommendedThis 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

@hectahertz@francinelucca