-
Notifications
You must be signed in to change notification settings - Fork 56
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
Unsupported Block #106
Unsupported Block #106
Conversation
After giving it a try, I noticed that it's breaking because So it's failing when it tries to access At this line it return At this line it try to access I'm not sure what is the best way to fixing this. A try {
return serialize( [ block ] ) + '\n\n';
} catch (error) {
return block.attributes.content + '\n\n';
} |
I tested an alternative strategy to show the unsupported block UI, based on the conversation we had in slack. It's described here. |
Ready for review. |
} | ||
|
||
render() { | ||
let blockName = this.props.name.charAt(0).toUpperCase() + this.props.name.slice(1); |
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.
Wouldn’t this always be “Gmobile/unsupported” now?
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.
Yeppers. I can just remove it if it feels redundant, although I left it in cos otherwise the block feels a bit empty at this time.
Let me know which way you prefer it.
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.
Since the other line already says unsupported, I think we can remove it for now
Other than the title, this is looking great. The tests are failing on travis though |
I've fixed the conflicts with master and the tests to get this ready for today's demo. It also turned out that with the latest changes, the block manager didn't need any special case handling for the unsupported block, so that was simplified as well when resolving the conflict: 1a2bfc0 Merging when green |
Description:
This PR implements the unsupported block for blocks we don't offer support for.
Fixes #50.
Details:
This PR introduces a new block type to display all the blocks we don't support. Adding support for a block happens through regular registration of the block type in Gutenberg.
Next steps: introduce this new block type as the native version of the
freeform
block.Known issues / limitations:
After the changes submitted by @koke in
#127, I could no longer retrieve the original block name to display in visual mode.
This should be fine though, as unsupported blocks could be changing once this is merged: WordPress/gutenberg#8274
Testing: