Skip to content

WS-2581 Productionise files in head-to-head-v2/ (root directory only) - #14007

Merged
emilysaffron merged 8 commits into
latestfrom
WS-2581-Productionise-Head-To-Headv2
May 13, 2026
Merged

WS-2581 Productionise files in head-to-head-v2/ (root directory only) #14007
emilysaffron merged 8 commits into
latestfrom
WS-2581-Productionise-Head-To-Headv2

Conversation

@emilysaffron

@emilysaffron emilysaffron commented May 12, 2026

Copy link
Copy Markdown
Contributor

Resolves JIRA: WS-2581

Summary

Productionise files in head-to-head-v2/ (root directory only)

Code changes

  • Uplifts to TS
  • Remove JSDoc typing
  • Converts styled components to styles.ts file

Testing

  1. List the steps required to test this PR.

Useful Links

Copilot AI review requested due to automatic review settings May 12, 2026 13:22
@emilysaffron emilysaffron self-assigned this May 12, 2026
Comment thread src/app/components-webcore/SportDataHeader/head-to-head-v2/index.styles.ts Outdated
Comment thread src/app/components-webcore/SportDataHeader/head-to-head-v2/index.styles.ts Outdated
Comment thread src/app/components-webcore/SportDataHeader/head-to-head-v2/types.ts

@shayneahchoon shayneahchoon 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.

I left some super nitpicky suggestions, but otherwise LGTM!

Copilot AI 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.

Pull request overview

Productionises the head-to-head-v2/ component entrypoint by moving the main component to TypeScript/TSX, introducing an Emotion index.styles.ts module, and updating the shared HeadToHeadV2Data type to include attendance fields used by the UI/tests.

Changes:

  • Replaced the root head-to-head-v2.jsx implementation with a typed head-to-head-v2.tsx.
  • Extracted wrapper/container styling into index.styles.ts and added a root index.ts re-export.
  • Extended HeadToHeadV2Data with an optional attendance object (value + additionalInfo).

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/app/components-webcore/SportDataHeader/head-to-head-v2/types.ts Adds optional attendance fields to the event data type.
src/app/components-webcore/SportDataHeader/head-to-head-v2/index.ts Adds a root barrel re-export for the component.
src/app/components-webcore/SportDataHeader/head-to-head-v2/index.styles.ts Introduces Emotion styles for the root wrapper/container.
src/app/components-webcore/SportDataHeader/head-to-head-v2/head-to-head-v2.tsx New TSX implementation wiring styles + subcomponents.
src/app/components-webcore/SportDataHeader/head-to-head-v2/head-to-head-v2.jsx Removes the legacy JSX implementation.

<HeadToHeadV2
data={sportData}
isConciseView={false} // defaulted to false for developement/ MVP
shouldHideBadges={false} // defaulted to false for developement/ MVP

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.

Heya, can I just sense check why this is being removed? (I might have missed it if this was covered in another PR)

If we're making changes to the Badges/ flags functionality can we capture them in https://bbc.atlassian.net/browse/WS-2575? thanks :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sure, i removed it as it looked like we were manually setting it to true here and it wasnt actually being passed in to this component, i know it has a TODO on it which i assume will involve having it actually be passed through? But for now this is to prevent typescript yelling everywhere that that's not being used

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.

Thanks - makes sense to stop TS yelling

@emilysaffron
emilysaffron merged commit 1f55dca into latest May 13, 2026
12 checks passed
@emilysaffron
emilysaffron deleted the WS-2581-Productionise-Head-To-Headv2 branch May 13, 2026 08:08
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