-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove tippy.js and replace with Floating UI #5398
Conversation
🦋 Changeset detectedLatest commit: bd8956f The changes in this PR will be included in the next version bump. This PR includes changesets to release 54 packages
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 |
✅ Deploy Preview for tiptap-embed ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great!
… in Vue suggestion.js
… in React suggestion.js
138de0c
to
bd8956f
Compare
* start experimenting with floating-ui * add options to floating-ui bubble menu plugin & fix smaller issues * add vue support for new floating-ui * start experimenting with floating-ui * adjust floating-menu plugin for floating-ui & update react component * add vue support for floating-menu with floating-ui * update tests for new floating-ui integration * added changeset file * move floating-ui dependency to peerDeps * add install notice to changelog * remove unnecessary code for destroying and removing component element in Vue suggestion.js * remove unnecessary code for destroying and removing component element in React suggestion.js * sync package-lock * widen range for peerDeps again
Changes Overview
This PR completely removes tippy.js from all Tiptap packages and replaces the implementation with Floating UI.
Tippy was already outdated and often caused rendering issues for example with React or conditional rendering. The new implement Floating UI implementation now can be conditionally rendered, customized and adjusted.
Implementation Approach
Instead of letting Tippy handle the element creation and mounting, we now do this on our own and use Floating UI to compute the position of the floating element using virtual elements.
The positions are calculated from the cursor or selection position.
Instead of
tippyOptions
we now pass down anoption
object which can be used to control the Floating UI middlewares likeshift
,flip
oroffset
.Testing Done
I updated all tests that were previously using tippy and made sure all run successfully.
Verification Steps
Additional Notes
Breaking change incoming. 😬
Checklist
Related Issues