Skip to content

[WS-2315] High Impact Promo to use relatedTopic instead of attribution#13825

Merged
LukasFrm merged 9 commits intolatestfrom
WS-2315-simorgh-high-impact-promo-to-use-relatedtopic-instead-of-attribution
Mar 25, 2026
Merged

[WS-2315] High Impact Promo to use relatedTopic instead of attribution#13825
LukasFrm merged 9 commits intolatestfrom
WS-2315-simorgh-high-impact-promo-to-use-relatedtopic-instead-of-attribution

Conversation

@LukasFrm
Copy link
Contributor

@LukasFrm LukasFrm commented Mar 23, 2026

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

Summary

A follow up to #13570 after discussing its caveats with the article team (change affect PS pages).

This change fixes how related topic data is passed down from BFF. When received, this new relatedTopic property is then conditionally rendered in MAXIMUM visual prominence HIP components in Simorgh instead of a regular article attribution.

Code changes

  • List key code changes that have been made.

Testing

  1. Open https://www.test.bbc.com/ws/languages
  2. First High Impact Promo should display "Россия" instead of "Russian" as the former is a related topic of the article.

Useful Links

@LukasFrm LukasFrm changed the title fix: update HIP to use relatedTopic prop [WS-2315] High Impact Promo to use relatedTopic instead of attribution Mar 23, 2026
@LukasFrm LukasFrm marked this pull request as ready for review March 23, 2026 13:16
Copilot AI review requested due to automatic review settings March 23, 2026 13:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the High Impact Promo curation component to display a relatedTopic link (when provided) in place of the usual attribution, aligning promo rendering with updated backend payload expectations.

Changes:

  • Add optional relatedTopic prop to HighImpactPromo and prefer it over attributions when rendering the subject link.
  • Refactor subject-link selection logic to fall back to first attribution or brand link/text when relatedTopic is absent.
  • Extend unit tests to cover rendering and prioritisation of relatedTopic.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/app/components/Curation/HighImpactPromo/index.tsx Adds relatedTopic support and prioritised rendering logic over attributions.
src/app/components/Curation/HighImpactPromo/index.test.tsx Adds test coverage for relatedTopic rendering and precedence over attributions.

@LukasFrm LukasFrm requested review from elvinasv and jinidev March 23, 2026 15:05
@LukasFrm LukasFrm requested a review from emilysaffron March 24, 2026 08:38
@LukasFrm LukasFrm requested a review from jinidev March 24, 2026 10:12
…nstead-of-attribution' of https://github.com/bbc/simorgh into WS-2315-simorgh-high-impact-promo-to-use-relatedtopic-instead-of-attribution
Copy link
Member

@elvinasv elvinasv left a comment

Choose a reason for hiding this comment

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

Ask talked offline, given that we're introduced relatedTopic which contains the primary topic of the article, should we remove the attributions for HighImpactPromo?

There may be unintended consequences if topics are missing but attributions are still returned, especially since Editorial might not have an easy way to control this.

@LukasFrm LukasFrm merged commit e8206b2 into latest Mar 25, 2026
14 checks passed
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.

5 participants