wordpress-mobile / WordPress-iOS-Shared

Shared components used in building the WordPress iOS apps and other library components
GNU General Public License v2.0
18 stars 22 forks source link

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

Closed SiobhyB closed 4 months ago

SiobhyB commented 4 months ago

Fixes the iOS side of https://github.com/wordpress-mobile/gutenberg-mobile/issues/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 https://github.com/wordpress-mobile/WordPress-iOS/pull/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)