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

Remove Gutenberg Video block from excerpt to hide VideoPress URLs #352

Merged
merged 3 commits into from
Mar 1, 2024

Conversation

SiobhyB
Copy link

@SiobhyB SiobhyB commented Feb 27, 2024

Fixes the iOS side of wordpress-mobile/gutenberg-mobile#6669


Description:

Following the implementation of VideoPress v5, media uploaded to the video block on supported sites will automatically convert to VideoPress. This has led to VideoPress URLs being visible alongside excerpts in the post list section.

To remove all references to VideoPress from the post excerpt, this PR extends the strippingGutenbergVideoPress function to include video blocks.

See wordpress-mobile/WordPress-iOS#22713 for the main iOS companion to this PR.


To Test:

  1. In the app, select a WordPress.com site to edit and open the post editor.
  2. Add the Video block and go through the steps to add a video.
  3. Save your changes and return to the post list.
  4. Verify the VideoPress URL does not display in the post list.

Screenshots:

Before After

Regression Notes:

  1. Potential unintended areas of impact

    • As we're making changes to the regex that filters out the VideoPress block from the excerpt, there is a chance this PR could unintentionally change the existing functionality.
  2. What I did to test those areas of impact (or what existing automated tests I relied on)

    • I manually tested the changes and relied on the existing test that verifies VideoPress blocks remain correctly hidden.
  3. What automated tests I added (or what prevented me from doing so)

    • I added a new test in d9d8d04 that verifies regular video blocks are removed from the post excerpt.

  • I have considered if this change warrants release notes and have added them to the appropriate section in the CHANGELOG.md if necessary.

Copy link
Contributor

@derekblank derekblank left a comment

Choose a reason for hiding this comment

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

I was able to following the testing steps successfully and verified I did not observe the video URL in the Posts list. LGTM. 🚀

@SiobhyB SiobhyB merged commit 0a14bc9 into trunk Mar 1, 2024
10 checks passed
@SiobhyB SiobhyB deleted the gutenberg/remove-videopress-ref-from-excerpt branch March 1, 2024 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants