close
Skip to content

Fix: The width stays 500px in wide or full alignments for Pocket Casts Embed#69788

Draft
Rishit30G wants to merge 1 commit intoWordPress:trunkfrom
Rishit30G:fix/pocket-casts-embed
Draft

Fix: The width stays 500px in wide or full alignments for Pocket Casts Embed#69788
Rishit30G wants to merge 1 commit intoWordPress:trunkfrom
Rishit30G:fix/pocket-casts-embed

Conversation

@Rishit30G
Copy link
Contributor

What?

Closes #69780

Why?

How?

Testing Instructions

Testing Instructions for Keyboard

Screenshots or screencast

Screen.Recording.2025-04-01.at.7.55.33.AM.mov

@Rishit30G
Copy link
Contributor Author

Hi @t-hamano,
I have implemented a fix for the issue, however I don't feel confident that this would be the best approach, could you please share some insights as to how we can improve this
Thanks

@t-hamano
Copy link
Contributor

t-hamano commented Apr 1, 2025

Thanks for the PR!

I'm not sure hard-coding the provider name and style is a good approach.

I think a good place to start is to understand where this 500px is coming from and why it exists.

@t-hamano t-hamano added [Type] Bug An existing feature does not function as intended [Block] Embed Affects the Embed Block labels Apr 1, 2025
@iamtakashi
Copy link

Also, I noticed the div in question isn't there if the embed has more than one episodes, for example.

<!-- wp:embed {"url":"https://pca.st/distributed","type":"rich","providerNameSlug":"pocket-casts","responsive":true} -->
<figure class="wp-block-embed is-type-rich is-provider-pocket-casts wp-block-embed-pocket-casts"><div class="wp-block-embed__wrapper">
https://pca.st/distributed
</div></figure>
<!-- /wp:embed -->

Instead, the max-width of 500px is added to the iframe tag.
CleanShot 2025-04-01 at 17 08 37@2x

In both cases, the max width is causing this bug. I'm not sure about the intention. The documentation says that users can change the alignments.

@Rishit30G
Copy link
Contributor Author

On the editor side, I see max-width: 600px injected instead of max-width: 500px
I suspect that this could be a potential issue on the Pocket Casts side

Screenshot 2025-04-02 at 6 51 41 AM

@iamtakashi
Copy link

Good catch! That, too, needs to be removed to fix this for the editor.

@t-hamano t-hamano self-requested a review April 3, 2025 08:08
@Rishit30G
Copy link
Contributor Author

Good catch! That, too, needs to be removed to fix this for the editor.

Thanks! But as mentioned above that this a potential iframe issue from the pocket casts side and I would suggest two things:

  • Reaching out to Pocket Casts to fix this issue
  • Hardcode this for time being until and unless we find a concrete fix ( which this PR would do atleast for the frontend )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Embed Affects the Embed Block [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pocket Casts Embed: The width stays 500px in wide or full alignments

3 participants