-
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] - RichText - Restore onSelectionChange when its focused #29074
Merged
Conversation
This file contains 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
geriux
added
the
Mobile App - i.e. Android or iOS
Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change)
label
Feb 17, 2021
Size Change: 0 B Total Size: 1.38 MB ℹ️ View Unchanged
|
antonis
approved these changes
Feb 17, 2021
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.
Nice work tracking this down @geriux 👍
Tested on an iPhone SE 2020 (iOS 14.2) and on a Pixel 2 XL (Android 11) and the fix works as expected 🎉
antonis
pushed a commit
that referenced
this pull request
Feb 17, 2021
3 tasks
dcalhoun
added a commit
that referenced
this pull request
Feb 19, 2021
* Release script: Update react-native-editor version to 1.47.0 * Release script: Update with changes from 'npm run core preios' * [RNMobile] Ignore column width attribute when empty (#29015) * Ignore empty width attribute in columns The editor was crashing when attempting to render a column block which contained an empty width attribute (i.e `<!-- wp:column {"width":""} -->`. The exception occurred when accessing a property of an undefined object, so adding a default object (`|| {}`) fixes this by allowing the property to be accessed. * Update react-native-editor changelog * Add missing dependency to useSelect in columns block Co-authored-by: Carlos Garcia <[email protected]> * Update editor changelog * Mobile - RichText - Restore onSelectionChange when its focused (#29074) * Adds null check before function call * [RNMobile] Merge 1.46.1 beta fix release to 1.47.0 (#29044) * Release script: Update react-native-editor version to 1.46.1 * Release script: Update with changes from 'npm run core preios' * Update react-native-editor CHANGELOG * [RNMobile] Add capability to bridge to show/hide audio block (#28952) * [RNMobile] Ignore column width attribute when empty (#29015) * Update react-native-editor CHANGELOG * Fixes minor changelog alignement issue * Add Stories bridge methods for iOS (#29083) Add missing bridge methods for the Stories block. The absence of these threw an error, even though Stories block isn't fully supported for iOS just yet. Co-authored-by: Ceyhun Ozugur <[email protected]> Co-authored-by: Paul Von Schrottky <[email protected]> Co-authored-by: Antonis Lilis <[email protected]> Co-authored-by: David Calhoun <[email protected]> Co-authored-by: Paul Von Schrottky <[email protected]> Co-authored-by: Carlos Garcia <[email protected]> Co-authored-by: David Calhoun <[email protected]> Co-authored-by: Gerardo Pacheco <[email protected]> Co-authored-by: Ceyhun Ozugur <[email protected]>
fluiddot
added a commit
that referenced
this pull request
Mar 10, 2021
* Release script: Update react-native-editor version to 1.47.0 * Release script: Update with changes from 'npm run core preios' * [RNMobile] Ignore column width attribute when empty (#29015) * Ignore empty width attribute in columns The editor was crashing when attempting to render a column block which contained an empty width attribute (i.e `<!-- wp:column {"width":""} -->`. The exception occurred when accessing a property of an undefined object, so adding a default object (`|| {}`) fixes this by allowing the property to be accessed. * Update react-native-editor changelog * Add missing dependency to useSelect in columns block Co-authored-by: Carlos Garcia <[email protected]> * Update editor changelog * Mobile - RichText - Restore onSelectionChange when its focused (#29074) * Adds null check before function call * [RNMobile] Merge 1.46.1 beta fix release to 1.47.0 (#29044) * Release script: Update react-native-editor version to 1.46.1 * Release script: Update with changes from 'npm run core preios' * Update react-native-editor CHANGELOG * [RNMobile] Add capability to bridge to show/hide audio block (#28952) * [RNMobile] Ignore column width attribute when empty (#29015) * Update react-native-editor CHANGELOG * Fixes minor changelog alignement issue * Add Stories bridge methods for iOS (#29083) Add missing bridge methods for the Stories block. The absence of these threw an error, even though Stories block isn't fully supported for iOS just yet. Co-authored-by: Ceyhun Ozugur <[email protected]> Co-authored-by: Paul Von Schrottky <[email protected]> Co-authored-by: Antonis Lilis <[email protected]> Co-authored-by: David Calhoun <[email protected]> * Release script: Update react-native-editor version to 1.47.1 * Release script: Update with changes from 'npm run core preios' * Change the maximum items per page of reusable block fetch Co-authored-by: Antonis Lilis <[email protected]> Co-authored-by: Paul Von Schrottky <[email protected]> Co-authored-by: David Calhoun <[email protected]> Co-authored-by: Gerardo Pacheco <[email protected]> Co-authored-by: Ceyhun Ozugur <[email protected]>
fluiddot
added a commit
that referenced
this pull request
Mar 12, 2021
* Release script: Update react-native-editor version to 1.47.0 * Release script: Update with changes from 'npm run core preios' * [RNMobile] Ignore column width attribute when empty (#29015) * Ignore empty width attribute in columns The editor was crashing when attempting to render a column block which contained an empty width attribute (i.e `<!-- wp:column {"width":""} -->`. The exception occurred when accessing a property of an undefined object, so adding a default object (`|| {}`) fixes this by allowing the property to be accessed. * Update react-native-editor changelog * Add missing dependency to useSelect in columns block Co-authored-by: Carlos Garcia <[email protected]> * Update editor changelog * Mobile - RichText - Restore onSelectionChange when its focused (#29074) * Adds null check before function call * [RNMobile] Merge 1.46.1 beta fix release to 1.47.0 (#29044) * Release script: Update react-native-editor version to 1.46.1 * Release script: Update with changes from 'npm run core preios' * Update react-native-editor CHANGELOG * [RNMobile] Add capability to bridge to show/hide audio block (#28952) * [RNMobile] Ignore column width attribute when empty (#29015) * Update react-native-editor CHANGELOG * Fixes minor changelog alignement issue * Add Stories bridge methods for iOS (#29083) Add missing bridge methods for the Stories block. The absence of these threw an error, even though Stories block isn't fully supported for iOS just yet. Co-authored-by: Ceyhun Ozugur <[email protected]> Co-authored-by: Paul Von Schrottky <[email protected]> Co-authored-by: Antonis Lilis <[email protected]> Co-authored-by: David Calhoun <[email protected]> * Release script: Update react-native-editor version to 1.48.0 * Release script: Update with changes from 'npm run core preios' * [Mobile] - Fix splitting/merging of Paragraph and Heading (#29502) * Wip: Mobile RichText - Updating old value after splitting * Mobile - Fix splitting/merging issues and keyboard jumpiness on Android * Mobile - RichText - Add isIOS check for componentDidUpdate and use blockEditorStore * Mobile - RichText - Prevent onTextUpdate on Android * Update changelog * Changelog - fix typo * Revert "[Mobile] - Fix splitting/merging of Paragraph and Heading (#29502)" This reverts commit a14915f. * Revert "Rich text: keep block ID on split (#28505)" This reverts commit 4b9d13f. * Release script: Update react-native-editor version to 1.47.1 * Release script: Update with changes from 'npm run core preios' * Change the maximum items per page of reusable block fetch * Release script: Update react-native-editor version to 1.48.1 * Release script: Update with changes from 'npm run core preios' * Change the maximum items per page of reusable block fetch * Add replace block content by clientID * Add item to release notes about `replaceBlock` method * Revert "Revert "Rich text: keep block ID on split (#28505)"" This reverts commit 956cdfc. Co-authored-by: Antonis Lilis <[email protected]> Co-authored-by: Paul Von Schrottky <[email protected]> Co-authored-by: David Calhoun <[email protected]> Co-authored-by: Gerardo Pacheco <[email protected]> Co-authored-by: Ceyhun Ozugur <[email protected]> Co-authored-by: Enej Bajgoric <[email protected]> Co-authored-by: Brandon Titus <[email protected]>
This was referenced Mar 15, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Mobile App - i.e. Android or iOS
Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change)
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.
Description
While running some tests on the ongoing
1.47.0
mobile editor release some regressions were found when splitting/merging paragraph blocks:This is a regression from the [RNMobile] Performance improvements PR, so this is a quick fix bringing back the code that was removed, I'll open a separate issue to continue the effort on optimizing some extra renders this piece of code is generating.
How has this been tested?
Issue 1 - Splitting, merging, and splitting a text block on iOS results in two blocks with incorrect content
Expect: Two blocks are present. The first containing the text before the cursor place meant. The second placing the text after the cursor placement.
Issue 2 - Unable to merge multiple blocks on Android via backspace/delete key
Expect: The multiple blocks are merged into one block.
Screenshots
Issue 1 - Splitting, merging, and splitting a text block on iOS results in two blocks with incorrect content
Issue 2 - Unable to merge multiple blocks on Android via backspace/delete key
Types of changes
Bug fix
Checklist: