Skip to content

Conversation

@zeroedin
Copy link
Contributor

@zeroedin zeroedin commented Sep 22, 2025

What I did

This PR is an attempt to static the implementation of @floating-ui/dom, so we no longer have to update that dependency or serve it downstream. This implementation will eventually be replaced entirely with browser APIs in anchor positioning.

  1. Removed @floating-ui/dom dependency by way of AI copying its functionality into our own repo.
  2. Recreated a 1:1 rework of that code into our pfe-core/core/functions.
  3. Updated FloatingDomController to import from the new location.
  4. inline the code from functions into fdc, to reduce waterfall, and further reduce and simplify code (much of the flexibility of the original library is simply unnecessary for us)

TODO

  • add changeset

Testing Instructions

  1. View demos of components that use @floating-ui/dom
  2. Run a build, and copy artifacts and check downstream in RHDS

Notes to Reviewers

The copied API was completed with the assistance of Claude AI. Please give extra scrutiny to this code.

@changeset-bot
Copy link

changeset-bot bot commented Sep 22, 2025

🦋 Changeset detected

Latest commit: 788a567

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@patternfly/pfe-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@zeroedin zeroedin changed the title Fix/remove floating UI dep fix(core): remove floating UI dep Sep 22, 2025
@zeroedin zeroedin changed the title fix(core): remove floating UI dep fix(core): remove @floatingui/dom dependency Sep 22, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Sep 22, 2025

✅ Commitlint tests passed!

More Info
{
  "valid": true,
  "errors": [],
  "warnings": [],
  "input": "perf(core): remove `@floating-ui/dom` dependency"
}

@netlify
Copy link

netlify bot commented Sep 22, 2025

Deploy Preview for patternfly-elements ready!

Name Link
🔨 Latest commit e416ca2
😎 Deploy Preview https://deploy-preview-2945--patternfly-elements.netlify.app/

To edit notification comments on pull requests, go to your Netlify site settings.

@zeroedin zeroedin changed the title fix(core): remove @floatingui/dom dependency fix(core): remove @floating-ui/dom dependency Sep 22, 2025
@github-actions github-actions bot added the AT passed Automated testing has passed label Sep 22, 2025
@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

SSR Test Run for 3f8d8e8: Report

@bennypowers bennypowers changed the title fix(core): remove @floating-ui/dom dependency perf(core): remove @floating-ui/dom dependency Oct 22, 2025
@github-actions
Copy link
Contributor

SSR Test Run for 5a622ee: Report

@github-actions
Copy link
Contributor

SSR Test Run for e416ca2: Report

Copy link
Contributor

@markcaron markcaron left a comment

Choose a reason for hiding this comment

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

PFE / Upstream part LGTM

@bennypowers
Copy link
Member

@adamjohnson merge and release this when you're satisfied it doesn't break rhds plznthx

Copy link
Collaborator

@adamjohnson adamjohnson left a comment

Choose a reason for hiding this comment

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

Tested PFE tooltip, popover, and dropdown, ✅
Ran a build, copied over and tested audio player and tooltip ✅

Library Gone, Trust Maintained

@adamjohnson
Copy link
Collaborator

We can merge and release in Office Hours (or before if @bennypowers you're feeling it).

@zeroedin zeroedin merged commit d8a314f into main Oct 29, 2025
20 checks passed
@zeroedin zeroedin deleted the fix/remove-floating-ui-dep branch October 29, 2025 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AT passed Automated testing has passed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants