feat(react-headless-components-preview): export data attribute utility - #36596
Merged
Dmytro Kirpa (dmytrokirpa) merged 1 commit intoAug 19, 2026
Conversation
Expose toDataAttributeValue through the /utils subpath and use the renamed helper throughout headless components.
Dmytro Kirpa (dmytrokirpa)
marked this pull request as ready for review
August 19, 2026 08:10
Dmytro Kirpa (dmytrokirpa)
enabled auto-merge (squash)
August 19, 2026 08:10
Copilot started reviewing on behalf of
Dmytro Kirpa (dmytrokirpa)
August 19, 2026 08:11
View session
📊 Bundle size report🤖 This report was generated against 42f76ebac7435ab290cb3281ad065e939e51e1ee |
Contributor
There was a problem hiding this comment.
Pull request overview
Exports toDataAttributeValue as a public headless-components utility and migrates existing consumers from the previous internal name.
Changes:
- Renames and documents the utility, including string boolean handling and tests.
- Adds the
/utilspackage entry point and generated API report. - Updates consumers and adds a Beachball change file.
Reviewed changes
Copilot reviewed 75 out of 75 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
packages/react-components/react-headless-components-preview/library/src/utils/toDataAttributeValue.ts |
Implements and documents the renamed utility. |
packages/react-components/react-headless-components-preview/library/src/utils/toDataAttributeValue.test.ts |
Tests supported value conversions. |
packages/react-components/react-headless-components-preview/library/src/utils/stringifyDataAttribute.ts |
Removes the superseded utility. |
packages/react-components/react-headless-components-preview/library/src/utils/stringifyDataAttribute.test.ts |
Removes superseded tests. |
packages/react-components/react-headless-components-preview/library/src/utils/index.ts |
Updates the internal utility export. |
packages/react-components/react-headless-components-preview/library/src/utils.ts |
Adds the public utility entry point. |
packages/react-components/react-headless-components-preview/library/src/components/Tooltip/useTooltip.ts |
Migrates tooltip state conversion. |
packages/react-components/react-headless-components-preview/library/src/components/Toolbar/useToolbar.ts |
Migrates toolbar state conversion. |
packages/react-components/react-headless-components-preview/library/src/components/Toolbar/ToolbarToggleButton/useToolbarToggleButton.ts |
Migrates toggle-button attributes. |
packages/react-components/react-headless-components-preview/library/src/components/Toolbar/ToolbarRadioButton/useToolbarRadioButton.ts |
Migrates radio-button attributes. |
packages/react-components/react-headless-components-preview/library/src/components/Toolbar/ToolbarGroup/useToolbarGroup.ts |
Migrates group orientation conversion. |
packages/react-components/react-headless-components-preview/library/src/components/Toolbar/ToolbarDivider/useToolbarDivider.ts |
Migrates divider orientation conversion. |
packages/react-components/react-headless-components-preview/library/src/components/Toolbar/ToolbarButton/useToolbarButton.ts |
Migrates toolbar-button attributes. |
packages/react-components/react-headless-components-preview/library/src/components/ToggleButton/useToggleButton.ts |
Migrates toggle-button attributes. |
packages/react-components/react-headless-components-preview/library/src/components/Textarea/useTextarea.ts |
Migrates disabled and invalid attributes. |
packages/react-components/react-headless-components-preview/library/src/components/TeachingPopover/TeachingPopoverCarouselNavButton/useTeachingPopoverCarouselNavButton.ts |
Migrates selected-state conversion. |
packages/react-components/react-headless-components-preview/library/src/components/TagPicker/TagPickerInput/useTagPickerInput.ts |
Migrates disabled conversion and focuses utility imports. |
packages/react-components/react-headless-components-preview/library/src/components/TagPicker/TagPickerGroup/useTagPickerGroup.ts |
Migrates disabled conversion and focuses utility imports. |
packages/react-components/react-headless-components-preview/library/src/components/TagPicker/TagPickerControl/useTagPickerControl.ts |
Migrates control state attributes. |
packages/react-components/react-headless-components-preview/library/src/components/TagPicker/TagPickerButton/useTagPickerButton.ts |
Migrates disabled conversion. |
packages/react-components/react-headless-components-preview/library/src/components/TagGroup/useTagGroup.ts |
Migrates tag-group attributes. |
packages/react-components/react-headless-components-preview/library/src/components/Tag/useTag.ts |
Migrates tag state attributes. |
packages/react-components/react-headless-components-preview/library/src/components/TabList/Tab/useTab.ts |
Migrates tab state attributes. |
packages/react-components/react-headless-components-preview/library/src/components/Switch/useSwitch.ts |
Migrates switch state attributes. |
packages/react-components/react-headless-components-preview/library/src/components/SwatchPicker/ImageSwatch/useImageSwatch.ts |
Migrates selected conversion. |
packages/react-components/react-headless-components-preview/library/src/components/SwatchPicker/EmptySwatch/useEmptySwatch.ts |
Migrates swatch state attributes. |
packages/react-components/react-headless-components-preview/library/src/components/SwatchPicker/ColorSwatch/useColorSwatch.ts |
Migrates swatch state attributes. |
packages/react-components/react-headless-components-preview/library/src/components/SpinButton/useSpinButton.ts |
Migrates disabled and ARIA-invalid conversion. |
packages/react-components/react-headless-components-preview/library/src/components/Slider/useSlider.ts |
Migrates slider state attributes. |
packages/react-components/react-headless-components-preview/library/src/components/Select/useSelect.ts |
Migrates disabled and ARIA-invalid conversion. |
packages/react-components/react-headless-components-preview/library/src/components/SearchBox/useSearchBox.ts |
Migrates search-box attributes. |
packages/react-components/react-headless-components-preview/library/src/components/RadioGroup/Radio/useRadio.ts |
Migrates disabled conversion. |
packages/react-components/react-headless-components-preview/library/src/components/ProgressBar/useProgressBar.ts |
Migrates indeterminate conversion. |
packages/react-components/react-headless-components-preview/library/src/components/Popover/PopoverTrigger/usePopoverTrigger.ts |
Migrates trigger open-state conversion. |
packages/react-components/react-headless-components-preview/library/src/components/Popover/PopoverSurface/usePopoverSurface.ts |
Migrates surface open-state conversion. |
packages/react-components/react-headless-components-preview/library/src/components/Nav/NavSubItem/useNavSubItem.ts |
Migrates selected conversion. |
packages/react-components/react-headless-components-preview/library/src/components/Nav/NavItem/useNavItem.ts |
Migrates selected conversion. |
packages/react-components/react-headless-components-preview/library/src/components/Nav/NavCategoryItem/useNavCategoryItem.ts |
Migrates navigation state attributes. |
packages/react-components/react-headless-components-preview/library/src/components/MessageBar/useMessageBar.ts |
Migrates intent conversion. |
packages/react-components/react-headless-components-preview/library/src/components/MessageBar/MessageBarActions/useMessageBarActions.ts |
Migrates action-state conversion. |
packages/react-components/react-headless-components-preview/library/src/components/MenuButton/useMenuButton.ts |
Migrates menu-button attributes. |
packages/react-components/react-headless-components-preview/library/src/components/Menu/MenuTrigger/useMenuTrigger.ts |
Migrates trigger open-state conversion. |
packages/react-components/react-headless-components-preview/library/src/components/Menu/MenuItemSwitch/useMenuItemSwitch.ts |
Migrates switch-item attributes. |
packages/react-components/react-headless-components-preview/library/src/components/Menu/MenuItemRadio/useMenuItemRadio.ts |
Migrates radio-item attributes. |
packages/react-components/react-headless-components-preview/library/src/components/Menu/MenuItemLink/useMenuItemLink.ts |
Migrates disabled conversion. |
packages/react-components/react-headless-components-preview/library/src/components/Menu/MenuItemCheckbox/useMenuItemCheckbox.ts |
Migrates checkbox-item attributes. |
packages/react-components/react-headless-components-preview/library/src/components/Menu/MenuItem/useMenuItem.ts |
Migrates menu-item attributes. |
packages/react-components/react-headless-components-preview/library/src/components/Link/useLink.ts |
Migrates link state attributes. |
packages/react-components/react-headless-components-preview/library/src/components/Label/useLabel.ts |
Migrates label state attributes. |
packages/react-components/react-headless-components-preview/library/src/components/InteractionTag/useInteractionTag.ts |
Migrates interaction-tag attributes. |
packages/react-components/react-headless-components-preview/library/src/components/InteractionTag/InteractionTagSecondary/useInteractionTagSecondary.ts |
Migrates secondary-tag attributes. |
packages/react-components/react-headless-components-preview/library/src/components/InteractionTag/InteractionTagPrimary/useInteractionTagPrimary.ts |
Migrates primary-tag attributes. |
packages/react-components/react-headless-components-preview/library/src/components/Input/useInput.ts |
Migrates disabled and ARIA-invalid conversion. |
packages/react-components/react-headless-components-preview/library/src/components/InfoLabel/InfoButton/useInfoButton.tsx |
Migrates popover open-state conversion. |
packages/react-components/react-headless-components-preview/library/src/components/Dropdown/useDropdown.ts |
Migrates dropdown state attributes. |
packages/react-components/react-headless-components-preview/library/src/components/Dropdown/Option/useOption.ts |
Migrates option state attributes. |
packages/react-components/react-headless-components-preview/library/src/components/Drawer/OverlayDrawer/useOverlayDrawer.ts |
Migrates overlay open-state conversion. |
packages/react-components/react-headless-components-preview/library/src/components/Drawer/InlineDrawer/useInlineDrawer.ts |
Migrates inline open-state conversion. |
packages/react-components/react-headless-components-preview/library/src/components/Drawer/DrawerHeader/useDrawerHeader.ts |
Migrates scroll-state conversion. |
packages/react-components/react-headless-components-preview/library/src/components/Drawer/DrawerFooter/useDrawerFooter.ts |
Migrates scroll-state conversion. |
packages/react-components/react-headless-components-preview/library/src/components/Dialog/DialogSurface/useDialogSurface.ts |
Migrates dialog open-state conversion. |
packages/react-components/react-headless-components-preview/library/src/components/CompoundButton/useCompoundButton.ts |
Migrates compound-button attributes. |
packages/react-components/react-headless-components-preview/library/src/components/Combobox/useCombobox.ts |
Migrates combobox state attributes. |
packages/react-components/react-headless-components-preview/library/src/components/ColorPicker/AlphaSlider/useAlphaSlider.ts |
Migrates transparency conversion. |
packages/react-components/react-headless-components-preview/library/src/components/Checkbox/useCheckbox.ts |
Migrates checkbox state attributes. |
packages/react-components/react-headless-components-preview/library/src/components/Card/useCard.ts |
Migrates card state attributes. |
packages/react-components/react-headless-components-preview/library/src/components/Button/useButton.ts |
Migrates button state attributes. |
packages/react-components/react-headless-components-preview/library/src/components/Breadcrumb/BreadcrumbButton/useBreadcrumbButton.ts |
Migrates current-state conversion. |
packages/react-components/react-headless-components-preview/library/src/components/Accordion/useAccordion.ts |
Migrates accordion state attributes. |
packages/react-components/react-headless-components-preview/library/src/components/Accordion/AccordionPanel/useAccordionPanel.ts |
Migrates panel open-state conversion. |
packages/react-components/react-headless-components-preview/library/src/components/Accordion/AccordionItem/useAccordionItem.ts |
Migrates item state attributes. |
packages/react-components/react-headless-components-preview/library/src/components/Accordion/AccordionHeader/useAccordionHeader.ts |
Migrates header state attributes. |
packages/react-components/react-headless-components-preview/library/package.json |
Publishes the /utils entry point. |
packages/react-components/react-headless-components-preview/library/etc/utils.api.md |
Records the generated public API. |
change/@fluentui-react-headless-components-preview-2a6fb260-36cb-47d2-8495-c719a4952a0d.json |
Adds the package change record. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Pull request demo site: URL |
Victor Genaev (mainframev)
approved these changes
Aug 19, 2026
Dmytro Kirpa (dmytrokirpa)
merged commit Aug 19, 2026
370b262
into
microsoft:master
13 checks passed
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.


Summary
stringifyDataAttributetotoDataAttributeValueand improve its public JSDoc@fluentui/react-headless-components-preview/utilsValidation
yarn nx run react-headless-components-preview:test --testPathPatterns=toDataAttributeValue.test.tsyarn nx run react-headless-components-preview:generate-apiyarn nx run react-headless-components-preview:build