-
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 Android-only issue related to block toolbar not being displayed on some blocks in UBE #51131
Conversation
We experienced on Android that the `editor` variable might be already defined in some cases when loading UBE's behavior overrides.
Size Change: 0 B Total Size: 1.39 MB ℹ️ View Unchanged
|
Flaky tests detected in dbe19a0. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5132564200
|
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.
LGTM! Nice work catching this bug and fixing it! I tested it on both iOS an Android and it works as expected, I tried different sites. 🚀
…displayed on some blocks in UBE (#51131) * Query editor element only in the function is needed We experienced on Android that the `editor` variable might be already defined in some cases when loading UBE's behavior overrides. * Update `react-native-editor` changelog
* Release script: Update react-native-editor version to 1.96.0 * Release script: Update with changes from 'npm run core preios' * Update CHANGELOG for 1.96.0 * Release script: Update react-native-editor version to 1.96.1 * Release script: Update with changes from 'npm run core preios' * [RNMobile] Fix Android-only issue related to block toolbar not being displayed on some blocks in UBE (#51131) * Query editor element only in the function is needed We experienced on Android that the `editor` variable might be already defined in some cases when loading UBE's behavior overrides. * Update `react-native-editor` changelog * Update Changelog * Update Podfile.lock --------- Co-authored-by: Derek Blank <[email protected]> Co-authored-by: Carlos Garcia <[email protected]>
* Release script: Update react-native-editor version to 1.96.0 * Release script: Update with changes from 'npm run core preios' * Update CHANGELOG for 1.96.0 * Release script: Update react-native-editor version to 1.96.1 * Release script: Update with changes from 'npm run core preios' * [RNMobile] Fix Android-only issue related to block toolbar not being displayed on some blocks in UBE (WordPress#51131) * Query editor element only in the function is needed We experienced on Android that the `editor` variable might be already defined in some cases when loading UBE's behavior overrides. * Update `react-native-editor` changelog * Update Changelog * Update Podfile.lock --------- Co-authored-by: Derek Blank <[email protected]> Co-authored-by: Carlos Garcia <[email protected]>
…displayed on some blocks in UBE (WordPress#51131) * Query editor element only in the function is needed We experienced on Android that the `editor` variable might be already defined in some cases when loading UBE's behavior overrides. * Update `react-native-editor` changelog
* Release script: Update react-native-editor version to 1.96.0 * Release script: Update with changes from 'npm run core preios' * Update CHANGELOG for 1.96.0 * Release script: Update react-native-editor version to 1.96.1 * Release script: Update with changes from 'npm run core preios' * [RNMobile] Fix Android-only issue related to block toolbar not being displayed on some blocks in UBE (WordPress#51131) * Query editor element only in the function is needed We experienced on Android that the `editor` variable might be already defined in some cases when loading UBE's behavior overrides. * Update `react-native-editor` changelog * Update Changelog * Update Podfile.lock --------- Co-authored-by: Derek Blank <[email protected]> Co-authored-by: Carlos Garcia <[email protected]>
What?
We identified that on the native unsupported blocks Archive, Calendar, Rating, Slideshow, when editing them via UBE (Unsupported Block Editor), the toolbar is not displayed when selecting the block. This issue can only be reproduced in the Android app.
Why?
Not being able to use the block toolbar for some blocks impacts negatively the experience when using UBE.
How?
The cause of the issue was that the
editor
variable could be already defined in some cases:gutenberg/packages/react-native-bridge/common/gutenberg-web-single-block/editor-behavior-overrides.js
Line 80 in a450434
To solve this, we now query the editor element within the function where is needed, which is called when selecting/unselecting the block.
Testing Instructions
Testing Instructions for Keyboard
N/A
Screenshots or screencast