-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
RFC: FloatingUI for LexicalMenu positioning #6923
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
size-limit report 📦
|
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.
I'm 1000% for getting rid of Lexical's menu code and replacing it with something that works correctly without a large maintenance burden, floating-ui seems like the ideal choice. I also like floating-ui because it's not React dependent so when we start offering framework agnostic plugins it could work for that as well.
Our menu situation is a disaster, I don't think it works correctly for anyone but Meta (maybe?), and there aren't enough regression tests for anyone outside of Meta to fix it because any attempt to do so seems to end up getting reverted for reasons that are opaque to anyone else.
To get rid of the popover menus positioning issues, floating-ui is the defacto standard for this problem, got it to work and works nicely. A few example to try:
Very long text now shows all the "/, @, :" menus correctly if the page is scrolled, also shows the menu correctly if typing on the last line in focus on the screen, it renders the menu upwards correctly. So this is technically the universal fix for 'popover' vs 'context menu'.
A few questions:
Clone and run locally to get a better idea of how it performs. Before I spend more time this, would like to gather some thoughts from the rest - @etrepum @zurfyx @fantactuka @potatowagon