Skip to content
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

fix(Button): do not render main spinner if there is a count when loading #5605

Merged
merged 5 commits into from
Jan 29, 2025

Conversation

francinelucca
Copy link
Member

@francinelucca francinelucca commented Jan 27, 2025

Closes #5600

A button count loads its own spinner. Currently, the button is rendering two loading spinners when a count is introduced. This PR fixes the issue by not rendering the main spinner when there is a count.

Changelog

Changed

  • Add condition to not show main spinner in button when there is a count.

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

See https://primer-cc78cdd121-13348165.drafts.github.io/storybook/?path=/story/components-button--playground&args=loading:!true;count:10

Merge checklist

@francinelucca francinelucca added the component: Button Issues related to the Button component label Jan 27, 2025
@francinelucca francinelucca requested a review from a team as a code owner January 27, 2025 17:54
Copy link

changeset-bot bot commented Jan 27, 2025

🦋 Changeset detected

Latest commit: 7b88942

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 Jan 27, 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 added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Jan 27, 2025
Copy link
Contributor

@hectahertz hectahertz left a comment

Choose a reason for hiding this comment

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

Paired on it, approving

Copy link
Contributor

github-actions bot commented Jan 27, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 104.48 KB (-0.01% 🔽)
packages/react/dist/browser.umd.js 104.89 KB (+0.04% 🔺)

@github-actions github-actions bot temporarily deployed to storybook-preview-5605 January 27, 2025 17:57 Inactive
@github-actions github-actions bot added integration-tests: failing Changes in this PR 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 Jan 27, 2025
@github-actions github-actions bot temporarily deployed to storybook-preview-5605 January 27, 2025 23:56 Inactive
@primer-integration
Copy link

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

@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: failing Changes in this PR cause breaking changes in gh/gh labels Jan 29, 2025
@francinelucca francinelucca added this pull request to the merge queue Jan 29, 2025
Merged via the queue into main with commit d14c48c Jan 29, 2025
44 checks passed
@francinelucca francinelucca deleted the fix/double-loading-counter branch January 29, 2025 05:46
@primer primer bot mentioned this pull request Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Button Issues related to the Button component 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.

Button: Spinner displays twice when count property is set and loading is true
4 participants