Conversation
tomrf1
commented
Oct 3, 2025
tomrf1
commented
Oct 3, 2025
There was a problem hiding this comment.
Pull Request Overview
This PR adds event emission for ad slots to signal when the sign-in gate popup is viewed or dismissed, enabling suspension of ad refreshing during popup display.
- Emits new events:
article:sign-in-gate-${signInGateVersion}-viewedandarticle:sign-in-gate-${signInGateVersion}-dismissed - Refactors gate version determination to use treatment type instead of prop-based configuration
- Moves
getAuxiaGateVersioncall to top level for consistent version handling across components
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| SignInGatePortal.tsx | Updates auxiaGateDisplayData type to be required and simplifies getAuxiaGateVersion call |
| SignInGateSelector.importable.tsx | Removes signInGateVersion prop, moves version determination to top level, adds event emission logic |
| types.ts | Adds clarifying comment about gate versions |
| SignInGate.stories.tsx | Updates stories to use treatmentType instead of signInGateVersion prop |
Comments suppressed due to low confidence (1)
dotcom-rendering/src/components/SignInGateSelector.importable.tsx:1
- The call to getAuxiaGateVersion is missing the first parameter after removing the signInGateVersion parameter. The function signature expects userTreatment as the first parameter, but this is passing it as the second.
import { getCookie, isUndefined, storage } from '@guardian/libs';
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
on-ye
reviewed
Oct 3, 2025
dotcom-rendering/src/components/SignInGateSelector.importable.tsx
Outdated
Show resolved
Hide resolved
|
Hello 👋! When you're ready to run Chromatic, please apply the You will need to reapply the label each time you want to run Chromatic. |
juabara
approved these changes
Oct 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We need to signal to the ad slots when the popup gate is being viewed, and when it has been dismissed. This is so that ad refreshing can be suspended.
This PR does this by emitting new CustomEvents for tracking modals:
modal:openmodal:closeIn the
detailobject it also specifiesmodalType: 'sign-in-gate-v2'The PR also makes some small improvements:
signInGateVersionprop from the top-levelSignInGateSelectorcomponent. This was only added for storybook, but it's simpler if we only use thetreatmentTypefield for determining the version.getAuxiaGateVersionup to the top level, so that we can use the version for these new events