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

Site Editor Compatibility: register wp-mediaelement styles for Podcast Player #20193

Merged
merged 1 commit into from
Jun 28, 2021

Conversation

ramonjd
Copy link
Member

@ramonjd ramonjd commented Jun 28, 2021

Fixes #19483

Changes proposed in this Pull Request

In #19578 we created a "fix" so that we could copy over the media element style assets enqueued for the podcast player into the Site Editor iframe.

We did this in order that for podcast player to look as it should in the Site Editor.

Since WordPress/gutenberg#31873 we can specify Site Editor assets to enqueue in the register block function.

Also since that PR, WPCOM doesn't appear to load enqueued wp-mediaelement styles anymore :)

Therefore we need to specify wp-mediaelement styles for the podcast player.

This fix affects sites running Gutenberg 10.7 or later.

Before on WPCOM
Screen Shot 2021-06-28 at 12 54 02 pm

After on WPCOM
Screen Shot 2021-06-28 at 2 43 16 pm

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

No

Testing instructions

  1. Using a block-based theme, e.g., TT1 add a Podcast block to the site editor. Here's an RSS feed link: https://distributed.blog/category/podcast/feed/ 😄
  2. Once loaded, you should be able to interact with the player as expected.
  3. Add another one.
  4. Both should work
  5. Check that, for every podcast block you add, we're not duplicating the mediaelement-css assets.
  6. Take a look at the frontend. The player(s) should both load.
  7. Check a few other themes for regressions.
  8. Sync the changes to WPCOM and ensure that both the block and site editors work as expected.
  9. Chilled red wine is fine. Deal with it.

…n the register block function. We need to specify wp-mediaelement styles for the podcast player.
@matticbot
Copy link
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Hello ramonjd! These changes need to be synced to WordPress.com - If you 're an a11n, please commandeer and confirm D63370-code works as expected before merging this PR. Once this PR is merged, please commit the changes to WP.com. Thank you!
This revision will be updated with each commit to this PR

@ramonjd ramonjd requested review from sdixon194 and a team June 28, 2021 05:07
@ramonjd ramonjd self-assigned this Jun 28, 2021
@ramonjd ramonjd added [Feature] Carousel A fullscreen modal appearing when clicking on an image in a gallery or tiled gallery. [Focus] FSE Issues related to the site editor / Full Site Editing / FSE feature in Gutenberg labels Jun 28, 2021
@github-actions github-actions bot added [Block] Podcast Player [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ labels Jun 28, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Jun 28, 2021

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.


Jetpack plugin:

  • Next scheduled release: July 6, 2021.
  • Scheduled code freeze: June 28, 2021.

@github-actions github-actions bot added the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label Jun 28, 2021
Copy link
Member

@andrewserong andrewserong left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this up @ramonjd!

✅ Using a block-based theme, e.g., TT1 add a Podcast block to the site editor
✅ Once loaded, you should be able to interact with the player as expected.
✅ Add another one.
✅ Both should work
✅ Check that, for every podcast block you add, we're not duplicating the mediaelement-css assets.
✅ Take a look at the frontend. The player(s) should both load.
✅ Check a few other themes for regressions. (works fine in non-block-based-themes for me)

The only styling issue I encountered was with the Maywood theme, which unintentionally targets the hover style of the buttons within the Podcast block. This isn't at all a block for this PR, but we could always look at adding a defensive CSS rule to prevent themes from affecting the player buttons?

image

✅ Sync the changes to WPCOM and ensure that both the block and site editors work as expected.

Chilled red wine is fine. Deal with it.

I prefer mulled! (Though to be honest, I haven't tried chilled).

@andrewserong andrewserong added the [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. label Jun 28, 2021
@jeherve jeherve added this to the jetpack/9.9 milestone Jun 28, 2021
@jeherve jeherve added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Jun 28, 2021
@ramonjd ramonjd merged commit cf8864a into master Jun 28, 2021
@ramonjd ramonjd deleted the fix/podcast-player-enqueue-wp-mediaelement branch June 28, 2021 12:06
@github-actions github-actions bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label Jun 28, 2021
@github-actions
Copy link
Contributor

Great news! One last step: head over to your WordPress.com diff, D63370-code, and commit it.
Once you've done so, come back to this PR and add a comment with your changeset ID.

Thank you!

@ramonjd
Copy link
Member Author

ramonjd commented Jun 28, 2021

r227867-wpcom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Podcast Player [Feature] Carousel A fullscreen modal appearing when clicking on an image in a gallery or tiled gallery. [Focus] FSE Issues related to the site editor / Full Site Editing / FSE feature in Gutenberg [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ Touches WP.com Files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Site Editor Compatibility: Podcast Player block issues in editor and front end views
4 participants