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
Conversation
…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
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.
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 headlessMessageBarActionsrendered medium where the@fluentui/react-componentsequivalent 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.tsalready uses — plus the matching barrel and subpath entries, and regenerates the affectedetc/*.api.mdreports. 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.