Skip to content

fix(react-headless-components-preview): publish context readers from the avatar-group, button, link and avatar subpaths - #36670

Open
Ray Knight (ArrayKnight) wants to merge 1 commit into
microsoft:masterfrom
ArrayKnight:fix/headless-subpath-context-readers-36652
Open

fix(react-headless-components-preview): publish context readers from the avatar-group, button, link and avatar subpaths#36670
Ray Knight (ArrayKnight) wants to merge 1 commit into
microsoft:masterfrom
ArrayKnight:fix/headless-subpath-context-readers-36652

Conversation

@ArrayKnight

@ArrayKnight Ray Knight (ArrayKnight) commented Aug 31, 2026

Copy link
Copy Markdown

Several headless subpaths publish a context's values hook and its types but not the reader — so a consumer composing their own parts cannot read what the subpath's own render functions already provide. For Button/Link/Avatar the provider side was already correct: the headless renderers are verbatim re-exports of Griffel's and already wrap subtrees in Griffel's ButtonContextProvider / LinkContextProvider / AvatarContextProvider. Because those are Griffel's own context instances, a locally-declared context can never receive the values — a re-export is the only fix available to a consumer. One measured symptom: a composed Button inside a headless MessageBarActions rendered medium where the @fluentui/react-components equivalent renders small, because the size the provider was already publishing was unreachable.

This adds dedicated context re-export modules for AvatarGroup (reader + provider), Button, Link and Avatar — the shape Toolbar/useToolbar.ts already uses — plus the matching barrel and subpath entries, and regenerates the affected etc/*.api.md reports. Additive only; nothing that exists today changes meaning.

The issue also inventories three further sites with the same gap (TagGroup, InteractionTag, Accordion) that are not part of this PR, so the audit trail stays in one place.

Fixes #36652.

Extracted from #36656 per maintainer request — each in-tree fix from that PR as an isolated change.

…the avatar-group, button, link and avatar subpaths

Several headless subpaths publish a context's values hook and types but
not its reader, so a consumer composing their own parts cannot read what
the subpath's own render functions already provide. The providers in the
tree are Griffel's own context instances (the headless renderers are
verbatim re-exports), so a locally-declared context can never receive
the values — a re-export is the only fix available to a consumer.

Adds dedicated context re-export modules for AvatarGroup, Button, Link
and Avatar (mirroring the shape Toolbar/useToolbar.ts already uses),
plus the matching barrel and subpath entries, and regenerates the
affected etc/*.api.md reports. Additive only.

Extracted from windmod branch commits 5a89364 and 9612d54
(headless hunks only).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Aj9uA3rCVgosnh2zNn8qkc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

1 participant