guardian / guardian/dotcom-rendering

Investigate if generic Embeds with Vimeo videos size correctly

Open
#16,191 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
274
Forks
34
Avg merge
2d 22h
Merged PRs (30d)
121

Description

When @guardian/commercial-dev implemented hosted content pages they had to implement handling for generic embeds.

This led to the discovery that when Vimeo embeds are included on a page the iframe does not have the correct width and height set.

This is because the existing `enhance-embeds.ts` module strips any surrounding HTML which may contain styling that comes from Composer / Frontend

https://github.com/guardian/dotcom-rendering/blob/fcc3df33bbe4b23b68d4a4ede0caccb8465cd20a/dotcom-rendering/src/model/enhance-embeds.ts#L12-L18

See the Vimeo embed present on the Frontend rendered page:

https://www.theguardian.com/advertiser-content/visa-2020/why-digital-equity-is-fundamental-to-pandemic-recovery?dcr=false

This does not currently render on the DCR hosted content pages:

https://www.theguardian.com/advertiser-content/visa-2020/why-digital-equity-is-fundamental-to-pandemic-recovery?dcr=true

Rendering on DCR was implemented on the following branch:

https://github.com/guardian/dotcom-rendering/tree/rd/embed-iframe-testing-hosted-content

An additional chat thread:

https://chat.google.com/room/AAAAWaoV0IE/F5GMTZmGGas/s4qf-IYyBqQ?cls=10

We should find an article with a generic embed containing a Vimeo video and confirm if they are sized correctly.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.