-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[Mobile] List V2 - Fixes split issues #43949
[Mobile] List V2 - Fixes split issues #43949
Conversation
Size Change: +88 B (0%) Total Size: 1.27 MB
ℹ️ View Unchanged
|
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.
@geriux, I see that the E2E tests are consistently failing with the following error:
Error: /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/__snapshots__/Group-can-be-created-using-the-slash-inserter-1-chromium.txt is missing in snapshots.
I see that that file was merged in #42801, two days before #42780 was merged. Do you think cherry picking that commit may resolve the errors?
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.
Works perfectly for me in testing on Android and iOS, thank you @geriux! 🙇♀️
The code also makes sense to me and didn't leave me with any questions. The only thing, mentioned here, is that the E2E tests are failing consistently. I think this might be resolved by cherry picking #42801?
Approving as I don't want to hold anything up and I don't see any other blockers. :)
Nice catch! I've cherry-picked that change, it runs now locally so let's wait for CI 🤞
Thank you so much for reviewing and testing! 🙇 |
There's another failing E2E related to #42947 I'm just gonna merge this so we can continue with the beta fix. |
Fixes #43873
What?
This PR fixes some split issues like trying to split a List (V2) in the middle or merging a Paragraph block and a List Item block.
Why?
To have the same functionality as the web editor and the previous version of the List.
How?
It adds a native variant of the
useEnter
hook modified for native, on the web editor it uses listeners for theonKeyPress
where it also can stop other events to trigger in some specific scenarios so we couldn't have the same functionality on native.So on native we are now passing an
onEnter
prop to theRichText
component where we can handle the customonSplit
functionality for the List block.It also cherry-picks #42780 as it is needed to be able to merge for example a Paragraph block with a List Item block.
Testing Instructions
Return
key twice.Backspace
key.Screenshots or screencast
iOSBefore.mov
iOSAfter.mov
AndroidBefore.mov
AndroidAfter.mov