Skip to content

Client side rendered scorecard tab for cricket#16155

Draft
Jakeii wants to merge 10 commits into
mainfrom
jlk/client-side-cricket-scorecard
Draft

Client side rendered scorecard tab for cricket#16155
Jakeii wants to merge 10 commits into
mainfrom
jlk/client-side-cricket-scorecard

Conversation

@Jakeii

@Jakeii Jakeii commented Jun 15, 2026

Copy link
Copy Markdown
Member

What does this change?

Add a client-side rendered scorecard tab to the cricket match header

When the scorecard tab is clicked it will replace the main page contents i.e the liveblog or match report contents when clicked, it doesn't need to handle clicking back to the liveblog or match report as they are just links and cause a full page load when clicked.

This uses the react createRoot and render functions to render the scorecard.

This is not putting it into production yet, there's still some other work to fetch the cricket data to do first. I've turned the CricketScorecardPageNew component and story into a test bed for it with some storybook UI tests, as we won't need the cricket score page anymore.

Why?

Unfortunately we can't have a separate page for the cricket data as we do for football data as there isn't currently a scorecard page in the app, so it would be a significant apps effort to get that working. So a client-side solution was needed.

Second unfortunately we don't really want to wrap the entire liveblog and match report in an island, that would be a very large payload and require passing the entire live blog or article content as props to said island.

CSS-only was also explored however these aren't accessible to screen-readers.

So we found 2 methods use createRoot and render or use createPortal, createPortal required clearing the contents first via .innerHTML = '', but createRoot will happily replace the contents on it's own so we went with that solution.

@Jakeii Jakeii added the feature Departmental tracking: work on a new feature label Jun 15, 2026
@Jakeii Jakeii force-pushed the jlk/client-side-cricket-scorecard branch from b705b7f to d6c9f5a Compare June 15, 2026 09:32
@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

@Jakeii Jakeii changed the title client side rendered scorecard tab for cricket Client side rendered scorecard tab for cricket Jun 15, 2026
@Jakeii Jakeii force-pushed the jlk/client-side-cricket-scorecard branch from 14f74c4 to 5dde72f Compare June 15, 2026 13:57
@Jakeii Jakeii force-pushed the jlk/client-side-cricket-scorecard branch from 6a0430c to 0e206c7 Compare June 15, 2026 15:19
@Jakeii Jakeii added the run_chromatic Runs chromatic when label is applied label Jun 15, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Jun 15, 2026
@Jakeii Jakeii added the run_chromatic Runs chromatic when label is applied label Jun 16, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Jun 16, 2026
@Jakeii Jakeii added the run_chromatic Runs chromatic when label is applied label Jun 16, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Jun 16, 2026
@Jakeii Jakeii force-pushed the jlk/client-side-cricket-scorecard branch from 23eb735 to e4194d3 Compare June 16, 2026 09:10
@Jakeii Jakeii added the run_chromatic Runs chromatic when label is applied label Jun 16, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Jun 16, 2026
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant