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] Fixes unsupported block crash #34499
Conversation
Size Change: 0 B Total Size: 1.04 MB ℹ️ View Unchanged
|
The "Static Analysis (Linting, License, Type checks...)" CI check is giving the following error:
Looks like we would need to re-incorporate the |
It looks like the native mobile app is rendering a block icon without wrapping it in the The logic is covered here in the native code:
Given that 3rd party blocks can pass a Dashicon string as an icon, it must be handled correctly in other places so it's probably the Missing block that needs to be investigated. |
Thank you for the prompt feedback @gziolo 🙇 |
It might be around this code: gutenberg/packages/block-library/src/missing/edit.native.js Lines 278 to 282 in e2e3f6b
I hope it's the only place 😅 |
fed5dd3
to
88eaeaf
Compare
I cannot directly approve this PR but I confirm that @geriux's approach(88eaeaf) is better and resolves the crash 👍 |
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.
Approved via #34499 (comment)
Thank you for the quick fix. I completely missed the fact that some of those block icons can be handled differently. On the bright side, at least now they have consistent way to render them 😅 |
Description
Gutenberg Mobile PR
-> wordpress-mobile/gutenberg-mobile#3910This PR fixes a bug introduced with #34350 causing the mobile application to crash when an unsupported block is tapped.
The issue was happening in the Floating Toolbar, it was using the
Icon
component and now uses theBlockIcon
wrapper.Some changes were done to
BlockIcon
to support some new props.How has this been tested?
Test case 1
Test case 2
Test case 3
BlockIcon
e.g.Audio
Screenshots
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist:
*.native.js
files for terms that need renaming or removal).