feat(ResourceHeader): ✨ Add loading prop to primary/secondary actions#3698
Merged
martin-garciablanco merged 1 commit intomainfrom Mar 20, 2026
Merged
Conversation
Contributor
✅ No New Circular DependenciesNo new circular dependencies detected. Current count: 0 |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a loading flag to ResourceHeader primary/secondary button actions so consumers can manually display a spinner (in addition to existing async-onClick handling on F0Button).
Changes:
- Extend
PrimaryActionButton(and thusSecondaryAction) with an optionalloading?: boolean. - Pass
loadingthrough toF0Buttoninstances inBaseHeader(mobile + desktop layouts). - Update ResourceHeader docs and Storybook story to demonstrate the loading state.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/react/src/experimental/Information/utils.tsx | Adds loading?: boolean to PrimaryActionButton (affects primary + secondary button actions). |
| packages/react/src/experimental/Information/Headers/BaseHeader/index.tsx | Wires action.loading / primaryAction.loading into rendered F0Buttons. |
| packages/react/src/experimental/Information/Headers/index.mdx | Documents loading handling for primary actions. |
| packages/react/src/experimental/Information/Headers/ResourceHeader/index.stories.tsx | Adds a secondary action example in loading state. |
| - Primary actions vary by context (e.g., "Add members") | ||
| - Most visually prominent in the header | ||
| - Can include icons when they aid recognition or match design patterns | ||
| - Handle loading status by passing an async callback or using the `loading` prop |
Contributor
📦 Alpha Package Version PublishedUse Use |
Contributor
🔍 Visual review for your branch is published 🔍Here are the links to: |
Contributor
Coverage Report for packages/react
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||
6703b83 to
5293785
Compare
sauldom102
approved these changes
Mar 20, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add loading prop to PrimaryAction and SecondaryAction to manually handle when the button shows the spinner
Screenshots