wordpress-mobile / gutenberg-mobile

Mobile version of Gutenberg - native iOS and Android
GNU General Public License v2.0
257 stars 58 forks source link

Embed block: Inline preview is enabled for Pinterest URLs and is not properly rendered #3983

Open fluiddot opened 3 years ago

fluiddot commented 3 years ago

Describe the bug Pinterest provider is not supported in the Embed block so the inline preview shouldn't be enabled, however, since it's being rendered as a WordPress embed it's not being filtered out and therefore it's being displayed.

Related code: https://github.com/WordPress/gutenberg/blob/aa6217fc2a81bdc71c2d545744b9735c7626385a/packages/block-library/src/embed/edit.native.js#L218-L219

Besides, it's not properly rendered, on iOS the preview is empty and on Android, the content is cut off.

To Reproduce

  1. Add an Embed block.
  2. Use a Pinterest URL (example: https://www.pinterest.com/annsawesomepins/).
  3. Observe that on iOS the inline preview is not displayed and on Android, the preview is cut off.

Expected behavior The inline preview should be displayed properly or disabled until it's supported.

Screenshots

iOS Android

Smartphone (please complete the following information):

Additional context Looks like the Pinterest provider has been added recently as per this commit from WordPress repo.

fluiddot commented 3 years ago

For now the inline preview will be disabled after merging this PR: https://github.com/wordpress-mobile/gutenberg-mobile/pull/3991