From 61cd724c6f852c85451f1c776f896ae46b3a85ff Mon Sep 17 00:00:00 2001 From: Shivam Kumar Date: Wed, 24 Dec 2025 08:41:48 +0530 Subject: [PATCH 1/4] SCAL-288542-2 Update VersionIframe to include pageid in pathname --- src/components/VersionIframe/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/VersionIframe/index.tsx b/src/components/VersionIframe/index.tsx index 8f86acca5..b90d899e3 100644 --- a/src/components/VersionIframe/index.tsx +++ b/src/components/VersionIframe/index.tsx @@ -21,6 +21,7 @@ const VersionIframe: React.FC = ({ const mainUrlParams = new URLSearchParams(window.location.search); if (mainUrlParams.has('pageid')) { url.searchParams.set('pageid', mainUrlParams.get('pageid')); + url.pathname += `${mainUrlParams.get('pageid')}/`; } else if (mainUrlParams.has('pageId')) { url.searchParams.set('pageid', mainUrlParams.get('pageId')); } From 6ab58425d1679183cb75fff7ecc54d0e63b94d82 Mon Sep 17 00:00:00 2001 From: Shivam Kumar Date: Wed, 24 Dec 2025 10:21:47 +0530 Subject: [PATCH 2/4] SCAL-288542-2 Enhance VersionIframe pathname construction for pageid handling --- src/components/VersionIframe/index.tsx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/components/VersionIframe/index.tsx b/src/components/VersionIframe/index.tsx index b90d899e3..1925c9f5c 100644 --- a/src/components/VersionIframe/index.tsx +++ b/src/components/VersionIframe/index.tsx @@ -21,7 +21,23 @@ const VersionIframe: React.FC = ({ const mainUrlParams = new URLSearchParams(window.location.search); if (mainUrlParams.has('pageid')) { url.searchParams.set('pageid', mainUrlParams.get('pageid')); - url.pathname += `${mainUrlParams.get('pageid')}/`; + const pageId = mainUrlParams.get('pageid'); + if (pageId === 'graphql-play-ground') { + // Edge case for graphql-play-ground page + url.pathname = 'docs/graphql-play-ground/'; + } else { + const pageIdSplit = pageId.split('__'); + if (pageIdSplit.length > 1) { + // Tutorials module pages have pageids like {subdirectory}_{real_url_ending}, must be split to generate matching URL + const completePath = `tutorials/${pageIdSplit.join( + '/', + )}/`; + url.pathname += completePath; + } else { + // Other pages are not tutorials with subdirectories, so just add the pageid + url.pathname += `${pageId}/`; + } + } } else if (mainUrlParams.has('pageId')) { url.searchParams.set('pageid', mainUrlParams.get('pageId')); } From 30635fc7c7bf9839e70269d1cb244fcfbe1886b8 Mon Sep 17 00:00:00 2001 From: Shivam Kumar Date: Wed, 24 Dec 2025 10:55:53 +0530 Subject: [PATCH 3/4] SCAL-288542-2 added comments --- src/components/VersionIframe/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/VersionIframe/index.tsx b/src/components/VersionIframe/index.tsx index 1925c9f5c..6dc73a3d5 100644 --- a/src/components/VersionIframe/index.tsx +++ b/src/components/VersionIframe/index.tsx @@ -23,7 +23,7 @@ const VersionIframe: React.FC = ({ url.searchParams.set('pageid', mainUrlParams.get('pageid')); const pageId = mainUrlParams.get('pageid'); if (pageId === 'graphql-play-ground') { - // Edge case for graphql-play-ground page + // Edge case for graphql-play-ground page, Redirect to released version of the page url.pathname = 'docs/graphql-play-ground/'; } else { const pageIdSplit = pageId.split('__'); From 5176000ff9f95cd9ccf66d65b50ccdeb3e8a8fd5 Mon Sep 17 00:00:00 2001 From: Shivam Kumar Date: Thu, 25 Dec 2025 21:21:58 +0530 Subject: [PATCH 4/4] SCAL-288542-2 removed the extra logic of playground redirect --- src/components/VersionIframe/index.tsx | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/components/VersionIframe/index.tsx b/src/components/VersionIframe/index.tsx index 6dc73a3d5..fa818aaae 100644 --- a/src/components/VersionIframe/index.tsx +++ b/src/components/VersionIframe/index.tsx @@ -22,21 +22,14 @@ const VersionIframe: React.FC = ({ if (mainUrlParams.has('pageid')) { url.searchParams.set('pageid', mainUrlParams.get('pageid')); const pageId = mainUrlParams.get('pageid'); - if (pageId === 'graphql-play-ground') { - // Edge case for graphql-play-ground page, Redirect to released version of the page - url.pathname = 'docs/graphql-play-ground/'; + const pageIdSplit = pageId.split('__'); + if (pageIdSplit.length > 1) { + // Tutorials module pages have pageids like {subdirectory}_{real_url_ending}, must be split to generate matching URL + const completePath = `tutorials/${pageIdSplit.join('/')}/`; + url.pathname += completePath; } else { - const pageIdSplit = pageId.split('__'); - if (pageIdSplit.length > 1) { - // Tutorials module pages have pageids like {subdirectory}_{real_url_ending}, must be split to generate matching URL - const completePath = `tutorials/${pageIdSplit.join( - '/', - )}/`; - url.pathname += completePath; - } else { - // Other pages are not tutorials with subdirectories, so just add the pageid - url.pathname += `${pageId}/`; - } + // Other pages are not tutorials with subdirectories, so just add the pageid + url.pathname += `${pageId}/`; } } else if (mainUrlParams.has('pageId')) { url.searchParams.set('pageid', mainUrlParams.get('pageId'));