Skip to content

fix(react-tags): decouple useTagGroupBase_unstable from Tabster#36228

Merged
mainframev merged 2 commits into
masterfrom
feat/headless-tag-1-refactor
May 26, 2026
Merged

fix(react-tags): decouple useTagGroupBase_unstable from Tabster#36228
mainframev merged 2 commits into
masterfrom
feat/headless-tag-1-refactor

Conversation

@mainframev
Copy link
Copy Markdown
Contributor

@mainframev mainframev commented May 19, 2026

Stack

This PR is part of a 3-PR stack. Review and merge bottom-up:

  1. 👉 fix(react-tags): decouple useTagGroupBase_unstable from Tabster #36228 — feat(react-tags): decouple useTagGroupBase_unstable from Tabster + export contexts (base: master)merge first
  2. test(react-tags): add hook regression tests for Tag family #36229 — test(react-tags): add hook regression tests for Tag family (base: fix(react-tags): decouple useTagGroupBase_unstable from Tabster #36228) — depends on fix(react-tags): decouple useTagGroupBase_unstable from Tabster #36228
  3. feat(react-headless-components-preview): add Tag family #36230 — feat(react-headless-components-preview): add Tag family (base: test(react-tags): add hook regression tests for Tag family #36229) — merge last; depends on test(react-tags): add hook regression tests for Tag family #36229

Summary

  • Decouples useTagGroupBase_unstable from @fluentui/react-tabster and @fluentui/react-shared-contexts. Arrow-key navigation and post-dismiss focus restoration are now pluggable via a new optional UseTagGroupBaseOptions argument (arrowNavigationProps, onAfterTagDismiss), mirroring the useMenuTriggerBase_unstable pattern. The styled useTagGroup_unstable keeps full behaviour by supplying Tabster-backed implementations through that options bag.
  • Adds package-entry exports for the Tag contexts so headless consumers can produce context values readable by the canonical base hooks: TagGroupContextProvider / useTagGroupContext_unstable, InteractionTagContextProvider / useInteractionTagContext_unstable, and the TagGroupContextValue / InteractionTagContextValue types. Also re-exports the previously-missing TagContextValues type.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 19, 2026

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-components
react-components: entire library
1.293 MB
324.817 kB
1.293 MB
324.792 kB
-103 B
-25 B
react-tag-picker
@fluentui/react-tag-picker - package
173.435 kB
54.047 kB
173.332 kB
54.002 kB
-103 B
-45 B
react-tags
TagGroup
69.871 kB
21.442 kB
69.754 kB
21.41 kB
-117 B
-32 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-components
react-components: Button, FluentProvider & webLightTheme
66.328 kB
19.02 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
226.19 kB
67.909 kB
react-components
react-components: FluentProvider & webLightTheme
39.525 kB
13.113 kB
react-headless-components-preview
react-headless-components-preview: entire library
157.538 kB
44.675 kB
react-portal-compat
PortalCompatProvider
5.567 kB
2.237 kB
react-tags
InteractionTag
12.464 kB
4.95 kB
react-tags
Tag
28.389 kB
8.911 kB
react-timepicker-compat
TimePicker
104.049 kB
34.748 kB
🤖 This report was generated against 6cdfd5198fa185e7e229fd426805bcdbb35c3109

@github-actions
Copy link
Copy Markdown

Pull request demo site: URL

Comment thread change/@fluentui-react-tags-80527846-5fc6-4b8e-adcc-b758379cefb2.json Outdated
@mainframev mainframev force-pushed the feat/headless-tag-1-refactor branch from 99f8a77 to 24a9f85 Compare May 19, 2026 22:24
@mainframev mainframev marked this pull request as ready for review May 20, 2026 01:25
@mainframev mainframev requested review from a team and ValentinaKozlova as code owners May 20, 2026 01:25
@mainframev mainframev force-pushed the feat/headless-tag-1-refactor branch from 24a9f85 to 4af8734 Compare May 20, 2026 02:04
@tudorpopams tudorpopams requested a review from dmytrokirpa May 20, 2026 12:04
@mainframev mainframev force-pushed the feat/headless-tag-1-refactor branch from 4af8734 to 08cb5a5 Compare May 20, 2026 12:10
Copy link
Copy Markdown
Member

@layershifter layershifter left a comment

Choose a reason for hiding this comment

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

Let's avoid UseTagGroupBaseOptions & options param to keep our hooks consistent

Copy link
Copy Markdown
Contributor

@Hotell Hotell left a comment

Choose a reason for hiding this comment

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

left some comments - needs changes/justification if there is no other way. ty

Comment thread change/@fluentui-react-tags-80527846-5fc6-4b8e-adcc-b758379cefb2.json Outdated
@layershifter
Copy link
Copy Markdown
Member

@mainframev did you push the changes? I don't see any updates

@mainframev mainframev force-pushed the feat/headless-tag-1-refactor branch from 0ec6a47 to c1ca43d Compare May 26, 2026 09:21
Comment thread change/@fluentui-react-tags-80527846-5fc6-4b8e-adcc-b758379cefb2.json Outdated
@mainframev mainframev force-pushed the feat/headless-tag-1-refactor branch 3 times, most recently from e68087e to 0033314 Compare May 26, 2026 09:53
Copy link
Copy Markdown
Contributor

@Hotell Hotell left a comment

Choose a reason for hiding this comment

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

this PR introduces BREAKING CHANGE in v9, these changes need to be reverted

@mainframev mainframev force-pushed the feat/headless-tag-1-refactor branch 2 times, most recently from daad91e to 7facc74 Compare May 26, 2026 13:41
chore: update change file

chore: update change files
@mainframev mainframev force-pushed the feat/headless-tag-1-refactor branch from 7facc74 to 1e1391b Compare May 26, 2026 14:21
@mainframev mainframev merged commit c70f899 into master May 26, 2026
17 of 18 checks passed
@mainframev mainframev changed the title feat(react-tags): decouple useTagGroupBase_unstable from Tabster + export contexts fix(react-tags): decouple useTagGroupBase_unstable from Tabster + export contexts May 26, 2026
@mainframev mainframev changed the title fix(react-tags): decouple useTagGroupBase_unstable from Tabster + export contexts fix(react-tags): decouple useTagGroupBase_unstable from Tabster May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants