Skip to content
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

VideoPress: dont allow editing video data when doesn't belong to site #30438

Merged
merged 10 commits into from
May 4, 2023

Conversation

retrofox
Copy link
Contributor

@retrofox retrofox commented May 3, 2023

This PR disables the title and description fields of the Details panel when the video doesn't belong to the site.
Follow-up PR will add a Notice and probably a modal explaining the limitations when creating a block instance by using a video that doesn't belong to the site.

Fixes #
Part of #30417

Proposed changes:

  • VideoPress: dont allow editing video data when the video doesn't belong to the site

Other information:

  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

Does this pull request change what data or activity we track or use?

Testing instructions:

  • Go to the block editor

  • Create/edit a VideoPress video instance

  • Set title and description

  • Confirm it works as expected

  • Create another VideoPress video block that doesn't belong to the site (https://videopress.com/v/NGYE1Hqy)

  • Confirm title and description fields are disabled.

Screen.Recording.2023-05-03.at.16.17.19.mov

@retrofox retrofox added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Status] Needs Team Review [Size] S [Block] VideoPress [Package] VideoPress labels May 3, 2023
@retrofox retrofox requested a review from a team May 3, 2023 19:10
@retrofox retrofox self-assigned this May 3, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 3, 2023

Are you an Automattician? You can now test your Pull Request on WordPress.com. On your sandbox, run

bin/jetpack-downloader test jetpack update/videopress-propagate-belong-to-to-client-side

to get started. More details: p9dueE-5Nn-p2

@github-actions
Copy link
Contributor

github-actions bot commented May 3, 2023

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ⚠️ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

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 (other than "Required review") appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team review" label and ask someone from your team review the code.
Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.

@retrofox retrofox changed the title VideoPress: dont allow editing video data when doesn't belong to the site VideoPress: dont allow editing video data when doesn't belong to site May 3, 2023
@retrofox retrofox force-pushed the update/videopress-propagate-belong-to-to-client-side branch from 9ae1e5f to 774b360 Compare May 4, 2023 13:53
Copy link
Contributor

@dhasilva dhasilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on wpcom, WoA and JN. Working as expected. Nice work!

@dhasilva dhasilva added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Team Review labels May 4, 2023
@retrofox retrofox merged commit f7bbc18 into trunk May 4, 2023
@retrofox retrofox deleted the update/videopress-propagate-belong-to-to-client-side branch May 4, 2023 14:18
@github-actions github-actions bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] VideoPress [Package] VideoPress [Size] S [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants