Skip to content

fix: remove floating-ui from headless components bundle#36344

Open
mainframev wants to merge 1 commit into
microsoft:masterfrom
mainframev:fix/headless-positioning-floating-ui-leak
Open

fix: remove floating-ui from headless components bundle#36344
mainframev wants to merge 1 commit into
microsoft:masterfrom
mainframev:fix/headless-positioning-floating-ui-leak

Conversation

@mainframev

@mainframev mainframev commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

@fluentui/react-headless-components-preview positions via native CSS anchor positioning and should not bundle @floating-ui/dom. It still pulled it in transitively through a single runtime import of resolvePositioningShorthand from @fluentui/react-positioning, whose barrel eagerly loads usePositioning@floating-ui/dom.

@mainframev mainframev requested a review from a team as a code owner June 24, 2026 07:36
@mainframev mainframev self-assigned this Jun 24, 2026
@github-actions

Copy link
Copy Markdown

Pull request demo site: URL

@mainframev mainframev force-pushed the fix/headless-positioning-floating-ui-leak branch from fdb5b2c to 7e8a4a8 Compare June 24, 2026 08:10
@github-actions

Copy link
Copy Markdown

📊 Bundle size report

✅ No changes found

@tudorpopams tudorpopams requested a review from dmytrokirpa June 24, 2026 12:07

@dmytrokirpa dmytrokirpa 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.

Let's hold off on this PR for now, since it doesn't seem to affect bundle size -#36344 (comment)

The PR changes don't seem to change much - @floating-ui will still be in node_modules since we still import types from react-positioning, but the fact that @floating-ui shouldn't end up in the headless or its consumers bundle. If that's the case, I'd like a repro so we can properly investigate the potential issue

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