Skip to content

Use media atom images where possible for videos#16273

Merged
abeddow91 merged 7 commits into
mainfrom
ab/prefer-poster-image-for-videos
Jun 30, 2026
Merged

Use media atom images where possible for videos#16273
abeddow91 merged 7 commits into
mainfrom
ab/prefer-poster-image-for-videos

Conversation

@abeddow91

@abeddow91 abeddow91 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

What does this change?

Simplifies the logic used to select the image for a video media atom on a front.

Previously, this function determined whether to use the composer trail image or the video poster image based on whether the video was replacing the article's main media. This distinction is no longer necessary now that card media and article main media have been separated.

This change also fixes a bug where videos that were not replacement videos (for example, self hosted video pages) incorrectly used the composer trail image instead of the video poster image.

Why?

This bug has only recently become visible because, historically, self-hosted videos displayed on fronts were always replacement atoms and had no associated video page. Now that self-hosted default videos can also have dedicated video pages, the existing image selection logic produces the wrong poster image in those cases.

Screenshots

Before After
before after

Previously, it had to handle whether to show the composer trail image or the poster image based on if it should replace the article main media. This is no longer required as the card media has been seperated from the article main media.
@abeddow91 abeddow91 added the feature Departmental tracking: work on a new feature label Jun 25, 2026
@abeddow91 abeddow91 self-assigned this Jun 25, 2026
@abeddow91 abeddow91 marked this pull request as ready for review June 25, 2026 16:39
@abeddow91 abeddow91 added the run_chromatic Runs chromatic when label is applied label Jun 25, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Jun 25, 2026
@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown

@waisingyiu waisingyiu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice work!

@abeddow91 abeddow91 added the run_chromatic Runs chromatic when label is applied label Jun 29, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Jun 29, 2026
@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown

@abeddow91 abeddow91 added the run_chromatic Runs chromatic when label is applied label Jun 29, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Jun 29, 2026
@abeddow91 abeddow91 merged commit 7c58268 into main Jun 30, 2026
36 checks passed
@abeddow91 abeddow91 deleted the ab/prefer-poster-image-for-videos branch June 30, 2026 09:02
@gu-prout

gu-prout Bot commented Jun 30, 2026

Copy link
Copy Markdown

Seen on PROD (merged by @abeddow91 10 minutes and 33 seconds ago) Please check your changes!

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

Labels

feature Departmental tracking: work on a new feature Seen-on-PROD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants