From 37293fb99731a6da0eb818d244215b3998395c05 Mon Sep 17 00:00:00 2001 From: Evan Bonsignori Date: Wed, 19 Nov 2025 13:51:12 -0800 Subject: [PATCH] [Go live] Turn on new landing pages and turn off feature flag code (#58135) --- src/frame/middleware/context/generic-toc.ts | 21 +++------------------ src/landings/pages/product.tsx | 10 +++------- 2 files changed, 6 insertions(+), 25 deletions(-) diff --git a/src/frame/middleware/context/generic-toc.ts b/src/frame/middleware/context/generic-toc.ts index 1c110f1144..7d5bf55da1 100644 --- a/src/frame/middleware/context/generic-toc.ts +++ b/src/frame/middleware/context/generic-toc.ts @@ -12,15 +12,6 @@ function isNewLandingPage(currentLayoutName: string): boolean { ) } -// TODO: TEMP: This is a temporary solution to turn off/on new landing pages while we develop them. -function isNewLandingPageFeature(req: ExtendedRequest): boolean { - return ( - req.query?.feature === 'bespoke-landing' || - req.query?.feature === 'journey-landing' || - req.query?.feature === 'discovery-landing' - ) -} - // This module adds either flatTocItems or nestedTocItems to the context object for // product, category, and subcategory TOCs that don't have other layouts specified. // They are rendered by includes/generic-toc-flat.html or includes/generic-toc-nested.html. @@ -28,7 +19,6 @@ export default async function genericToc(req: ExtendedRequest, res: Response, ne if (!req.context) throw new Error('request not contextualized') if (!req.context.page) return next() if ( - !isNewLandingPageFeature(req) && req.context.currentLayoutName !== 'default' && !isNewLandingPage(req.context.currentLayoutName || '') ) @@ -106,8 +96,7 @@ export default async function genericToc(req: ExtendedRequest, res: Response, ne recurse: isRecursive, renderIntros, includeHidden, - textOnly: - isNewLandingPageFeature(req) || isNewLandingPage(req.context.currentLayoutName || ''), + textOnly: isNewLandingPage(req.context.currentLayoutName || ''), }) } @@ -117,13 +106,9 @@ export default async function genericToc(req: ExtendedRequest, res: Response, ne renderIntros = false req.context.genericTocNested = await getTocItems(treePage, req.context, { recurse: isRecursive, - renderIntros: - isNewLandingPageFeature(req) || isNewLandingPage(req.context.currentLayoutName || '') - ? true - : false, + renderIntros: isNewLandingPage(req.context.currentLayoutName || '') ? true : false, includeHidden, - textOnly: - isNewLandingPageFeature(req) || isNewLandingPage(req.context.currentLayoutName || ''), + textOnly: isNewLandingPage(req.context.currentLayoutName || ''), }) } diff --git a/src/landings/pages/product.tsx b/src/landings/pages/product.tsx index 07ffc9bd08..95ee8cf2fb 100644 --- a/src/landings/pages/product.tsx +++ b/src/landings/pages/product.tsx @@ -172,11 +172,10 @@ export const getServerSideProps: GetServerSideProps = async (context) => const additionalUINamespaces: string[] = [] // This looks a little funky, but it's so we only send one context's data to the client - // TODO: TEMP: This is a temporary solution to turn off/on new landing pages while we develop them - if (currentLayoutName === 'bespoke-landing' || req.query?.feature === 'bespoke-landing') { + if (currentLayoutName === 'bespoke-landing') { props.bespokeContext = await getLandingContextFromRequest(req, 'bespoke') additionalUINamespaces.push('product_landing') - } else if (currentLayoutName === 'journey-landing' || req.query?.feature === 'journey-landing') { + } else if (currentLayoutName === 'journey-landing') { props.journeyContext = await getLandingContextFromRequest(req, 'journey') // journey tracks are resolved in middleware and added to the request @@ -186,10 +185,7 @@ export const getServerSideProps: GetServerSideProps = async (context) => } additionalUINamespaces.push('journey_landing', 'product_landing') - } else if ( - currentLayoutName === 'discovery-landing' || - req?.query?.feature === 'discovery-landing' - ) { + } else if (currentLayoutName === 'discovery-landing') { props.discoveryContext = await getLandingContextFromRequest(req, 'discovery') additionalUINamespaces.push('product_landing') } else if (currentLayoutName === 'product-landing') {