Skip to content

docs(docsite-v9): clarify brand-background demo in ColorAndAppearance story - #36570

Open
Martin Hochel (Hotell) with Copilot wants to merge 2 commits into
masterfrom
copilot/bugfixbadge-visual-distinction
Open

docs(docsite-v9): clarify brand-background demo in ColorAndAppearance story#36570
Martin Hochel (Hotell) with Copilot wants to merge 2 commits into
masterfrom
copilot/bugfixbadge-visual-distinction

Conversation

Copilot AI commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

The ColorAndAppearance story wraps subtle badges in a brand-colored <div> when appearance is ghost or outline, since those combinations are only intended for branded surfaces. The wrapper was a thin padded sliver with no explanation, so it read as a rendering artifact rather than deliberate demo context — particularly alongside the overflow behavior reported in #36556.

Changes

  • Labelled the brand surface — each boxed example now renders an "On brand background:" caption using colorNeutralForegroundOnBrand and base typography tokens.
  • Made the container read as a cardborderRadiusMedium, spacingVerticalS/spacingHorizontalM padding, centered alignment and a gap between label and badge.
  • Dropped the inline BadgeWrapper component — it was re-created on every render (remounting its subtree each time); replaced with a direct conditional branch plus a comment explaining why the branch exists.
  • Expanded the docs description to state that the boxed examples show the intended usage context.
if (color === 'subtle' && isSubtleOnBrandOnly) {
  return (
    <div key={`${appearance}-${color}`} className={styles.brand}>
      <span className={styles.brandLabel}>On brand background:</span>
      <Badge appearance={appearance} color={color} icon={<PasteIcon />}>
        999+
      </Badge>
    </div>
  );
}

Scope

Story-only. This does not address the missing fui-Badge class on ghost-subtle/outline-subtle badges from #36556 — that lives in the Badge styles hook and needs a separate fix. No change file: @fluentui/react-badge-stories is private and beachball check reports none needed.

…e story

Co-authored-by: Hotell <1223799+Hotell@users.noreply.github.com>
Copilot AI changed the title [WIP] Update badge story to improve visual distinction of brand wrapper docs(react-badge): clarify brand-background demo in ColorAndAppearance story Aug 13, 2026
@Hotell

Copy link
Copy Markdown
Contributor

the new page demo
image

@Hotell
Martin Hochel (Hotell) marked this pull request as ready for review August 14, 2026 08:07
@Hotell
Martin Hochel (Hotell) enabled auto-merge (squash) August 14, 2026 08:07
@Hotell Martin Hochel (Hotell) changed the title docs(react-badge): clarify brand-background demo in ColorAndAppearance story docs(docsite-v9): clarify brand-background demo in ColorAndAppearance story Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants