Skip to content

Support MatchNotifications Bridget API to prevent duplicate notifications#15819

Draft
DanielCliftonGuardian wants to merge 9 commits into
mainfrom
Match-notification-bridget
Draft

Support MatchNotifications Bridget API to prevent duplicate notifications#15819
DanielCliftonGuardian wants to merge 9 commits into
mainfrom
Match-notification-bridget

Conversation

@DanielCliftonGuardian
Copy link
Copy Markdown
Contributor

@DanielCliftonGuardian DanielCliftonGuardian commented May 7, 2026

What does this change?

Bumps @guardian/bridget to consume the newly added MatchNotifications service and adds getMatchNotificationsClient to Bridget API wrappers. Updates the Notifications component within FootballMatchHeader to query the app for match notification availability (isAvailable) on mount. If the app returns isAvailable: false, the notification toggle is hidden and replaced with the unavailableReason message provided by the app (or a fallback message). If the Bridget call fails, it gracefully handles the error by logging to Sentry and defaulting to isAvailable: true so the button doesn't silently disappear. Also adds mock Bridget clients and an Unavailable state to Storybook to test the UI changes.

Why?

On match info and liveblog pages, we offer the ability to sign up for notifications about that match. However, the native apps also allow users to sign up for notifications about a particular team, which automatically includes the matches they're playing in. Therefore, we don't want to offer the option to sign up for these matches separately to those users, as it would result in duplicate notifications.

Currently, the apps solve this problem natively by removing the button and instead displaying a message explaining that the user has already signed up for team notifications. This PR implements the webview side of this interaction, utilising the new Bridget API to check the user's team subscription status with the app and adjusting the webview UI to match the native experience.

Part of #15591

Bridget PR guardian/bridget#245

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

@DanielCliftonGuardian DanielCliftonGuardian changed the title Match notification bridget wip Support MatchNotifications Bridget API to prevent duplicate notifications May 11, 2026
@DanielCliftonGuardian DanielCliftonGuardian self-assigned this May 11, 2026
@DanielCliftonGuardian DanielCliftonGuardian added the feature Departmental tracking: work on a new feature label May 11, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 11, 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