From 7afc5076e3affe929b5e614c5843dca97edea591 Mon Sep 17 00:00:00 2001 From: Tim Sankara Date: Fri, 24 Jan 2025 00:34:18 +0300 Subject: [PATCH 01/12] Add V1 of the carrerCallout component --- .../src/components/careers/CareersCallout.tsx | 19 +++++++++++++++++++ apps/website-25/src/pages/about.tsx | 2 ++ 2 files changed, 21 insertions(+) create mode 100644 apps/website-25/src/components/careers/CareersCallout.tsx diff --git a/apps/website-25/src/components/careers/CareersCallout.tsx b/apps/website-25/src/components/careers/CareersCallout.tsx new file mode 100644 index 0000000..c868797 --- /dev/null +++ b/apps/website-25/src/components/careers/CareersCallout.tsx @@ -0,0 +1,19 @@ +import React from 'react'; +import { CTAButton } from '@bluedot/ui'; + +const Callout: React.FC = () => { + const title = 'Join us in our mission to ensure humanity safely navigates the transition to transformative AI.'; + const ctaLabel = 'View our careers'; + const ctaLink = '/careers'; + + return ( +
+

{title}

+ window.open(ctaLink, '_blank')} withChevron> + {ctaLabel} + +
+ ); +}; + +export default Callout; diff --git a/apps/website-25/src/pages/about.tsx b/apps/website-25/src/pages/about.tsx index 6799f32..057c11d 100644 --- a/apps/website-25/src/pages/about.tsx +++ b/apps/website-25/src/pages/about.tsx @@ -4,6 +4,7 @@ import { import IntroSection from '../components/about/IntroSection'; import HistorySection from '../components/about/HistorySection'; import TeamSection from '../components/about/TeamSection'; +import CareersCallout from '../components/careers/CareersCallout'; const AboutPage = () => { return ( @@ -14,6 +15,7 @@ const AboutPage = () => { + ); }; From 5564cf2d7f37f8f30e58647d4cae218efdfcdcd4 Mon Sep 17 00:00:00 2001 From: Tim Sankara Date: Fri, 24 Jan 2025 08:30:30 +0300 Subject: [PATCH 02/12] Update bg gradient on CareerCallout component --- apps/website-25/src/components/careers/CareersCallout.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/website-25/src/components/careers/CareersCallout.tsx b/apps/website-25/src/components/careers/CareersCallout.tsx index c868797..840605c 100644 --- a/apps/website-25/src/components/careers/CareersCallout.tsx +++ b/apps/website-25/src/components/careers/CareersCallout.tsx @@ -7,7 +7,7 @@ const Callout: React.FC = () => { const ctaLink = '/careers'; return ( -
+

{title}

window.open(ctaLink, '_blank')} withChevron> {ctaLabel} From cd29975ea75c3e74ad92f61229877495aa736e14 Mon Sep 17 00:00:00 2001 From: Tim Sankara Date: Fri, 24 Jan 2025 08:53:16 +0300 Subject: [PATCH 03/12] Add tests --- .../components/careers/CareerCallout.test.tsx | 10 ++++++ .../__snapshots__/CareerCallout.test.tsx.snap | 35 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 apps/website-25/src/components/careers/CareerCallout.test.tsx create mode 100644 apps/website-25/src/components/careers/__snapshots__/CareerCallout.test.tsx.snap diff --git a/apps/website-25/src/components/careers/CareerCallout.test.tsx b/apps/website-25/src/components/careers/CareerCallout.test.tsx new file mode 100644 index 0000000..8db11ba --- /dev/null +++ b/apps/website-25/src/components/careers/CareerCallout.test.tsx @@ -0,0 +1,10 @@ +import { render } from '@testing-library/react'; +import { describe, expect, test } from 'vitest'; +import Callout from './CareersCallout'; + +describe('Callout', () => { + test('renders default as expected', () => { + const { container } = render(); + expect(container).toMatchSnapshot(); + }); +}); diff --git a/apps/website-25/src/components/careers/__snapshots__/CareerCallout.test.tsx.snap b/apps/website-25/src/components/careers/__snapshots__/CareerCallout.test.tsx.snap new file mode 100644 index 0000000..7d442b2 --- /dev/null +++ b/apps/website-25/src/components/careers/__snapshots__/CareerCallout.test.tsx.snap @@ -0,0 +1,35 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`Callout > renders default as expected 1`] = ` +
+
+

+ Join us in our mission to ensure humanity safely navigates the transition to transformative AI. +

+ +
+
+`; From 839582e2ed7da131bfd0b8ca8c1ad1b8c2102590 Mon Sep 17 00:00:00 2001 From: Tim Sankara Date: Fri, 24 Jan 2025 09:00:25 +0300 Subject: [PATCH 04/12] Align CareersCallout component with BEM naming --- .../src/components/careers/CareersCallout.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/website-25/src/components/careers/CareersCallout.tsx b/apps/website-25/src/components/careers/CareersCallout.tsx index 840605c..17c23ec 100644 --- a/apps/website-25/src/components/careers/CareersCallout.tsx +++ b/apps/website-25/src/components/careers/CareersCallout.tsx @@ -7,9 +7,14 @@ const Callout: React.FC = () => { const ctaLink = '/careers'; return ( -
-

{title}

- window.open(ctaLink, '_blank')} withChevron> +
+

{title}

+ window.open(ctaLink, '_blank')} + withChevron + className="callout__cta" + > {ctaLabel}
From 1ba392627b024d1f0a0da9e815003785e4903f2a Mon Sep 17 00:00:00 2001 From: Tim Sankara Date: Fri, 24 Jan 2025 09:11:54 +0300 Subject: [PATCH 05/12] Fix test --- .../careers/__snapshots__/CareerCallout.test.tsx.snap | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/website-25/src/components/careers/__snapshots__/CareerCallout.test.tsx.snap b/apps/website-25/src/components/careers/__snapshots__/CareerCallout.test.tsx.snap index 7d442b2..017a358 100644 --- a/apps/website-25/src/components/careers/__snapshots__/CareerCallout.test.tsx.snap +++ b/apps/website-25/src/components/careers/__snapshots__/CareerCallout.test.tsx.snap @@ -3,15 +3,15 @@ exports[`Callout > renders default as expected 1`] = `

Join us in our mission to ensure humanity safely navigates the transition to transformative AI.

); }; From cd4be97ffcdbb2928e33a2f65f7b8620f3ce35bc Mon Sep 17 00:00:00 2001 From: Tim Sankara Date: Fri, 24 Jan 2025 16:02:15 +0300 Subject: [PATCH 07/12] Update apps/website-25/src/components/careers/CareersCallout.tsx Co-authored-by: tarinrickett --- apps/website-25/src/components/careers/CareersCallout.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/website-25/src/components/careers/CareersCallout.tsx b/apps/website-25/src/components/careers/CareersCallout.tsx index 17c23ec..f4d6264 100644 --- a/apps/website-25/src/components/careers/CareersCallout.tsx +++ b/apps/website-25/src/components/careers/CareersCallout.tsx @@ -11,7 +11,7 @@ const Callout: React.FC = () => {

{title}

window.open(ctaLink, '_blank')} + url={ctaLink} withChevron className="callout__cta" > From 48816fa8814e83027e0189de082809b7974cb95c Mon Sep 17 00:00:00 2001 From: Tim Sankara Date: Fri, 24 Jan 2025 16:02:53 +0300 Subject: [PATCH 08/12] Update apps/website-25/src/components/careers/CareersCallout.tsx Co-authored-by: tarinrickett --- apps/website-25/src/components/careers/CareersCallout.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/website-25/src/components/careers/CareersCallout.tsx b/apps/website-25/src/components/careers/CareersCallout.tsx index f4d6264..75df2fc 100644 --- a/apps/website-25/src/components/careers/CareersCallout.tsx +++ b/apps/website-25/src/components/careers/CareersCallout.tsx @@ -8,7 +8,7 @@ const Callout: React.FC = () => { return (
-

{title}

+

{title}

Date: Fri, 24 Jan 2025 16:03:13 +0300 Subject: [PATCH 09/12] Update apps/website-25/src/components/careers/CareersCallout.tsx Co-authored-by: tarinrickett --- apps/website-25/src/components/careers/CareersCallout.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/website-25/src/components/careers/CareersCallout.tsx b/apps/website-25/src/components/careers/CareersCallout.tsx index 75df2fc..e9b77d2 100644 --- a/apps/website-25/src/components/careers/CareersCallout.tsx +++ b/apps/website-25/src/components/careers/CareersCallout.tsx @@ -7,7 +7,7 @@ const Callout: React.FC = () => { const ctaLink = '/careers'; return ( -
+

{title}

Date: Sat, 25 Jan 2025 00:09:57 +0300 Subject: [PATCH 10/12] Update tests --- .../careers/__snapshots__/CareerCallout.test.tsx.snap | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/website-25/src/components/careers/__snapshots__/CareerCallout.test.tsx.snap b/apps/website-25/src/components/careers/__snapshots__/CareerCallout.test.tsx.snap index 017a358..b03cabd 100644 --- a/apps/website-25/src/components/careers/__snapshots__/CareerCallout.test.tsx.snap +++ b/apps/website-25/src/components/careers/__snapshots__/CareerCallout.test.tsx.snap @@ -3,10 +3,10 @@ exports[`Callout > renders default as expected 1`] = `

Join us in our mission to ensure humanity safely navigates the transition to transformative AI.

@@ -14,6 +14,7 @@ exports[`Callout > renders default as expected 1`] = ` class="cta-button flex items-center justify-center rounded-lg transition-all duration-200 font-semibold text-base cta-button--primary bg-bluedot-normal text-white hover:bg-bluedot-normal px-4 py-2 callout__cta" data-testid="cta-button" type="button" + url="/careers" > Date: Sat, 25 Jan 2025 00:22:03 +0300 Subject: [PATCH 11/12] Remove link from CareersCallout --- apps/website-25/next-env.d.ts | 2 +- apps/website-25/src/components/careers/CareersCallout.tsx | 2 -- .../careers/__snapshots__/CareerCallout.test.tsx.snap | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/apps/website-25/next-env.d.ts b/apps/website-25/next-env.d.ts index 52e831b..a4a7b3f 100644 --- a/apps/website-25/next-env.d.ts +++ b/apps/website-25/next-env.d.ts @@ -2,4 +2,4 @@ /// // NOTE: This file should not be edited -// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information. +// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information. diff --git a/apps/website-25/src/components/careers/CareersCallout.tsx b/apps/website-25/src/components/careers/CareersCallout.tsx index e9b77d2..dc2542f 100644 --- a/apps/website-25/src/components/careers/CareersCallout.tsx +++ b/apps/website-25/src/components/careers/CareersCallout.tsx @@ -4,14 +4,12 @@ import { CTAButton } from '@bluedot/ui'; const Callout: React.FC = () => { const title = 'Join us in our mission to ensure humanity safely navigates the transition to transformative AI.'; const ctaLabel = 'View our careers'; - const ctaLink = '/careers'; return (

{title}

diff --git a/apps/website-25/src/components/careers/__snapshots__/CareerCallout.test.tsx.snap b/apps/website-25/src/components/careers/__snapshots__/CareerCallout.test.tsx.snap index b03cabd..0968a1c 100644 --- a/apps/website-25/src/components/careers/__snapshots__/CareerCallout.test.tsx.snap +++ b/apps/website-25/src/components/careers/__snapshots__/CareerCallout.test.tsx.snap @@ -14,7 +14,6 @@ exports[`Callout > renders default as expected 1`] = ` class="cta-button flex items-center justify-center rounded-lg transition-all duration-200 font-semibold text-base cta-button--primary bg-bluedot-normal text-white hover:bg-bluedot-normal px-4 py-2 callout__cta" data-testid="cta-button" type="button" - url="/careers" > Date: Sat, 25 Jan 2025 00:30:02 +0300 Subject: [PATCH 12/12] Revert to using stock button and remove CTAButton --- .../src/components/careers/CareersCallout.tsx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/apps/website-25/src/components/careers/CareersCallout.tsx b/apps/website-25/src/components/careers/CareersCallout.tsx index dc2542f..3a1ea30 100644 --- a/apps/website-25/src/components/careers/CareersCallout.tsx +++ b/apps/website-25/src/components/careers/CareersCallout.tsx @@ -1,20 +1,25 @@ import React from 'react'; -import { CTAButton } from '@bluedot/ui'; const Callout: React.FC = () => { const title = 'Join us in our mission to ensure humanity safely navigates the transition to transformative AI.'; const ctaLabel = 'View our careers'; + const ctaLink = '/careers'; return (

{title}

- window.open(ctaLink, '_blank')} > - {ctaLabel} - + {ctaLabel} + → +
); };