-
Notifications
You must be signed in to change notification settings - Fork 800
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
RNMobile: Fix edge case where VideoPress v5 could mistakenly appears empty #35957
RNMobile: Fix edge case where VideoPress v5 could mistakenly appears empty #35957
Conversation
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Once your PR is ready for review, check one last time that all required checks appearing at the bottom of this PR are passing or skipped. Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
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.
LGTM! When testing on a simple site in the context of WordPress/gutenberg#59378, I was able to observe the "before" state where the Video block was marked empty after saving and re-opening.
With the PR changes applied, I observed the Video block was not marked empty after saving and re-opening the post. 🚀
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.
LGTM 🎊 !
Observe that the post is marked as dirty. In this step, the video URL changed to the regular VideoPress URL. Note, this happens within the shared save.js file.
Ideally, the app should provide the block's markup to avoid being marked as dirty. Similarly, it would be great to match the markup produced in the web version to avoid extra updates. Not a blocker for this PR but I wonder if we could explore this improvement as part of the project Video block improvements
@SiobhyB I haven't found the companion GBM PR to update the Jetpack reference. Let us know when it's created to give approval. Thanks 🙇 ! |
Thanks for the review both!
Good point, I've added this as a task to look into on the project board, and will create a follow up issue later on as part of that. 🙇♀️
I have three Jetpack PRs that will be potentially merged very close together (this one, #35961, and potentially another today). I was thinking of creating a single companion PR referencing all three once they're merged, in an attempt to avoid PR-overload. :D I'll request your review when I create that! I'd also be happy to create a separate one now if you don't think waiting is a good idea. |
Sounds good. Makes sense to me to wait to batch multiple changes from Jetpack in a single PR 👍 . |
Fixes wordpress-mobile/gutenberg-mobile#6670
Proposed changes:
GUID
(as well as other VideoPress metadata). At the moment, the block'sisSourcePresent
bool returns false in these cases, leading to the block falsely appearing empty.isSourcePresent
has been removed in 8f1a4c3. It is only necessary for a video to either have a validsrc
orGUID
to confirm that a source is present.Other information:
Jetpack product discussion
N/A
Does this pull request change what data or activity we track or use?
No, it does not.
Testing instructions:
save.js
file.