Skip to content

feat(react-swatch-picker): expose headless base APIs - #36534

Open
Dmytro Kirpa (dmytrokirpa) wants to merge 2 commits into
test/react-swatch-picker-hooksfrom
feat/swatch-picker-headless-base
Open

feat(react-swatch-picker): expose headless base APIs#36534
Dmytro Kirpa (dmytrokirpa) wants to merge 2 commits into
test/react-swatch-picker-hooksfrom
feat/swatch-picker-headless-base

Conversation

@dmytrokirpa

@dmytrokirpa Dmytro Kirpa (dmytrokirpa) commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Motivation

Extract reusable unstyled state from the SwatchPicker family so headless consumers can compose the existing interaction and accessibility behavior without Fluent styling concerns.

Changes

  • add base props and state types for the SwatchPicker component family
  • split public hooks into base state and styled composition layers
  • update render functions and exports to consume base state
  • preserve existing focus, context, selection, and ImageSwatch precedence behavior
  • update API output and add a package change file

Review guidance

Review this PR relative to test/react-swatch-picker-hooks. The tests in #36533 establish the behavior preserved by the extraction.

Validation

  • yarn nx run-many -t test type-check lint -p react-swatch-picker --nxBail

PR stack

  1. test(react-swatch-picker): add hook state coverage #36533
  2. This PR: expose reusable SwatchPicker base APIs
  3. feat(react-headless-components-preview): add swatch picker controls #36535

Depends on #36533 and should be merged second.

Copilot AI left a comment

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Note

This error may be related to your runner configuration. You can now configure runners for Copilot code review separately from Copilot cloud agent by creating a copilot-code-review.yml file with your setup steps. Read the docs for details.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants