Skip to content

fix(loader): incorect text size for loading text inside buttons#8035

Merged
mihai-albu-sage merged 2 commits into
masterfrom
FE-7701
Jul 8, 2026
Merged

fix(loader): incorect text size for loading text inside buttons#8035
mihai-albu-sage merged 2 commits into
masterfrom
FE-7701

Conversation

@mihai-albu-sage

@mihai-albu-sage mihai-albu-sage commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Proposed behaviour

This PR fixes the Loader text size when it's used inside Button components.

  • Created a new ButtonContext in order to be able to determine if the Loader is inside a button or not.
  • Updated the ring Loader behavior when used in buttons so it automatically uses the correct inline layout and sizing.
  • Updated the label styling to use the appropriate font token when the Loader is rendered inside a button.
  • Updated the stories and Skills documentation to use isInsideButton.

Current behaviour

When the loader is used inside a button the incorrect font size is used.

Checklist

  • Commits follow our style guide
  • Related issues linked in commit messages if required
  • Screenshots are included in the PR if useful
  • All themes are supported if required
  • Unit tests added or updated if required
  • Playwright automation tests added or updated if required
  • Storybook added or updated if required
  • Translations added or updated (including creating or amending translation keys table in storybook) if required
  • Typescript d.ts file added or updated if required
  • Related docs have been updated if required

QA

  • Tested in provided StackBlitz sandbox/Storybook
  • Add new Playwright test coverage if required
  • Carbon implementation matches Design System/designs
  • UI Tests GitHub check reviewed if required

Additional context

Testing instructions

/** Enable the error state for the ring loader when it is tracked */
isError?: boolean;
/** Specify if the loader is inside a button */
isInsideButton?: boolean;

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.

question: is this something we want to surface on the public API for the component?

Could we not instead create/use some sort of internal context which will set this to true internally without any consumer input

@nuria1110
nuria1110 marked this pull request as ready for review July 3, 2026 10:13
@nuria1110
nuria1110 requested review from a team as code owners July 3, 2026 10:13
@mihai-albu-sage
mihai-albu-sage merged commit 3645c45 into master Jul 8, 2026
29 checks passed
@mihai-albu-sage
mihai-albu-sage deleted the FE-7701 branch July 8, 2026 07:58
@carbonci

carbonci commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 161.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

5 participants