-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add Gutenberg Embed WebView Activity #18383
Conversation
📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
|
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.
@jhnstn I tested the changes and work as expected. I added a couple of comments that shouldn't block the PR, let me know if you could take a look.
libs/editor/src/main/java/org/wordpress/android/editor/WPGutenbergEmbedWebViewActivity.java
Outdated
Show resolved
Hide resolved
@jhnstn since this PR also enables the VideoPress block on Android, what do you think about updating the PR's title and description to reflect this? UPDATE: Alternatively, we could enable the block in a separate PR. |
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.
I tested the last installable build and noticed the following issues:
R-rated videos
The keyboard remains open when introducing the DOB and closing the WebView. We'd need to figure out how to force closing the keyboard when going back from the WebView.
NOTE: I saw that we have a similar issue when interacting with the prompt dialog.
android-videopress-dob.mp4
Additionally, I noticed that R-rated videos display the DOB prompt in the editor. Since the player will be only available via the WebView, I'm wondering if instead of rendering the preview content, we could simply display the poster image with a play button. I wouldn't consider this a blocker but more like an enhancement.
Private videos
I checked that private videos are not displayed when opening a WebView, this issue is a bit critical as the player is not available. Hence, I'd consider it a blocker for releasing the block on Android.
In theory, the VideoPress URL set in the iframe's source should contain the token (reference), so not sure why private videos can't be played 🤔.
android-videopress-private-videos.mp4
Thanks for finding these @fluiddot Can you give any more info on the private video case? I've testing with private videos but can't reproduce: screen-20230510-110542.mp4That's on a simple site where videos are not private by default but that particular video is set as private. I've also tried with the site set to private. The player loads for me in both cases. Regarding the mature settings, I expect being able to force close the keyboard should be possible when the WebView is closed. My feeling is that is not a blocker to this PR but also borderline as a blocker to releasing VP on Android. |
@jhnstn Yep, sorry I didn't share all the info. I reproduced it using a Premium simple site with site privacy set to Tested with Samsung Galaxy S20 FE 5G (Android 13).
I agree, I wouldn't consider it a blocker for the PR but a nice-to-have before releasing on Android. |
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.
@jhnstn Yep, sorry I didn't share all the info. I reproduced it using a Premium simple site with site privacy set to
Private
. I can also reproduce it by setting the sitePublic
. I tested using the installable buildpr18383-144b55d
. In the video you shared, I noticed that it's in development mode by the RN error/warning messages. Can you try to reproduce it using the installable build?
I'm testing again and, after uploading a video and marking it as private, now I can't reproduce the issue 🙃. However, for the video I shared in the video captured above, I'm still not able to play it. For some reason, I'm having weird connection issues in the Android device I'm using, so I'm suspecting that might be related to that. That said, now that I can't reproduce it I'll approve the PR.
LGTM 🎊 !
Talkback doesn't seem to work very well with the web view. |
@lmischner I'm not sure we can do much about these talkback issues. The only think we control in the WebView is the iframe. The player itself loads from VideoPress. |
Found 1 violations: The PR caused the following dependency changes: \--- project :libs:editor
- \--- org.wordpress-mobile.gutenberg-mobile:react-native-gutenberg-bridge:v1.94.0
- +--- com.facebook.fresco:animated-gif:2.0.0
- | +--- com.parse.bolts:bolts-tasks:1.4.0
- | +--- com.facebook.soloader:soloader:0.6.0 -> 0.10.4 (*)
- | +--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
- | \--- com.facebook.fresco:animated-base:2.0.0
- | +--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
- | +--- com.facebook.fresco:imagepipeline-base:2.0.0 -> 2.5.0 (*)
- | +--- com.facebook.fresco:imagepipeline:2.0.0 -> 2.5.0 (*)
- | +--- com.facebook.fresco:animated-drawable:2.0.0
- | | +--- com.facebook.fresco:imagepipeline:2.0.0 -> 2.5.0 (*)
- | | +--- com.facebook.fresco:drawee:2.0.0 -> 2.5.0 (*)
- | | \--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
- | \--- com.parse.bolts:bolts-tasks:1.4.0
- +--- com.google.android.material:material:1.2.1 -> 1.6.0-alpha01 (*)
- +--- com.github.wordpress-mobile:react-native-video:5.2.0-wp-5
- | +--- com.google.android.exoplayer:exoplayer:2.13.3
- | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3
- | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
- | | | +--- com.google.android.exoplayer:exoplayer-common:2.13.3
- | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
- | | | | \--- com.google.guava:guava:27.1-android
- | | | | +--- com.google.guava:failureaccess:1.0.1
- | | | | \--- com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
- | | | \--- com.google.android.exoplayer:exoplayer-extractor:2.13.3
- | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
- | | | \--- com.google.android.exoplayer:exoplayer-common:2.13.3 (*)
- | | +--- com.google.android.exoplayer:exoplayer-dash:2.13.3
- | | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
- | | | \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
- | | +--- com.google.android.exoplayer:exoplayer-hls:2.13.3
- | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
- | | | \--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
- | | +--- com.google.android.exoplayer:exoplayer-smoothstreaming:2.13.3
- | | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
- | | | \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
- | | +--- com.google.android.exoplayer:exoplayer-transformer:2.13.3
- | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
- | | | \--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
- | | \--- com.google.android.exoplayer:exoplayer-ui:2.13.3
- | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
- | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
- | | +--- androidx.recyclerview:recyclerview:1.1.0 -> 1.2.1 (*)
- | | \--- androidx.media:media:1.2.1 (*)
- | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
- | +--- androidx.core:core:1.1.0 -> 1.8.0 (*)
- | +--- androidx.media:media:1.1.0 -> 1.2.1 (*)
- | +--- com.google.android.exoplayer:extension-okhttp:2.13.3
- | | +--- com.google.android.exoplayer:exoplayer-common:2.13.3 (*)
- | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
- | | \--- com.squareup.okhttp3:okhttp:3.12.11 -> 4.9.2 (*)
- | \--- com.squareup.okhttp3:okhttp:${OKHTTP_VERSION} -> 4.9.2 (*)
- +--- com.github.wordpress-mobile:react-native-linear-gradient:2.5.6-wp-3
- +--- com.github.wordpress-mobile:react-native-slider:3.0.2-wp-3
- +--- com.github.wordpress-mobile:react-native-reanimated:2.9.1-wp-3
- +--- com.github.wordpress-mobile:react-native-prompt-android:1.0.0-wp-3
- | \--- androidx.appcompat:appcompat:1.0.0 -> 1.4.2 (*)
- +--- com.github.wordpress-mobile:react-native-gesture-handler:2.3.2-wp-2
- | +--- com.github.wordpress-mobile:react-native-reanimated:2.4.1-wp-1 -> 2.9.1-wp-3
- | +--- androidx.appcompat:appcompat:1.2.0 -> 1.4.2 (*)
- | +--- androidx.core:core-ktx:1.6.0 -> 1.8.0 (*)
- | \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.20 -> 1.6.21 (*)
- +--- org.wordpress-mobile.react-native-libraries.v1:react-native-get-random-values:1.4.0
- +--- org.wordpress-mobile.react-native-libraries.v1:react-native-safe-area-context:3.2.0
- +--- org.wordpress-mobile.react-native-libraries.v1:react-native-screens:2.9.0
- | +--- androidx.appcompat:appcompat:1.1.0 -> 1.4.2 (*)
- | +--- androidx.fragment:fragment:1.2.1 -> 1.5.5 (*)
- | +--- androidx.coordinatorlayout:coordinatorlayout:1.1.0 (*)
- | +--- androidx.swiperefreshlayout:swiperefreshlayout:1.0.0 -> 1.1.0 (*)
- | \--- com.google.android.material:material:1.1.0 -> 1.6.0-alpha01 (*)
- +--- org.wordpress-mobile.react-native-libraries.v1:react-native-svg:9.13.6
- +--- org.wordpress-mobile.react-native-libraries.v1:react-native-webview:11.6.2
- | \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.10 -> 1.6.21 (*)
- +--- org.wordpress-mobile.react-native-libraries.v1:react-native-masked-view:0.2.6
- +--- org.wordpress-mobile.react-native-libraries.v1:react-native-clipboard:1.9.0
- +--- org.wordpress-mobile.react-native-libraries.v1:react-native-fast-image:8.5.11
- | +--- com.github.bumptech.glide:glide:4.12.0
- | | +--- com.github.bumptech.glide:gifdecoder:4.12.0
- | | | \--- androidx.annotation:annotation:1.0.0 -> 1.3.0
- | | +--- com.github.bumptech.glide:disklrucache:4.12.0
- | | +--- com.github.bumptech.glide:annotations:4.12.0
- | | +--- androidx.fragment:fragment:1.0.0 -> 1.5.5 (*)
- | | +--- androidx.vectordrawable:vectordrawable-animated:1.0.0 -> 1.1.0 (*)
- | | \--- androidx.exifinterface:exifinterface:1.2.0 -> 1.3.3 (*)
- | \--- com.github.bumptech.glide:okhttp3-integration:4.12.0
- | +--- com.github.bumptech.glide:glide:4.12.0 (*)
- | +--- com.squareup.okhttp3:okhttp:3.9.1 -> 4.9.2 (*)
- | \--- androidx.annotation:annotation:1.0.0 -> 1.3.0
- +--- org.wordpress-mobile.gutenberg-mobile:react-native-aztec:v1.94.0
- | +--- androidx.legacy:legacy-support-v4:1.0.0 (*)
- | +--- androidx.gridlayout:gridlayout:1.0.0
- | | +--- androidx.core:core:1.0.0 -> 1.8.0 (*)
- | | \--- androidx.legacy:legacy-support-core-ui:1.0.0 (*)
- | +--- androidx.cardview:cardview:1.0.0 (*)
- | +--- androidx.appcompat:appcompat:1.2.0 -> 1.4.2 (*)
- | +--- androidx.recyclerview:recyclerview:1.1.0 -> 1.2.1 (*)
- | +--- org.wordpress:aztec:v1.6.3 (*)
- | +--- org.wordpress.aztec:wordpress-shortcodes:v1.6.3 (*)
- | +--- org.wordpress.aztec:wordpress-comments:v1.6.3 (*)
- | +--- org.wordpress.aztec:glide-loader:v1.6.3
- | | +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 -> 1.6.21 (*)
- | | +--- org.wordpress:aztec:v1.6.3 (*)
- | | \--- com.github.bumptech.glide:glide:4.10.0 -> 4.12.0 (*)
- | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32 -> 1.6.21 (*)
- \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32 -> 1.6.21 (*)
+ \--- org.wordpress-mobile.gutenberg-mobile:react-native-gutenberg-bridge:v1.95.0-alpha1
+ +--- com.facebook.fresco:animated-gif:2.0.0
+ | +--- com.parse.bolts:bolts-tasks:1.4.0
+ | +--- com.facebook.soloader:soloader:0.6.0 -> 0.10.4 (*)
+ | +--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
+ | \--- com.facebook.fresco:animated-base:2.0.0
+ | +--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
+ | +--- com.facebook.fresco:imagepipeline-base:2.0.0 -> 2.5.0 (*)
+ | +--- com.facebook.fresco:imagepipeline:2.0.0 -> 2.5.0 (*)
+ | +--- com.facebook.fresco:animated-drawable:2.0.0
+ | | +--- com.facebook.fresco:imagepipeline:2.0.0 -> 2.5.0 (*)
+ | | +--- com.facebook.fresco:drawee:2.0.0 -> 2.5.0 (*)
+ | | \--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
+ | \--- com.parse.bolts:bolts-tasks:1.4.0
+ +--- com.google.android.material:material:1.2.1 -> 1.6.0-alpha01 (*)
+ +--- com.github.wordpress-mobile:react-native-video:5.2.0-wp-5
+ | +--- com.google.android.exoplayer:exoplayer:2.13.3
+ | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3
+ | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
+ | | | +--- com.google.android.exoplayer:exoplayer-common:2.13.3
+ | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
+ | | | | \--- com.google.guava:guava:27.1-android
+ | | | | +--- com.google.guava:failureaccess:1.0.1
+ | | | | \--- com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
+ | | | \--- com.google.android.exoplayer:exoplayer-extractor:2.13.3
+ | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
+ | | | \--- com.google.android.exoplayer:exoplayer-common:2.13.3 (*)
+ | | +--- com.google.android.exoplayer:exoplayer-dash:2.13.3
+ | | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
+ | | | \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
+ | | +--- com.google.android.exoplayer:exoplayer-hls:2.13.3
+ | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
+ | | | \--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
+ | | +--- com.google.android.exoplayer:exoplayer-smoothstreaming:2.13.3
+ | | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
+ | | | \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
+ | | +--- com.google.android.exoplayer:exoplayer-transformer:2.13.3
+ | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
+ | | | \--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
+ | | \--- com.google.android.exoplayer:exoplayer-ui:2.13.3
+ | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
+ | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
+ | | +--- androidx.recyclerview:recyclerview:1.1.0 -> 1.2.1 (*)
+ | | \--- androidx.media:media:1.2.1 (*)
+ | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
+ | +--- androidx.core:core:1.1.0 -> 1.8.0 (*)
+ | +--- androidx.media:media:1.1.0 -> 1.2.1 (*)
+ | +--- com.google.android.exoplayer:extension-okhttp:2.13.3
+ | | +--- com.google.android.exoplayer:exoplayer-common:2.13.3 (*)
+ | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
+ | | \--- com.squareup.okhttp3:okhttp:3.12.11 -> 4.9.2 (*)
+ | \--- com.squareup.okhttp3:okhttp:${OKHTTP_VERSION} -> 4.9.2 (*)
+ +--- com.github.wordpress-mobile:react-native-linear-gradient:2.5.6-wp-3
+ +--- com.github.wordpress-mobile:react-native-slider:3.0.2-wp-3
+ +--- com.github.wordpress-mobile:react-native-reanimated:2.9.1-wp-3
+ +--- com.github.wordpress-mobile:react-native-prompt-android:1.0.0-wp-3
+ | \--- androidx.appcompat:appcompat:1.0.0 -> 1.4.2 (*)
+ +--- com.github.wordpress-mobile:react-native-gesture-handler:2.3.2-wp-2
+ | +--- com.github.wordpress-mobile:react-native-reanimated:2.4.1-wp-1 -> 2.9.1-wp-3
+ | +--- androidx.appcompat:appcompat:1.2.0 -> 1.4.2 (*)
+ | +--- androidx.core:core-ktx:1.6.0 -> 1.8.0 (*)
+ | \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.20 -> 1.6.21 (*)
+ +--- org.wordpress-mobile.react-native-libraries.v1:react-native-get-random-values:1.4.0
+ +--- org.wordpress-mobile.react-native-libraries.v1:react-native-safe-area-context:3.2.0
+ +--- org.wordpress-mobile.react-native-libraries.v1:react-native-screens:2.9.0
+ | +--- androidx.appcompat:appcompat:1.1.0 -> 1.4.2 (*)
+ | +--- androidx.fragment:fragment:1.2.1 -> 1.5.5 (*)
+ | +--- androidx.coordinatorlayout:coordinatorlayout:1.1.0 (*)
+ | +--- androidx.swiperefreshlayout:swiperefreshlayout:1.0.0 -> 1.1.0 (*)
+ | \--- com.google.android.material:material:1.1.0 -> 1.6.0-alpha01 (*)
+ +--- org.wordpress-mobile.react-native-libraries.v1:react-native-svg:9.13.6
+ +--- org.wordpress-mobile.react-native-libraries.v1:react-native-webview:11.6.2
+ | \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.10 -> 1.6.21 (*)
+ +--- org.wordpress-mobile.react-native-libraries.v1:react-native-masked-view:0.2.6
+ +--- org.wordpress-mobile.react-native-libraries.v1:react-native-clipboard:1.9.0
+ +--- org.wordpress-mobile.react-native-libraries.v1:react-native-fast-image:8.5.11
+ | +--- com.github.bumptech.glide:glide:4.12.0
+ | | +--- com.github.bumptech.glide:gifdecoder:4.12.0
+ | | | \--- androidx.annotation:annotation:1.0.0 -> 1.3.0
+ | | +--- com.github.bumptech.glide:disklrucache:4.12.0
+ | | +--- com.github.bumptech.glide:annotations:4.12.0
+ | | +--- androidx.fragment:fragment:1.0.0 -> 1.5.5 (*)
+ | | +--- androidx.vectordrawable:vectordrawable-animated:1.0.0 -> 1.1.0 (*)
+ | | \--- androidx.exifinterface:exifinterface:1.2.0 -> 1.3.3 (*)
+ | \--- com.github.bumptech.glide:okhttp3-integration:4.12.0
+ | +--- com.github.bumptech.glide:glide:4.12.0 (*)
+ | +--- com.squareup.okhttp3:okhttp:3.9.1 -> 4.9.2 (*)
+ | \--- androidx.annotation:annotation:1.0.0 -> 1.3.0
+ +--- org.wordpress-mobile.gutenberg-mobile:react-native-aztec:v1.95.0-alpha1
+ | +--- androidx.legacy:legacy-support-v4:1.0.0 (*)
+ | +--- androidx.gridlayout:gridlayout:1.0.0
+ | | +--- androidx.core:core:1.0.0 -> 1.8.0 (*)
+ | | \--- androidx.legacy:legacy-support-core-ui:1.0.0 (*)
+ | +--- androidx.cardview:cardview:1.0.0 (*)
+ | +--- androidx.appcompat:appcompat:1.2.0 -> 1.4.2 (*)
+ | +--- androidx.recyclerview:recyclerview:1.1.0 -> 1.2.1 (*)
+ | +--- org.wordpress:aztec:v1.6.3 (*)
+ | +--- org.wordpress.aztec:wordpress-shortcodes:v1.6.3 (*)
+ | +--- org.wordpress.aztec:wordpress-comments:v1.6.3 (*)
+ | +--- org.wordpress.aztec:glide-loader:v1.6.3
+ | | +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 -> 1.6.21 (*)
+ | | +--- org.wordpress:aztec:v1.6.3 (*)
+ | | \--- com.github.bumptech.glide:glide:4.10.0 -> 4.12.0 (*)
+ | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32 -> 1.6.21 (*)
+ \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32 -> 1.6.21 (*)
Please review and act accordingly
|
Fixes wordpress-mobile/gutenberg-mobile#5509
Adds a new embed WebView for the editor.
Related PRs:
To test:
Regression Notes
Potential unintended areas of impact
Gutenberg bridge code - minimal.
What I did to test those areas of impact (or what existing automated tests I relied on)
Existing code was not altered for these changes.
What automated tests I added (or what prevented me from doing so)
PR submission checklist:
RELEASE-NOTES.txt
if necessary.UI Changes testing checklist: