[RNMobile] Add embed webview for Android #50440
Conversation
|
Size Change: 0 B Total Size: 1.39 MB ℹ️ View Unchanged
|
|
Flaky tests detected in 50b6f41. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4928801336
|
f2580b7 to
8fbeb8c
Compare
Fix renaming --ammend
4c3ead4 to
46d29ff
Compare
| @Override | ||
| public void onPageStarted(WebView view, String url, Bitmap favicon) { | ||
| // Center the embed with a black background; | ||
| String css = "body{margin:0;background:#000;display:flex;align-items:center;}"; |
There was a problem hiding this comment.
The fullscreen preview on iOS has a black background by default so there is no need to check the user theme preference .
fluiddot
left a comment
There was a problem hiding this comment.
@jhnstn Tested via wordpress-mobile/WordPress-Android#18383 (review). I added some comments but shouldn't block the PR.
Not sure how feasible would be but it would be great automatically play the video once the WebView is launched. I found it a bit weird that you have to tap two times on the play button to actually play the video. WDYT? I wouldn't consider this a blocker but an interesting QoL to incorporate.
.../react-native-bridge/src/main/java/org/wordpress/mobile/WPAndroidGlue/WPAndroidGlueCode.java
Outdated
Show resolved
Hide resolved
...main/java/org/wordpress/mobile/ReactNativeGutenbergBridge/GutenbergEmbedWebViewActivity.java
Outdated
Show resolved
Hide resolved
|
Thanks for the reviews @fluiddot !
I had a similar thought about the autoplay. I know we can trigger a play event via VideoPress and it seems fairly straight forward to inject JS into the WebView. I didn't explore that in the interest of getting a MVP working. I can look into that as a follow up. |
These are no longer overriden in the main Android app
fluiddot
left a comment
There was a problem hiding this comment.
Tested via wordpress-mobile/WordPress-Android#18383 (review). Since I spotted some issues there, I'll hold the approval until we tackle them.
0280d01 to
50b6f41
Compare
fluiddot
left a comment
There was a problem hiding this comment.
Approved via wordpress-mobile/WordPress-Android#18383 (review).
|
@fluiddot you can ignore the re-request to review. I meant to re-request a different PR |
What?
Fixes wordpress-mobile/gutenberg-mobile#5509
Adds a full screen embed preview for Android.
Depends on:
Related:
Why?
The
react-native-webviewon Android has event propagation issues when nested inside aPressablecomponent. As a work around we need an Android WebView to render interactive embed content.How?
Adds a new Android Activity to render embed content in a native WebView.
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast