Conversation
Merged
2 tasks
|
Size Change: +1.17 kB (0%) Total Size: 1.47 MB
ℹ️ View Unchanged
|
fluiddot
commented
Apr 21, 2021
| sprintf( | ||
| /* translators: %s: name of the reusable block */ | ||
| __( '%s converted to regular blocks' ), | ||
| reusableBlock?.title?.raw || blockTitle |
Contributor
Author
There was a problem hiding this comment.
If the reusable block's title is not defined it will fallback to "Reusable block".
Contributor
Author
fluiddot
commented
Apr 21, 2021
Comment on lines
+375
to
+378
| clearSelectedBlock(); | ||
| // Convert action is executed at the end of the current JavaScript execution block | ||
| // to prevent issues related to undo/redo actions. | ||
| setImmediate( () => |
Contributor
Author
There was a problem hiding this comment.
I tested these changes in a test branch (rnmobile/try/reusable-block-feature) where it also includes the changes of Update Reusable block to use the inner block PR and I spotted that on Android the following flow wasn't working:
- Convert a reusable block to regular blocks
- Undo the changes
- Convert again the same reusable block to regular blocks
- The conversion is not being done ❌
For this reason, I decided to add the following changes to fix it:
- Unselect the block to prevent potential issues when the reusable block is replaced by the regular blocks.
- Execute the convert action at the end of the current JS execution block by using
setImmediate. I tried to investigate the root cause of this issue but I didn't manage to find it. As far as I checked after the convert action is executed, calling the selectorgetBlockwith the reusable block's client id always returnsnull🤷♂️ .
geriux
approved these changes
Apr 22, 2021
Member
geriux
left a comment
There was a problem hiding this comment.
LGTM! Followed the test cases on both iOS and Android.
Contributor
Author
This was referenced Apr 30, 2021
This was referenced May 14, 2021
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


gutenberg-mobilePR: wordpress-mobile/gutenberg-mobile#3397Description
An action for converting a reusable block to regular blocks has been added in the block actions menu.
NOTE: Reusable block is only available in development mode.
How has this been tested?
Undo/redo
It's important that we verify that the undo/redo actions work as expected when converting to regular blocks.
Screenshots
reusable-block-convert-regular-blocks.mp4
Types of changes
Checklist:
*.native.jsfiles for terms that need renaming or removal).