Skip to content

Commit 5fec617

Browse files
committed
feat(website): add Sim Search page for content review
1 parent f21bf92 commit 5fec617

20 files changed

Lines changed: 563 additions & 34 deletions

File tree

apps/sim/app/(landing)/components/footer/footer.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ const PRODUCT_LINKS: FooterItem[] = [
6363
{ label: 'Chat', href: 'https://docs.sim.ai/mothership', external: true },
6464
{ label: 'Workflows', href: '/workflows' },
6565
{ label: 'Knowledge Base', href: '/knowledge' },
66+
{ label: 'Sim Search', href: '/search' },
6667
{ label: 'Tables', href: '/tables' },
6768
{ label: 'Files', href: '/files' },
6869
{ label: 'Logs', href: '/logs' },

apps/sim/app/(landing)/components/hero-cta/hero-cta.tsx

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
'use client'
2+
3+
import { usePathname } from 'next/navigation'
14
import { LandingCtaLink, type LandingCtaSection } from '@/app/(landing)/components/landing-cta-link'
25
import { DEMO_HREF, SIGNUP_HREF } from '@/app/(landing)/constants'
36

@@ -18,6 +21,8 @@ export function HeroCta({
1821
secondaryLabel = 'Sign up',
1922
trackingSection,
2023
}: HeroCtaProps) {
24+
const demoOnly = usePathname() === '/search'
25+
2126
return (
2227
<div className='flex items-center gap-2 max-sm:w-full max-sm:flex-col max-sm:items-stretch'>
2328
<LandingCtaLink
@@ -28,15 +33,17 @@ export function HeroCta({
2833
>
2934
{DEMO_LABEL}
3035
</LandingCtaLink>
31-
<LandingCtaLink
32-
variant='outline'
33-
href={SIGNUP_HREF}
34-
prefetch={false}
35-
size={size}
36-
track={trackingSection && { label: secondaryLabel, section: trackingSection }}
37-
>
38-
{secondaryLabel}
39-
</LandingCtaLink>
36+
{!demoOnly && (
37+
<LandingCtaLink
38+
variant='outline'
39+
href={SIGNUP_HREF}
40+
prefetch={false}
41+
size={size}
42+
track={trackingSection && { label: secondaryLabel, section: trackingSection }}
43+
>
44+
{secondaryLabel}
45+
</LandingCtaLink>
46+
)}
4047
</div>
4148
)
4249
}

apps/sim/app/(landing)/components/navbar/components/nav-menu-chip/components/nav-menu-preview/components/files-menu-preview/files-menu-preview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
} from '@/app/(landing)/components/navbar/components/nav-menu-chip/components/nav-menu-preview/components/menu-preview-header/menu-preview-header'
99

1010
interface FilesMenuPreviewProps {
11-
layout?: 'menu' | 'hero'
11+
layout?: 'menu' | 'hero' | 'feature'
1212
}
1313

1414
const FILES = [

apps/sim/app/(landing)/components/navbar/components/nav-menu-chip/components/nav-menu-preview/components/menu-preview-frame/menu-preview-frame.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ interface MenuPreviewFrameProps {
88
children: ReactNode
99
/** Opt in only when a preview contains real hover or keyboard interaction. */
1010
interactive?: boolean
11-
layout?: 'menu' | 'hero'
11+
layout?: 'menu' | 'hero' | 'feature'
1212
}
1313

1414
/** Navigation crops and open hero stages share the same product UI and edge treatment. */
@@ -18,7 +18,7 @@ export function MenuPreviewFrame({
1818
interactive = false,
1919
layout = 'menu',
2020
}: MenuPreviewFrameProps) {
21-
const isHero = layout === 'hero'
21+
const isHero = layout !== 'menu'
2222

2323
return (
2424
<div
@@ -32,9 +32,11 @@ export function MenuPreviewFrame({
3232
>
3333
<div
3434
className={cn(
35-
isHero
36-
? '-translate-x-1/2 absolute top-20 @max-[640px]:left-6 left-1/2 w-max @max-[640px]:translate-x-0 max-sm:top-6'
37-
: 'relative w-[640px] origin-top-left p-10 [scale:min(1,tan(atan2(100cqw,640px)))]'
35+
layout === 'feature'
36+
? '-translate-x-1/2 absolute top-10 left-1/2 w-[720px] origin-top px-[30px] [scale:min(1,tan(atan2(100cqw,720px)))] max-sm:top-6'
37+
: isHero
38+
? '-translate-x-1/2 absolute top-20 @max-[640px]:left-6 left-1/2 w-max @max-[640px]:translate-x-0 max-sm:top-6'
39+
: 'relative w-[640px] origin-top-left p-10 [scale:min(1,tan(atan2(100cqw,640px)))]'
3840
)}
3941
>
4042
{children}

apps/sim/app/(landing)/components/navbar/components/nav-menu-chip/components/nav-menu-preview/nav-menu-preview.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import type {
1616
NavMenuItemData,
1717
NavMenuPreviewKind,
1818
} from '@/app/(landing)/components/navbar/components/nav-menu-chip/types'
19+
import { SearchPreview } from '@/app/(landing)/search/components/search-preview'
1920

2021
interface NavMenuPreviewProps {
2122
item: NavMenuItemData
@@ -96,6 +97,8 @@ function PreviewGraphic({ kind, details }: ProductGraphicProps) {
9697
return <EnterpriseMenuPreview />
9798
case 'team':
9899
return <TeamGraphic details={details} />
100+
case 'search':
101+
return <SearchPreview />
99102
case 'resource':
100103
return <ResourceGraphic details={details} />
101104
}

apps/sim/app/(landing)/components/navbar/components/nav-menu-chip/constants.ts

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,6 @@ export const PLATFORM_MENU: NavMenu = {
5252
details: ['Trigger', 'Agent', 'Action'],
5353
},
5454
},
55-
],
56-
},
57-
{
58-
label: 'Operations and control',
59-
items: [
6055
{
6156
brand: 'Sim',
6257
title: 'Knowledge Base',
@@ -69,6 +64,23 @@ export const PLATFORM_MENU: NavMenu = {
6964
details: ['Notion', 'Google Drive', 'Confluence'],
7065
},
7166
},
67+
],
68+
},
69+
{
70+
label: 'Operations and control',
71+
items: [
72+
{
73+
brand: 'Sim',
74+
title: 'Search',
75+
description: 'Ask questions and find company content. Available with Sim Enterprise.',
76+
href: '/search',
77+
preview: {
78+
kind: 'search',
79+
eyebrow: 'Sim Enterprise',
80+
title: 'Your company’s knowledge. One place to ask.',
81+
details: ['Ask Sim', 'Find files', 'Explore company context'],
82+
},
83+
},
7284
{
7385
brand: 'Sim',
7486
title: 'Files',

apps/sim/app/(landing)/components/navbar/components/nav-menu-chip/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export type NavMenuPreviewKind =
1111
| 'knowledge'
1212
| 'logs'
1313
| 'resource'
14+
| 'search'
1415
| 'tables'
1516
| 'team'
1617
| 'workflows'

apps/sim/app/(landing)/components/navbar/components/navbar-auth-pill/navbar-auth-pill.tsx

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
'use client'
2+
13
import { cn } from '@sim/emcn'
24
import Link from 'next/link'
5+
import { usePathname } from 'next/navigation'
36
import { LOGIN_HREF, SIGNUP_HREF } from '@/app/(landing)/constants'
47

58
interface NavbarAuthPillProps {
@@ -13,6 +16,7 @@ const SEGMENT_CLASSES =
1316

1417
/** Two independent account links share one pill and a short inset divider. */
1518
export function NavbarAuthPill({ size = 'compact', className, onNavigate }: NavbarAuthPillProps) {
19+
const demoOnly = usePathname() === '/search'
1620
const compact = size === 'compact'
1721

1822
return (
@@ -29,22 +33,33 @@ export function NavbarAuthPill({ size = 'compact', className, onNavigate }: Navb
2933
href={LOGIN_HREF}
3034
prefetch={false}
3135
onClick={onNavigate}
32-
className={cn(SEGMENT_CLASSES, 'rounded-l-full', compact ? 'px-3' : 'flex-auto px-2')}
36+
className={cn(
37+
SEGMENT_CLASSES,
38+
demoOnly ? 'rounded-full' : 'rounded-l-full',
39+
compact ? 'px-3' : 'flex-auto px-2'
40+
)}
3341
>
3442
Log in
3543
</Link>
36-
<span
37-
aria-hidden='true'
38-
className={cn('w-px shrink-0 self-center bg-[var(--border)]', compact ? 'h-3' : 'h-3.5')}
39-
/>
40-
<Link
41-
href={SIGNUP_HREF}
42-
prefetch={false}
43-
onClick={onNavigate}
44-
className={cn(SEGMENT_CLASSES, 'rounded-r-full', compact ? 'px-3' : 'flex-auto px-2')}
45-
>
46-
Start building
47-
</Link>
44+
{!demoOnly && (
45+
<>
46+
<span
47+
aria-hidden='true'
48+
className={cn(
49+
'w-px shrink-0 self-center bg-[var(--border)]',
50+
compact ? 'h-3' : 'h-3.5'
51+
)}
52+
/>
53+
<Link
54+
href={SIGNUP_HREF}
55+
prefetch={false}
56+
onClick={onNavigate}
57+
className={cn(SEGMENT_CLASSES, 'rounded-r-full', compact ? 'px-3' : 'flex-auto px-2')}
58+
>
59+
Start building
60+
</Link>
61+
</>
62+
)}
4863
</div>
4964
)
5065
}

apps/sim/app/(landing)/components/solutions-page/components/solutions-product-page/components/product-feature/product-feature.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export function ProductFeature({ feature }: ProductFeatureProps) {
1616
>
1717
<div
1818
aria-hidden='true'
19-
inert
19+
inert={!feature.allowPreviewHover}
2020
data-product-feature-visual={feature.id}
2121
className='pointer-events-none relative isolate h-[460px] select-none overflow-hidden [container-type:inline-size] max-sm:h-[380px] max-xl:h-[420px]'
2222
>

apps/sim/app/(landing)/components/solutions-page/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ export interface SolutionsProductFeatureConfig {
144144
description: string
145145
visual: ReactNode
146146
visualSize?: 'default' | 'compact'
147+
/** Allow pointer hover on decorative previews with non-focusable tooltip triggers. */
148+
allowPreviewHover?: boolean
147149
cta?: SolutionsPillCta
148150
}
149151

0 commit comments

Comments
 (0)