-
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
[Rnmobile] Fix the list handling on Android #15168
Conversation
And assume that when that flag is false, component changes need to get sent/reflected down to Aztec.
The iOS side still expects to just check against `this.lastContent` to force the change into Aztec.
This reverts commit e22ffde.
Aztec-Android doesn't swallow the Enter key (like the list handling does) so, instruct Aztec to delete it for the paragraph block.
Doing this by reverting onFormatChange's behavior back to assuming doUpdateChild is false by default.
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.
We've had a chat convo about the possibility to get rid of the newly introduced deleteEnter
prop, but agreed it's the best solution at the moment.
We will probably need to revise the code once again, when will introduce multi-line paragraph blocks (we will need to handle the enter.key detection again).
Will merge this PR now and will cherry-pick the merge-commit into our special branch ( |
* If text already changed, don't modify it * Able to not lose content * Use a flag to signal Aztec-originated changes And assume that when that flag is false, component changes need to get sent/reflected down to Aztec. * Differentiate Android and iOS since assumptions diverged The iOS side still expects to just check against `this.lastContent` to force the change into Aztec. * Force Aztec update if "Enter" fired before text change * Need to specify firedAfterTextChanged on all Aztec events * Fix lint issues * chore: Fix: Lint error that makes unit tests (and CI tests) fail. (#15073) * Trivial change to trigger Travis * Revert "Trivial change to trigger Travis" This reverts commit e22ffde. * Just use onFormatChange which now defaults to "force" * Have Aztec delete the detected Enter key for paragraphs Aztec-Android doesn't swallow the Enter key (like the list handling does) so, instruct Aztec to delete it for the paragraph block. * Don't force Aztec update on format button toggles Doing this by reverting onFormatChange's behavior back to assuming doUpdateChild is false by default.
Description
Introduces changes to how the the React Native mobile app's RichText handles the events coming from the native side, especially for Android.
How has this been tested?
Using the gutenberg-mobile PR: wordpress-mobile/gutenberg-mobile#928
Types of changes
onFormatChange()
to update Aztec. Can (and is) overridden by using thefiredAfterTextChanged
flag to avoid updating Aztec if the change has already happened in Aztec.deleteEnter
on the paragraph block's RichText component to denote that we want Aztec to delete theEnter
key at the end of the block, otherwise Aztec-Android leaves it there. We don't need to specify it for the list block though because Aztec removes theEnter
there as part of its list handling process.Checklist: