Skip to content

Football match header polling - #15350

Merged
jamesmockett merged 14 commits into
mainfrom
add-polling-for-match-header
Feb 16, 2026
Merged

jamesmockett merged 14 commits into
mainfrom
add-polling-for-match-header

Conversation

@jamesmockett

@jamesmockett jamesmockett commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

Paired with @JamieB-gu, @jamesmockett & @marjisound

What does this change?

Adds polling to football match header

  • Adds FootballMatchHeader.importable wrapper component.
  • Uses SWR for polling. The fetch method is defined in FootballMatchHeader.importable and passed as a prop to the child FootballMatchHeader component. This allows the data fetching to be mocked and tested in Storybook.
  • Valibot schemas have been added for the existing match info types and a new schema created for the match header data, enabling validation and parsing of the match header data.

Why?

To update the header in realtime to reflect the current state of the match

Screenshots

Screenshot 2026-02-12 at 17 35 42 Screenshot 2026-02-12 at 17 36 06 Screenshot 2026-02-12 at 17 36 21

@jamesmockett
jamesmockett requested a review from a team as a code owner February 12, 2026 17:49
@jamesmockett jamesmockett added the feature Departmental tracking: work on a new feature label Feb 12, 2026
@github-actions

Copy link
Copy Markdown

Hello 👋! When you're ready to run Chromatic, please apply the run_chromatic label to this PR.

You will need to reapply the label each time you want to run Chromatic.

Click here to see the Chromatic project.

marjisound and others added 12 commits February 12, 2026 17:50
Co-authored-by: Jamie B <53781962+JamieB-gu@users.noreply.github.com>
Co-authored-by: James Mockett <1166188+jamesmockett@users.noreply.github.com>
Co-authored-by: Jamie B <53781962+JamieB-gu@users.noreply.github.com>
Co-authored-by: Marjan K <15894063+marjisound@users.noreply.github.com>
Co-authored-by: Marjan K <15894063+marjisound@users.noreply.github.com>
Co-authored-by: James M <1166188+jamesmockett@users.noreply.github.com>
Co-authored-by: Marjan K <15894063+marjisound@users.noreply.github.com>
Co-authored-by: James M <1166188+jamesmockett@users.noreply.github.com>
Co-authored-by: Marjan K <15894063+marjisound@users.noreply.github.com>
Co-authored-by: James M <1166188+jamesmockett@users.noreply.github.com>
Co-authored-by: James M <1166188+jamesmockett@users.noreply.github.com>
Co-authored-by: Jamie B <53781962+JamieB-gu@users.noreply.github.com>
Co-authored-by: James M <1166188+jamesmockett@users.noreply.github.com>
Co-authored-by: Jamie B <53781962+JamieB-gu@users.noreply.github.com>
`FootballMatchHeader` is also now wrapped inside an `Island` so the
client side fetch is functional

Co-authored-by: Marjan K <15894063+marjisound@users.noreply.github.com>
The side-effectful fetch function is now passed in, which means we can
pass a mock version in storybook for testing.

Co-authored-by: Marjan K <15894063+marjisound@users.noreply.github.com>
Co-authored-by: James M <1166188+jamesmockett@users.noreply.github.com>
Co-authored-by: Marjan K <15894063+marjisound@users.noreply.github.com>
Co-authored-by: James M <1166188+jamesmockett@users.noreply.github.com>
@jamesmockett
jamesmockett force-pushed the add-polling-for-match-header branch from b33ba47 to 866003d Compare February 12, 2026 17:51
@jamesmockett jamesmockett added the run_chromatic Runs chromatic when label is applied label Feb 12, 2026
@github-actions

github-actions Bot commented Feb 12, 2026

Copy link
Copy Markdown

@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Feb 12, 2026
@github-actions

github-actions Bot commented Feb 12, 2026

Copy link
Copy Markdown

As the before and after state for the 'Fixture' story is the same the
expectations will pass before the UI has updated as `waitFor` does not
have to wait and retry. By awaiting the change to the team name we
ensure the UI has actually been updated before testing it is correct.
@marjisound marjisound added the run_chromatic Runs chromatic when label is applied label Feb 16, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Feb 16, 2026
@jamesmockett
jamesmockett merged commit f410ed2 into main Feb 16, 2026
31 checks passed
@jamesmockett
jamesmockett deleted the add-polling-for-match-header branch February 16, 2026 17:18
@gu-prout

gu-prout Bot commented Feb 16, 2026

Copy link
Copy Markdown

Seen on PROD (merged by @jamesmockett 7 minutes and 41 seconds ago) Please check your changes!

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 Seen-on-PROD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add polling wrapper for the football header

3 participants