Skip to content

fix(react-headless-components-preview): emit data-disabled on ImageSwatch - #36979

Merged
Victor Genaev (mainframev) merged 1 commit into
microsoft:masterfrom
mainframev:fix/headless-image-swatch-data-disabled
Oct 22, 2026
Merged

Victor Genaev (mainframev) merged 1 commit into
microsoft:masterfrom
mainframev:fix/headless-image-swatch-data-disabled

Conversation

@mainframev

@mainframev Victor Genaev (mainframev) commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Previous Behavior

ImageSwatch set only data-selected (and focusgroupstart) on its root. A disabled image swatch had no data-disabled, unlike ColorSwatch and EmptySwatch, so styling layers had to fall back to :disabled or add the attribute themselves.

New Behavior

useImageSwatch sets data-disabled from the disabled prop (present when true, absent otherwise), matching ColorSwatch. ImageSwatchState and the API report include the new root attribute. A unit test covers the disabled and enabled cases

…atch

ColorSwatch and EmptySwatch expose data-disabled for styling, but
ImageSwatch only set data-selected, so consumers had to fall back to
:disabled or add the attribute themselves.
@github-actions

Copy link
Copy Markdown

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-headless-components-preview
react-headless-components-preview: entire library
228.392 kB
67.579 kB
228.43 kB
67.584 kB
38 B
5 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-headless-components-preview
@fluentui/react-headless-components-preview/tag-picker
50.254 kB
16.375 kB
react-headless-components-preview
@fluentui/react-headless-components-preview/teaching-popover
33.766 kB
11.09 kB
🤖 This report was generated against d4078cf1924e0e60634b8781a668d7c5455c01ea

@github-actions

Copy link
Copy Markdown

Pull request demo site: URL

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.

Looks good!

@mainframev
Victor Genaev (mainframev) merged commit e7c9873 into microsoft:master Oct 22, 2026
13 checks passed
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