[Gutenberg] Unsupported block fallback#13967
Conversation
WordPress/Classes/ViewRelated/Gutenberg/GutenbergWeb/RetrieveHTMLContent.js
Outdated
Show resolved
Hide resolved
WordPress/Classes/ViewRelated/Gutenberg/GutenbergWeb/RetrieveHTMLContent.js
Outdated
Show resolved
Hide resolved
WordPress/Classes/ViewRelated/Gutenberg/GutenbergWeb/RetrieveHTMLContent.js
Outdated
Show resolved
Hide resolved
WordPress/Classes/ViewRelated/Gutenberg/GutenbergWeb/RetrieveHTMLContent.js
Outdated
Show resolved
Hide resolved
WordPress/Classes/ViewRelated/Gutenberg/GutenbergWeb/InsertBlock.js
Outdated
Show resolved
Hide resolved
WordPress/Classes/ViewRelated/Gutenberg/GutenbergWeb/InsertBlock.js
Outdated
Show resolved
Hide resolved
WordPress/Classes/ViewRelated/Gutenberg/GutenbergWeb/InsertBlock.js
Outdated
Show resolved
Hide resolved
WordPress/Classes/ViewRelated/Gutenberg/GutenbergWeb/InsertBlock.js
Outdated
Show resolved
Hide resolved
WordPress/Classes/ViewRelated/Gutenberg/GutenbergWeb/InsertBlock.js
Outdated
Show resolved
Hide resolved
WordPress/Classes/ViewRelated/Gutenberg/GutenbergWeb/InjectCss.js
Outdated
Show resolved
Hide resolved
WordPress/Classes/ViewRelated/Gutenberg/GutenbergWeb/InjectCss.js
Outdated
Show resolved
Hide resolved
WordPress/Classes/ViewRelated/Gutenberg/GutenbergWeb/InjectCss.js
Outdated
Show resolved
Hide resolved
WordPress/Classes/ViewRelated/Gutenberg/GutenbergWeb/GutenbergWebViewController.swift
Outdated
Show resolved
Hide resolved
|
You can trigger an installable build for these changes by visiting CircleCI here. |
WordPress/Classes/ViewRelated/Gutenberg/GutenbergWeb/InjectCss.js
Outdated
Show resolved
Hide resolved
57f3b03 to
78954b5
Compare
|
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
WordPress/Classes/ViewRelated/Gutenberg/GutenbergWeb/InsertBlock.js
Outdated
Show resolved
Hide resolved
WordPress/Classes/ViewRelated/Gutenberg/GutenbergWeb/InsertBlock.js
Outdated
Show resolved
Hide resolved
We can inject the block to edit in a new post and retreive it using the redux store directly. But we can only do this loading wp-admin, since on Calypso, gutenberg loads inside an iframe.
We need WPBars (hide WP admin bar) early to avoid them to appear an disappear. We need Gutenberg CSS later to avoid it from being overriden after the editor loads.
to include block name.
- Avoid dismiss by dragging of modal presentation
@guarani I don’t think this is only block settings, is it? From what I can tell, we aren’t placing special restrictions (other than hiding a few menu items) on what the user can edit on the canvas, so I don’t see a reason to frame it in that way. For example, let’s say there is some sort of third-party text-based block that we don’t yet support out-of-the-box on mobile. If they use this function to open the block in the web view, they should be able to edit almost any aspect of that blocks contents, correct? Perhaps I am missing something? |
You're right, it's more than just block settings – I wasn't thinking past blocks similar to the video block which just have settings and no text content. |
|
Ah ok, no worries — just wanted to make sure I wasn't missing something 😆 |
I have implemented the Preview's loading indicator, since this is a native component we don't have easy access to it. |
…ted-block-fallback
|
Hey! I'm moving this to 15.0 because 14.9 has been cut. If you want this to make it to 14.9, please feel free to ping me. |
…ted-block-fallback
…ted-block-fallback
…ted-block-fallback
|
@etoledom I took the liberty of updating the milestone to 15.1 since 15.0 is about to be cut. |
…ted-block-fallback
|
Updated this branch with current develop and @guarani - would you mind doing a last smoke test?
Thanks! |
|
@etoledom – I got this working, but at first I was getting the login screen on a .com site on the simulator. On my phone I got a blank screen and noticed this error in the Xcode console: I reinstalled and it started working on the same device, but the error was still shown on the console. This error didn't seem to stop changes from being made to the unsupported block. |
This seems to be related to the bottom sheet in general, not to this feature in particular.
This happens usually on .com, since there's an attempt to insert the block on page load, but the editor is not ready yet. There's a second attempt later on that will succeed. |
…ted-block-fallback
|
Merging to bring the gutenberg bridge changes to WPiOS. |
Proof of concept Unsupported block fallback on native side.
This opens a web view with a new-post editor, and insert the required block via "User Content Javascript" (JS code inserted to the web view).
We extract the final block content in the same way.
To clean up the canvas from unwanted UI elements we inject CSS that hides those elements.
gutenberg-mobileside PR: wordpress-mobile/gutenberg-mobile#2063To test:
PR submission checklist:
RELEASE-NOTES.txtif necessary.