-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Edit unsupported blocks in a RN web view #21832
Conversation
On mobile, unsupported blocks cannot be shown in the React Native editor. To allow users to edit these blocks, we use a web view to show a web editor and allow the user to manipulate the block there before loading its contents back into the mobile editor.
Size Change: 0 B Total Size: 845 kB ℹ️ View Unchanged
|
uri: | ||
'https://cruisinglamb.wordpress.com/wp-admin/post-new.php', | ||
} } | ||
injectedJavaScript={ scriptToInject } |
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.
Do we have more control over when can we inject JS code?
I have noticed that to avoid some flickering of UI or CSS overrides we will need to inject some snippets as early as possible and others as late as possible.
There's for example this little flash of the WP Admin Bar while the page is loading. So we should inject the "hide WP Admin Bar" CSS earlier. But then the Editor CSS will override the Gutenberg top bar changes since it loads later. And to avoid that, we need to inject the Editor CSS as late as possible (when everything is loaded).
Closing this in favor of wordpress-mobile/gutenberg-mobile#2063 |
Description
Allow users to update unsupported blocks via a new modal web editor.
How has this been tested?
Screenshots
Types of changes
Checklist: