-
Notifications
You must be signed in to change notification settings - Fork 58
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
Improve unsupported blocks #643
Conversation
Make sure the locale data is setup before importing anything, since block names get translated on import
I haven't figured out how to set the right colors yet, and then I realized that translations weren't working for block titles, so I focused on that first, but cc @iamthomasbishop since you might want to keep track of this one |
Awesome! I think I might need to update the colors here anyway, as the design changed slightly. IIRC, I just made the icon and text label
|
Just for the sake of consistency and documentation, some specs at the end:
|
Did a bit of refactoring, but this LGTM 👍 Btw, this introduces some "Circle dependency" warnings when booting the app in dev mode. We indeed have circle dependencies in our code (often in gutenberg), I think those warnings didn’t show up before because we would load those components before our app component is even loaded but there were still there. |
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.
Hey @koke - This looks and works super good! 🎉
I got curious about the hasUnsupportedBlocks
property we are sending back to Native, and for some reason it seems to not be working.
It's easy to see when running the example app from Xcode that it logs: gutenbergDidMount(hasUnsupportedBlocks: false)
with the example content.
I noticed that this.blocks
is empty on AppContainer
's componentDidMount
, and that would explain this behavior.
After fixing this detail, I'd say it's good to go.
Great job!
Since you're handling the |
Sure! One last smoke test. |
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.
Works good and looks super nice! 🎉
The previously described issue wasn't from this PR, so let's
✅
Show localized title and icon of unsupported core blocks. It also drops our custom
gmobile/unsupported
block and moves the functionality to a native variant ofcore/missing
.Gutenberg PR: WordPress/gutenberg#14577
To test:
Part of #479