WS-2581 Productionise files in head-to-head-v2/ (root directory only) - #14007
Conversation
shayneahchoon
left a comment
There was a problem hiding this comment.
I left some super nitpicky suggestions, but otherwise LGTM!
There was a problem hiding this comment.
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.jsximplementation with a typedhead-to-head-v2.tsx. - Extracted wrapper/container styling into
index.styles.tsand added a rootindex.tsre-export. - Extended
HeadToHeadV2Datawith an optionalattendanceobject (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 |
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Thanks - makes sense to stop TS yelling
Resolves JIRA: WS-2581
Summary
Productionise files in head-to-head-v2/ (root directory only)
Code changes
Testing
Useful Links