Skip to content
This repository has been archived by the owner on Feb 21, 2025. It is now read-only.

HubSpot Master Forms #5483

Merged
merged 51 commits into from
Jul 22, 2022
Merged
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
4bbbc68
capture user landing source
bretthayes Jun 8, 2022
d2b6929
Merge branch 'main' into brett/hs-master-forms
bretthayes Jun 9, 2022
16041ae
master form IDs
bretthayes Jun 9, 2022
2bdc827
Merge branch 'main' into brett/hs-master-forms
bretthayes Jun 14, 2022
4dd05b4
convert hook to component
bretthayes Jun 14, 2022
835eb7d
gated layout api changes
bretthayes Jun 14, 2022
bbd64e5
consolidate forms
bretthayes Jun 14, 2022
e14cafb
prettier
bretthayes Jun 14, 2022
80359fd
rename component
bretthayes Jun 14, 2022
91d23ad
deprecate HubSpotEmbed for the new HubSpotForm
bretthayes Jun 15, 2022
f7d92ba
migrate talk to a developer page from info.sg
bretthayes Jun 15, 2022
d8ef8c0
consolidate contact pages into one layout
bretthayes Jun 15, 2022
0890647
prettier
bretthayes Jun 15, 2022
3a1c99c
cleanup and fix broken links on old pages
bretthayes Jun 15, 2022
ae550e6
Merge branch 'main' into brett/hs-master-forms
bretthayes Jun 15, 2022
c769a95
merge conflict fixes for new API changes
bretthayes Jun 15, 2022
5fe4624
prettier
bretthayes Jun 15, 2022
a6bacc0
populate hidden form fields
bretthayes Jun 16, 2022
1857bef
simplify import/export
bretthayes Jun 21, 2022
f2fea13
convert ChiliPiper hook to prop
bretthayes Jun 21, 2022
b02a7b6
cleanup and documentation
bretthayes Jun 21, 2022
752efe8
Merge branch 'main' into brett/hs-master-forms
bretthayes Jun 22, 2022
34bf3a5
merge conflict follow up fixes
bretthayes Jun 22, 2022
0741566
deprecate form legal
bretthayes Jun 22, 2022
24ed877
Update HubSpot syntax on Vulnerabilities gated page (#5507)
zlonko Jun 23, 2022
120c484
docs
bretthayes Jun 28, 2022
f53b58a
lowercase
bretthayes Jun 28, 2022
0bfd974
async load scripts
bretthayes Jun 28, 2022
1a0ab36
Merge branch 'main' into brett/hs-master-forms
bretthayes Jun 29, 2022
d7c0fbd
deprecate request-demo and redirect to demo
bretthayes Jun 29, 2022
0f89694
master form for hackathons and sub-processors
bretthayes Jun 29, 2022
c56542f
master form name change
bretthayes Jun 29, 2022
6ba6f21
optimizations and UTM param fix for #5488
bretthayes Jun 29, 2022
a72906c
prettier
bretthayes Jun 29, 2022
662efea
deprecate talk to a dev
bretthayes Jun 30, 2022
21a7032
inline message with generic response
bretthayes Jun 30, 2022
3f3f1fb
updates for meta and form submission messages
bretthayes Jul 6, 2022
5cf8eb3
title
bretthayes Jul 6, 2022
27f0e39
Merge branch 'main' into brett/hs-master-forms
bretthayes Jul 7, 2022
b0b1f89
title style for SEO improvement
bretthayes Jul 7, 2022
f4c1ccf
Merge branch 'main' into brett/hs-master-forms
bretthayes Jul 7, 2022
432b60e
prettier/merge conflict fix
bretthayes Jul 7, 2022
a7ba8a7
bug fix to prevent dupe ChiliPiper scheduler
bretthayes Jul 7, 2022
0d3cf64
rm code change contact page and redirect to /demo
bretthayes Jul 8, 2022
be5ef80
pathname for form submission source and bug fix
bretthayes Jul 19, 2022
58d719a
prettier
bretthayes Jul 19, 2022
40f2335
Merge branch 'main' into brett/hs-master-forms
bretthayes Jul 19, 2022
845aa55
use landing source as fallback if no sgSourceUrl
bretthayes Jul 19, 2022
0134b0f
use href for more accuracy and insight
bretthayes Jul 19, 2022
cd32e56
Merge branch 'main' into brett/hs-master-forms
bretthayes Jul 21, 2022
a4e4401
prettier
bretthayes Jul 21, 2022
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
Prev Previous commit
Next Next commit
consolidate contact pages into one layout
bretthayes committed Jun 15, 2022
commit d8ef8c00980b2b8fb3e905e190960b375de6b0af
2 changes: 1 addition & 1 deletion src/components/HubSpotForm.tsx
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ export interface CreateHubSpotFormProps {
onFormSubmitted?: () => void
}

interface HubSpotFormProps {
export interface HubSpotFormProps {
formId?: string
masterFormName?: 'demoMulti' | 'demoEmail' | 'gatedMulti' | 'gatedEmail'
onFormSubmitted?: () => void
1 change: 1 addition & 0 deletions src/components/index.ts
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@ export { ThreeUpText } from './ThreeUpText'
export { TrySourcegraph } from './TrySourcegraph'
export { Video } from './Video'
export { YouTube } from './YouTube'
export type { HubSpotFormProps } from './HubSpotForm'

// Actions
export {
63 changes: 63 additions & 0 deletions src/pages/contact/[...slug].tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import { GetStaticProps, GetStaticPaths, NextPage } from 'next'

import { Layout, CustomerLogos, HubSpotForm } from '@components'
import { useChiliPiper } from '@hooks'

import { slugs, slugData, ContactPageProps } from './data'

const ContactPage: NextPage<ContactPageProps> = ({
title,
description,
masterFormName,
formId,
}) => {
useChiliPiper()

return (
<Layout
minimal={true}
meta={{
title: `Sourcegraph - ${title}`,
description,
}}
>
<div className="bg-white text-dark">
<div className="container-xl py-5 px-5">
<div className="row">
<div className="col-md-6">
<h1 className="display-3 font-weight-bold">{title}</h1>
<h3 className="font-weight-light">{description}</h3>

<div className="mt-5">
<HubSpotForm masterFormName={masterFormName} formId={formId} />
</div>
</div>

<div className="col-md-6">
<CustomerLogos />
</div>
</div>
</div>
</div>
</Layout>
)
}

export default ContactPage

export const getStaticPaths: GetStaticPaths = () => {
if (!slugs) {
return { paths: [{ params: { slug: ['404'] } }], fallback: false }
}

const paths = slugs.map(slug => ({ params: { slug: slug.split('/') } }))

return {
paths,
fallback: false,
}
}

export const getStaticProps: GetStaticProps = ({ params }) => ({
props: params?.slug && slugData[params?.slug[0]] || {}
})
57 changes: 57 additions & 0 deletions src/pages/contact/data.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import { HubSpotFormProps } from '@components'

interface ContactPageProps extends HubSpotFormProps {
title: string
description: string
}

export type { ContactPageProps }

interface SlugDataProps {
[key: string]: ContactPageProps
}

export const slugData: SlugDataProps = {
'request-batch-changes-demo': {
title: 'Schedule a Batch Changes demo',
description: 'Learn how you can automate large-scale code changes with Sourcegraph Batch Changes.',
masterFormName: 'demoMulti',
},
'request-code-change-management-demo': {
title: 'Request a code change management demo',
description: 'We\'ll reach out to discuss a demo and to learn more about your needs.',
masterFormName: 'demoMulti',
},
'request-code-insights-demo': {
title: 'Schedule a Code Insights demo',
description: 'Learn how you can track and visualize trends in your entire codebase with Sourcegraph Code Insights.',
masterFormName: 'demoMulti',
},
'request-demo': {
title: 'Schedule a Sourcegraph demo',
description: 'To schedule a demo with a product specialist, tell us a bit about yourself.',
masterFormName: 'demoMulti',
},
'request-info': {
title: 'Contact us',
description: 'Talk with a product specialist to learn more about Sourcegraph.',
masterFormName: 'demoMulti',
},
'request-trial': {
title: 'Sign up for a free trial',
description: 'To start your free Sourcegraph trial, tell us a bit about yourself.',
masterFormName: 'demoMulti',
},
'talk-to-a-developer': {
title: 'Talk to a Developer',
description: 'Talk with a Sourcegraph engineer to get help with your installation.',
formId: '7e04d4f5-ce13-4125-b1d0-8f6015a520ca'
},
'team-pricing': {
title: 'Team Pricing',
description: 'Talk to a product specialist about upgrading to a Team plan.',
formId: '3fd1217b-2505-4bd7-8a21-70ceb6931cb3'
},
}

export const slugs: string[] = Object.keys(slugData)
41 changes: 0 additions & 41 deletions src/pages/contact/request-batch-changes-demo.tsx

This file was deleted.

40 changes: 0 additions & 40 deletions src/pages/contact/request-code-change-management-demo.tsx

This file was deleted.

42 changes: 0 additions & 42 deletions src/pages/contact/request-code-insights-demo.tsx

This file was deleted.

38 changes: 0 additions & 38 deletions src/pages/contact/request-demo.tsx

This file was deleted.

41 changes: 0 additions & 41 deletions src/pages/contact/request-info.tsx

This file was deleted.

39 changes: 0 additions & 39 deletions src/pages/contact/request-trial.tsx

This file was deleted.

40 changes: 0 additions & 40 deletions src/pages/contact/talk-to-a-developer.tsx

This file was deleted.