-
Notifications
You must be signed in to change notification settings - Fork 4.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
RichText 🧹 (clean up, move Autocomplete, remove DOM dependency) #16905
Conversation
1f16b2f
to
34cdf95
Compare
34cdf95
to
a412bb3
Compare
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 PR still needs to be rebased after some changes applied to master
.
I tested a few blocks including Paragraph, Galler and List toghether with the autocompletion and everything works as expected.
I'm not fully skilled to process all changes around new onKeyDown
implementation in the rich-text/src/component/index.js
so you might want to ask someone else to focus on that part.
a412bb3
to
5c6d75c
Compare
5c6d75c
to
9e4562a
Compare
I'm not sure who else would be more skilled. I merely moved some code around and sorted it by activeFormats.length ||
( isReverse && start !== 0 ) ||
( ! isReverse && end !== text.length ) so that we use the internal rich text value instead of the DOM to determine when to merge/delete. It's the same thing. Since we're at the start of a release cycle, I'll merge this now, so we can continue work on top of this, and there is enough time to catch problems if any appear. |
* RichText 🧹 * Clean up * Clean up * Simplify * Move Autocomplete * children => Editable wrapper component * Bind Editable wrapper to class * Minimise diff
* RichText 🧹 * Clean up * Clean up * Simplify * Move Autocomplete * children => Editable wrapper component * Bind Editable wrapper to class * Minimise diff
I renamed this branch because @frontdevde had problems pulling Gutenberg because of the emoji in the branch name.
Description
This PR mostly moves code around.
Autocomplete
to theRichText
wrapper with block context.multiline
prop to amultilineTag
.onKeyDown
in multiple functions.How has this been tested?
E2e tests should pass.
Screenshots
Types of changes
Checklist: