-
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
Add more information to unsupported blocks on native #14577
Conversation
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.
Looks and works good! Tested via wordpress-mobile/gutenberg-mobile#643 (review)
I'm not sure about the failing test. It doesn't say much. Maybe we could try to re-run it?
I left a small code comment but not a blocker.
Great job! 🎉
import styles from './style.scss'; | ||
|
||
export default class UnsupportedBlockEdit extends Component { | ||
render() { |
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.
This could be written as a stateless component, since we are not using local state or lifecycle methods.
At my understanding, they are quite faster.
Description
This replaces the previous mobile-specific unsupported block, and moves the logic to a native variant of
core/missing
.We also now import every core block, even though we only register those supported. This allows us to access the localized block title and icon, so we can show which kind of unsupported block we're dealing with. If the missing block is not a core block, a generic icon and label are shown instead.
How has this been tested?
Testing details on the gutenberg-mobile PR wordpress-mobile/gutenberg-mobile#643
Screenshots