Skip to content
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

Merged
merged 8 commits into from
Apr 3, 2019

Conversation

koke
Copy link
Contributor

@koke koke commented Mar 22, 2019

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

image

@koke koke 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 Mar 22, 2019
@koke koke requested a review from etoledom March 22, 2019 14:43
@koke koke changed the title Rnmobile/unsupported core blocks master Add more information to unsupported blocks on native Mar 22, 2019
Copy link
Contributor

@etoledom etoledom left a 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() {
Copy link
Contributor

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.

@koke koke merged commit cf075b7 into master Apr 3, 2019
@koke koke deleted the rnmobile/unsupported-core-blocks-master branch April 3, 2019 14:57
@youknowriad youknowriad added this to the 5.5 (Gutenberg) milestone Apr 12, 2019
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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants