RFC: FloatingUI for LexicalMenu positioning#6923
Closed
ivailop7 wants to merge 4 commits intofacebook:mainfrom
Closed
RFC: FloatingUI for LexicalMenu positioning#6923ivailop7 wants to merge 4 commits intofacebook:mainfrom
ivailop7 wants to merge 4 commits intofacebook:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
size-limit report 📦
|
etrepum
reviewed
Dec 9, 2024
Collaborator
etrepum
left a comment
There was a problem hiding this comment.
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.
This was referenced Dec 9, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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