Skip to content

Commit 5739579

Browse files
committed
signin gate: clean up investigation code
1 parent 9db6ade commit 5739579

File tree

3 files changed

+2
-53
lines changed

3 files changed

+2
-53
lines changed

dotcom-rendering/src/components/SignInGate/displayRules.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,7 @@ import type { CanShowGateProps } from './types';
1111
export const isNPageOrHigherPageView = (n = 2): boolean => {
1212
// get daily read article count array from local storage
1313
const [dailyCount = {} as DailyArticle] = getDailyArticleCount() ?? [];
14-
1514
const { count = 0 } = dailyCount;
16-
17-
console.log(`counter inside isNPageOrHigherPageView: ${count}`);
18-
1915
return count >= n;
2016
};
2117

dotcom-rendering/src/components/SignInGate/gates/main-control.ts

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -16,39 +16,6 @@ const canShow = ({
1616
isPaidContent,
1717
isPreview,
1818
}: CanShowGateProps): Promise<boolean> => {
19-
// 31st July 2025
20-
// author: Pascal
21-
// Investigating broken behavior of this function
22-
23-
console.log('[60f7e8f7] investigation');
24-
console.log(`isSignedIn: ${isSignedIn}`);
25-
console.log(`!isSignedIn: ${!isSignedIn}`);
26-
console.log(`currentTest.variant: ${currentTest.variant}`);
27-
console.log(`currentTest.name: ${currentTest.name}`);
28-
console.log(
29-
`hasUserDismissedGate: ${hasUserDismissedGate(
30-
currentTest.variant,
31-
currentTest.name,
32-
)}`,
33-
);
34-
console.log(
35-
`!hasUserDismissedGate: ${!hasUserDismissedGate(
36-
currentTest.variant,
37-
currentTest.name,
38-
)}`,
39-
);
40-
console.log(`isNPageOrHigherPageView: ${isNPageOrHigherPageView(3)}`);
41-
console.log(`contentType: ${contentType}`);
42-
console.log(`isValidContentType: ${isValidContentType(contentType)}`);
43-
console.log(`sectionId: ${sectionId}`);
44-
console.log(`isValidSection: ${isValidSection(sectionId)}`);
45-
console.log(`tags: ${JSON.stringify(tags)}`);
46-
console.log(`isValidTag: ${isValidTag(tags)}`);
47-
console.log(`isPaidContent: ${isPaidContent}`);
48-
console.log(`!isPaidContent: ${!isPaidContent}`);
49-
console.log(`isPreview: ${isPreview}`);
50-
console.log(`!isPreview: ${!isPreview}`);
51-
5219
return Promise.resolve(
5320
!isSignedIn &&
5421
!hasUserDismissedGate(currentTest.variant, currentTest.name) &&

dotcom-rendering/src/components/SignInGateSelector.importable.tsx

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -372,15 +372,6 @@ const decideShowDefaultGate = (): ShowGateValues => {
372372
return undefined;
373373
};
374374

375-
const decideShouldEnforceLocalLogic = (): boolean => {
376-
// July 31st
377-
// SignIn gate behavior investigation
378-
379-
const params = new URLSearchParams(window.location.search);
380-
const value: string | null = params.get('localgatelogic');
381-
return value === 'true';
382-
};
383-
384375
const buildAuxiaGateDisplayData = async (
385376
contributionsServiceUrl: string,
386377
pageId: string,
@@ -397,14 +388,9 @@ const buildAuxiaGateDisplayData = async (
397388
const readerPersonalData = await decideAuxiaProxyReaderPersonalData();
398389
const tagIds = tags.map((tag) => tag.id);
399390

400-
let mvtId = readerPersonalData.mvtId;
401-
if (decideShouldEnforceLocalLogic()) {
402-
mvtId = 350001; // to be outside the Auxia share of the Audience
403-
}
404-
405391
let should_show_legacy_gate_tmp;
406392

407-
if (!decideShouldEnforceLocalLogic() && isAuxiaAudience) {
393+
if (isAuxiaAudience) {
408394
should_show_legacy_gate_tmp = false;
409395
// The actual value is irrelevant in this case, but we have the convention to set it to false here
410396
} else {
@@ -439,7 +425,7 @@ const buildAuxiaGateDisplayData = async (
439425
tagIds,
440426
gateDismissCount,
441427
readerPersonalData.countryCode,
442-
mvtId,
428+
readerPersonalData.mvtId,
443429
should_show_legacy_gate_tmp,
444430
readerPersonalData.hasConsented,
445431
shouldServeDismissible,

0 commit comments

Comments
 (0)