Skip to content

fix(SelectPanel): prioritize message over loading status #6321

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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

francinelucca
Copy link
Member

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

Fixes bug where the selectpanel is empty from the beginning and the loading status is displayed instead of the empty message.

Changelog

Changed

  • renders message if exists instead of loading status

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 July 14, 2025 14:53
@francinelucca francinelucca requested a review from a team as a code owner July 14, 2025 14:53
@francinelucca francinelucca requested a review from jonrohan July 14, 2025 14:53
Copy link

changeset-bot bot commented Jul 14, 2025

🦋 Changeset detected

Latest commit: c935294

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

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 fixes a bug in SelectPanel where the loading status was being displayed instead of the empty message when the panel starts empty. The change prioritizes showing messages over loading indicators by reordering the conditional logic.

  • Reorders conditional checks in getBodyContent() to prioritize message display over loading status
  • Ensures that when both a message and loading state exist, the message takes precedence

@github-actions github-actions bot added staff Author is a staff member integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Jul 14, 2025
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!

@github-actions github-actions bot requested a deployment to storybook-preview-6321 July 14, 2025 14:57 Abandoned
Copy link
Contributor

github-actions bot commented Jul 14, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 91.96 KB (+0.07% 🔺)
packages/react/dist/browser.umd.js 92.21 KB (-0.03% 🔽)

…pty-list-message-when-there-are-no-action-items
@primer primer bot requested a review from a team as a code owner July 15, 2025 14:24
@primer primer bot requested a review from mperrotti July 15, 2025 14:24
@github-actions github-actions bot temporarily deployed to storybook-preview-6321 July 15, 2025 14:34 Inactive
…pty-list-message-when-there-are-no-action-items
…pty-list-message-when-there-are-no-action-items
@github-actions github-actions bot requested a deployment to storybook-preview-6321 July 16, 2025 03:25 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-6321 July 16, 2025 03:34 Inactive
…nel-is-not-rendering-the-empty-list-message-when-there-are-no-action-items
…ssage-when-there-are-no-action-items' of github.com:primer/react into 5402-bug-selectpanel-is-not-rendering-the-empty-list-message-when-there-are-no-action-items
@primer-integration
Copy link

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

@primer-integration
Copy link

🟢 golden-jobs completed with status success.

@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: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Jul 17, 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 staff Author is a staff member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants