Skip to content

feat(react-tags): add base hooks for Tags components#35912

Draft
dmytrokirpa wants to merge 1 commit intomicrosoft:masterfrom
dmytrokirpa:feat/react-tags-base-hooks
Draft

feat(react-tags): add base hooks for Tags components#35912
dmytrokirpa wants to merge 1 commit intomicrosoft:masterfrom
dmytrokirpa:feat/react-tags-base-hooks

Conversation

@dmytrokirpa
Copy link
Copy Markdown
Contributor

Summary

  • Adds useTagBase_unstable / TagBaseProps / TagBaseState for Tag
  • Adds useTagGroupBase_unstable / TagGroupBaseProps / TagGroupBaseState for TagGroup
  • Adds useInteractionTagBase_unstable / InteractionTagBaseProps / InteractionTagBaseState for InteractionTag
  • Adds useInteractionTagPrimaryBase_unstable / InteractionTagPrimaryBaseProps / InteractionTagPrimaryBaseState for InteractionTagPrimary
  • Adds useInteractionTagSecondaryBase_unstable / InteractionTagSecondaryBaseProps / InteractionTagSecondaryBaseState for InteractionTagSecondary
  • All design props (appearance, size, shape, avatarShape, avatarSize) are omitted from base hooks
  • Behavioral/structural props (disabled, dismissible, selected, role, ARIA, keyboard handling) are retained
  • All existing hooks refactored to compose from their base counterpart
  • All new hooks and types exported from @fluentui/react-tags

Test plan

  • Build passes: yarn nx build react-tags
  • Lint passes: yarn nx lint react-tags
  • All 104 tests pass: yarn nx test react-tags

🤖 Generated with Claude Code

…nteractionTagPrimary, InteractionTagSecondary

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-components
react-components: entire library
1.297 MB
324.029 kB
1.297 MB
324.121 kB
359 B
92 B
react-tag-picker
@fluentui/react-tag-picker - package
186.596 kB
55.849 kB
186.636 kB
55.858 kB
40 B
9 B
react-tags
InteractionTag
13.666 kB
5.459 kB
13.724 kB
5.47 kB
58 B
11 B
react-tags
Tag
29.521 kB
9.389 kB
29.663 kB
9.411 kB
142 B
22 B
react-tags
TagGroup
82.211 kB
24.143 kB
82.247 kB
24.152 kB
36 B
9 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-components
react-components: Button, FluentProvider & webLightTheme
70.397 kB
19.96 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
236.65 kB
68.725 kB
react-components
react-components: FluentProvider & webLightTheme
43.612 kB
14.022 kB
react-portal-compat
PortalCompatProvider
8.386 kB
2.624 kB
react-timepicker-compat
TimePicker
108.174 kB
35.695 kB
🤖 This report was generated against 11e50945f4ee9ff2d73dfcf53c4eef4a7debd7b9

@github-actions
Copy link
Copy Markdown

Pull request demo site: URL

@@ -0,0 +1,7 @@
{
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵🏾‍♀️ visual changes to review in the Visual Change Report

vr-tests-react-components/Menu Converged - submenuIndicator slotted content 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Menu Converged - submenuIndicator slotted content.default - RTL.submenus open.chromium.png 404 Changed
vr-tests-react-components/Menu Converged - submenuIndicator slotted content.default.submenus open.chromium.png 413 Changed
vr-tests-react-components/Positioning 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Positioning.Positioning end.chromium.png 760 Changed
vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png 161 Changed
vr-tests-react-components/TagPicker 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/TagPicker.disabled.disabled input hover.chromium.png 677 Changed
vr-tests-react-components/TagPicker.disabled - RTL.disabled input hover.chromium.png 635 Changed

There were 2 duplicate changes discarded. Check the build logs for more information.

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.

1 participant