Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions ab-testing/config/abTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,6 @@ const ABTests: ABTest[] = [
groups: ["control", "variant"],
shouldForceMetricsCollection: true,
},
{
name: "thefilter-product-element",
description:
"A hold back test to measure uplift of the product element",
owners: ["[email protected]"],
status: "ON",
expirationDate: "2025-12-30",
type: "server",
audienceSize: 40 / 100,
groups: ["control", "variant"],
shouldForceMetricsCollection: false,
},
{
name: "commercial-user-module-uid2",
description:
Expand Down
17 changes: 2 additions & 15 deletions dotcom-rendering/src/components/ProductElement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import type { ReactNode } from 'react';
import type { ArticleFormat } from '../lib/articleFormat';
import { parseHtml } from '../lib/domUtils';
import type { NestedArticleElement } from '../lib/renderElement';
import { useBetaAB } from '../lib/useAB';
import type { ProductBlockElement } from '../types/content';
import { ProductCardInline } from './ProductCardInline';
import { ProductCardLeftCol } from './ProductCardLeftCol';
Expand Down Expand Up @@ -40,32 +39,20 @@ export const ProductElement = ({
format: ArticleFormat;
shouldShowLeftColCard: boolean;
}) => {
const abTests = useBetaAB();
const isInHoldBackTestVariant =
abTests?.isUserInTestGroup('thefilter-product-element', 'variant') ??
false;

const showContent =
product.displayType === 'InlineOnly' ||
product.displayType === 'InlineWithProductCard';
// In the hold back test variant, if the product element has a display type of ProductCardOnly,
// we should still render the product card. This is because there may not be any suitable
// nested content to render, which could result in some unintended display issues. For the
// InlineWithProductCard display type, we won't render the cards in the hold back test.
const showProductCard =
product.displayType === 'ProductCardOnly' ||
(!isInHoldBackTestVariant &&
product.displayType === 'InlineWithProductCard');
product.displayType === 'InlineWithProductCard';
return (
<>
{showContent && (
<Content
product={product}
format={format}
ArticleElementComponent={ArticleElementComponent}
shouldShowLeftColCard={
shouldShowLeftColCard && !isInHoldBackTestVariant
}
shouldShowLeftColCard={shouldShowLeftColCard}
/>
)}
{showProductCard && (
Expand Down
Loading