From e758fc9215ea32890183ddc9c02a6c2a77dcd5a1 Mon Sep 17 00:00:00 2001 From: Raffaele Farinaro Date: Thu, 21 May 2026 11:18:14 +0200 Subject: [PATCH 01/18] Add fallback variant to SkillsCallout --- src/components/SkillsCallout/index.tsx | 57 +++++++++++++++++++++----- 1 file changed, 46 insertions(+), 11 deletions(-) diff --git a/src/components/SkillsCallout/index.tsx b/src/components/SkillsCallout/index.tsx index df01410a..ea4638d7 100644 --- a/src/components/SkillsCallout/index.tsx +++ b/src/components/SkillsCallout/index.tsx @@ -10,7 +10,7 @@ import styles from './styles.module.css'; interface SkillsCalloutProps { product?: string; framework?: string; - variant?: 'product' | 'shared'; + variant?: 'product' | 'shared' | 'fallback'; banner?: boolean; } @@ -68,6 +68,30 @@ function getSharedMoreInfoUrl(search: string): string { return `/sdks/${path}/agent-skills`; } +interface SharedBodyProps { + sharedFrameworkSlug: string; + sharedMoreInfoUrl: string; +} + +const SharedBody: React.FC = ({ + sharedFrameworkSlug, + sharedMoreInfoUrl, +}) => ( + <> +

+ Install our {skillsData.shared} skill so your coding + agent can answer questions about Scandit products and recommend + the right one for your use case, directly from your editor.{' '} + More info → +

+ + +); + const SkillsCallout: React.FC = ({ product, framework, variant = 'product', banner = false }) => { const { pathname, search } = useLocation(); @@ -81,22 +105,33 @@ const SkillsCallout: React.FC = ({ product, framework, varia ); } + if (variant === 'fallback') { + const sharedFrameworkSlug = getSharedFrameworkSlug(search); + const sharedMoreInfoUrl = getSharedMoreInfoUrl(search); + return ( +
+ + Not sure which Scandit product fits your use case? + +
+ +
+
+ ); + } + const route = parseSdksRoute(pathname); const resolvedProduct = product || route.product; const resolvedFramework = framework || route.framework; From 40c9c528a7518edc73626ec01adf1173a94b2496 Mon Sep 17 00:00:00 2001 From: Raffaele Farinaro Date: Thu, 21 May 2026 11:20:44 +0200 Subject: [PATCH 02/18] Dedupe shared/fallback derivations and heading literal --- src/components/SkillsCallout/index.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/components/SkillsCallout/index.tsx b/src/components/SkillsCallout/index.tsx index ea4638d7..1374b984 100644 --- a/src/components/SkillsCallout/index.tsx +++ b/src/components/SkillsCallout/index.tsx @@ -7,6 +7,9 @@ import { parseSdksRoute } from '../utils/frameworks'; import InstallTabs from './InstallTabs'; import styles from './styles.module.css'; +const PRODUCT_DISAMBIGUATION_HEADING = + 'Not sure which Scandit product fits your use case?'; + interface SkillsCalloutProps { product?: string; framework?: string; @@ -97,14 +100,14 @@ const SkillsCallout: React.FC = ({ product, framework, varia const calloutClass = banner ? `${styles.callout} ${styles.banner}` : styles.callout; const contentClass = banner ? styles.bannerContent : undefined; + const sharedFrameworkSlug = getSharedFrameworkSlug(search); + const sharedMoreInfoUrl = getSharedMoreInfoUrl(search); if (variant === 'shared') { - const sharedFrameworkSlug = getSharedFrameworkSlug(search); - const sharedMoreInfoUrl = getSharedMoreInfoUrl(search); return (