Skip to content

WS-2638 - MAP Promo Playback on Homepage and Topics [SPIKE]#14087

Draft
pvaliani wants to merge 4 commits into
latestfrom
WS-2638-insitu-playback-spike
Draft

WS-2638 - MAP Promo Playback on Homepage and Topics [SPIKE]#14087
pvaliani wants to merge 4 commits into
latestfrom
WS-2638-insitu-playback-spike

Conversation

@pvaliani
Copy link
Copy Markdown
Contributor

@pvaliani pvaliani commented Jun 2, 2026

Resolves JIRA:
https://bbc.atlassian.net/browse/WS-2638

Summary

  • Enables MAP videos to be played when they are the first/leading promo in the HierarchicalGrid when used on Home or Topic Pages
Screen.Recording.2026-06-03.at.15.40.05.mov

Code changes

  • See files changed

Testing

Test link: http://localhost.bbc.com:7081/arabic/topics/cz9mm6r1q5et?renderer_env=live

Useful Links

@pvaliani pvaliani self-assigned this Jun 3, 2026
promo,
promoIndex,
mediaBlocks,
}: Props): InSituPlaybackEligibility => {
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.

So is this a blanket rule for every hieirachicalGrid view the first promo will show as in-situ playback.

It's not just if its the first curation on the page?

(would be uncomfortable with the latter as it starts to make the rendering very unpredictable)

Comment on lines +98 to +107
const inSituPlaybackEligibility = getInSituPlaybackEligibility({
promo,
promoIndex: i,
mediaBlocks: promo.inSituMedia,
});
const eligibleInSituMediaBlocks =
!isAmp && inSituPlaybackEligibility.isEligible
? inSituPlaybackEligibility.mediaBlocks
: null;
const inSituMediaBlocks = eligibleInSituMediaBlocks;
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.

From a maintainability standpoint this logic definitely belongs in the BFF as it is pure business logic

VISUAL_PROMINENCE,
VISUAL_STYLE,
} from '#app/models/types/curationData';
import getPageData from '../pageRequests/getPageData';
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.

I think there is a lot of logic that belongs in the BFF in this file, I'd try and only send to the frontend what is need to render nothing more

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants