From bb0cc9404a295e877bd7171dc6eb0fc2abcaad01 Mon Sep 17 00:00:00 2001 From: Ivan Vasilov Date: Fri, 21 Jul 2023 13:21:48 +0200 Subject: [PATCH 1/8] Truncate the integration description so that each box is the same height. --- apps/www/components/Partners/TileGrid.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/www/components/Partners/TileGrid.tsx b/apps/www/components/Partners/TileGrid.tsx index dfc733561ca..236c3509a71 100644 --- a/apps/www/components/Partners/TileGrid.tsx +++ b/apps/www/components/Partners/TileGrid.tsx @@ -49,7 +49,12 @@ export default function TileGrid({

{p.title}

-

{p.description}

+

+ {p.description} +

From ccb4ef6bb99bf5be8d4ea7c1ef38129d06e82d85 Mon Sep 17 00:00:00 2001 From: Ivan Vasilov Date: Fri, 21 Jul 2023 14:31:04 +0200 Subject: [PATCH 2/8] Make the Details part sticky when scrolling the integration page. --- .../pages/partners/integrations/[slug].tsx | 82 ++++++++++--------- 1 file changed, 42 insertions(+), 40 deletions(-) diff --git a/apps/www/pages/partners/integrations/[slug].tsx b/apps/www/pages/partners/integrations/[slug].tsx index 661369872d2..54ee024dee0 100644 --- a/apps/www/pages/partners/integrations/[slug].tsx +++ b/apps/www/pages/partners/integrations/[slug].tsx @@ -188,58 +188,60 @@ function Partner({
-

- Details -

+
+

+ Details +

+ +
+ {partner.type === 'technology' && ( +
+ Developer + {partner.developer} +
+ )} -
- {partner.type === 'technology' && (
- Developer - {partner.developer} + Category + + + {partner.category} + +
- )} -
- Category - - - {partner.category} - - -
- - - - {partner.type === 'technology' && partner.docs && ( - )} + + {partner.type === 'technology' && partner.docs && ( +
+ Documentation + + + Learn + + + +
+ )} +
From 04d14cc04b8420935ea68f88220ed8b1205336c2 Mon Sep 17 00:00:00 2001 From: Ivan Vasilov Date: Fri, 21 Jul 2023 16:02:24 +0200 Subject: [PATCH 3/8] Update the database types. --- apps/www/lib/database.types.ts | 188 +++++++++++++++++++-------------- 1 file changed, 108 insertions(+), 80 deletions(-) diff --git a/apps/www/lib/database.types.ts b/apps/www/lib/database.types.ts index 2e536759c2f..c834e0a4110 100644 --- a/apps/www/lib/database.types.ts +++ b/apps/www/lib/database.types.ts @@ -1,112 +1,140 @@ -export type Json = string | number | boolean | null | { [key: string]: Json } | Json[] +export type Json = string | number | boolean | null | { [key: string]: Json | undefined } | Json[] export interface Database { public: { Tables: { - partners: { - Row: { - id: number - slug: string - type: Database['public']['Enums']['partner_type'] - category: string - developer: string - title: string - description: string - logo: string - images: string[] - video: string - overview: string - website: string - docs: string - approved: boolean - } - Insert: { - id?: number - slug?: string - type?: Database['public']['Enums']['partner_type'] - category?: string - developer?: string - title?: string - description?: string - logo?: string - images?: string[] - video?: string - overview?: string - website?: string - docs?: string - approved?: boolean - } - Update: { - id?: number - slug?: string - type?: Database['public']['Enums']['partner_type'] - category?: string - developer?: string - title?: string - description?: string - logo?: string - images?: string[] - video?: string - overview?: string - website?: string - docs?: string - approved?: boolean - } - } partner_contacts: { Row: { - id: number - type: Database['public']['Enums']['partner_type'] company: string + contacted: boolean country: string - details?: string + created_at: string + details: string | null email: string first: string + id: number last: string - phone?: string - size?: number - title?: string + phone: string | null + size: number | null + title: string | null + type: Database['public']['Enums']['partner_type'] website: string } Insert: { + company: string + contacted?: boolean + country: string + created_at?: string + details?: string | null + email: string + first: string id?: number - type?: Database['public']['Enums']['partner_type'] - company?: string - country?: string - details?: string - email?: string - first?: string - last?: string - phone?: string - size?: number - title?: string - website?: string + last: string + phone?: string | null + size?: number | null + title?: string | null + type: Database['public']['Enums']['partner_type'] + website: string } Update: { - id?: number - type?: Database['public']['Enums']['partner_type'] company?: string + contacted?: boolean country?: string - details?: string + created_at?: string + details?: string | null email?: string first?: string + id?: number last?: string - phone?: string - size?: number - title?: string + phone?: string | null + size?: number | null + title?: string | null + type?: Database['public']['Enums']['partner_type'] website?: string } + Relationships: [] + } + partners: { + Row: { + approved: boolean | null + call_to_action_link: string | null + category: string + contact: number + created_at: string + description: string + developer: string + docs: string | null + featured: boolean + id: number + images: string[] | null + logo: string + overview: string + slug: string + title: string + tsv: unknown | null + type: Database['public']['Enums']['partner_type'] + video: string | null + website: string + } + Insert: { + approved?: boolean | null + call_to_action_link?: string | null + category: string + contact: number + created_at?: string + description: string + developer: string + docs?: string | null + featured?: boolean + id?: number + images?: string[] | null + logo: string + overview: string + slug: string + title: string + tsv?: unknown | null + type: Database['public']['Enums']['partner_type'] + video?: string | null + website: string + } + Update: { + approved?: boolean | null + call_to_action_link?: string | null + category?: string + contact?: number + created_at?: string + description?: string + developer?: string + docs?: string | null + featured?: boolean + id?: number + images?: string[] | null + logo?: string + overview?: string + slug?: string + title?: string + tsv?: unknown | null + type?: Database['public']['Enums']['partner_type'] + video?: string | null + website?: string + } + Relationships: [ + { + foreignKeyName: 'partners_contact_fkey' + columns: ['contact'] + referencedRelation: 'partner_contacts' + referencedColumns: ['id'] + } + ] } } Views: {} - Functions: { - derive_label_sort_from_label: { - Args: { label: string } - Returns: string - } - } + Functions: {} Enums: { partner_type: 'technology' | 'expert' } + CompositeTypes: { + [_ in never]: never + } } } From 8c382911847ea0f4f693e035e041f1fcafd5f511 Mon Sep 17 00:00:00 2001 From: Ivan Vasilov Date: Fri, 21 Jul 2023 16:03:11 +0200 Subject: [PATCH 4/8] Fix all errors caused by the new generation of database types. --- apps/www/pages/partners/experts/[slug].tsx | 6 +++--- apps/www/pages/partners/integrations/[slug].tsx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/www/pages/partners/experts/[slug].tsx b/apps/www/pages/partners/experts/[slug].tsx index 3d6b1807eb6..ffb5f8fe409 100644 --- a/apps/www/pages/partners/experts/[slug].tsx +++ b/apps/www/pages/partners/experts/[slug].tsx @@ -32,7 +32,7 @@ function Partner({ url: `https://supabase.com/partners/experts/${partner.slug}`, images: [ { - url: partner.images[0] ?? partner.logo, + url: partner.images ? partner.images[0] : partner.logo, }, ], }} @@ -92,7 +92,7 @@ function Partner({ }, }} > - {partner.images.map((image: any, i: number) => { + {partner.images?.map((image: any, i: number) => { return (
@@ -178,7 +178,7 @@ function Partner({
- {partner.type === 'technology' && ( + {partner.type === 'technology' && partner.docs && (
Documentation - {partner.images.map((image: any, i: number) => { + {partner.images?.map((image: any, i: number) => { return (
From 97a2f5aa71fcdaf293efaa5fa0196e2da68324e2 Mon Sep 17 00:00:00 2001 From: Ivan Vasilov Date: Fri, 21 Jul 2023 16:12:09 +0200 Subject: [PATCH 5/8] Add a call to action link on the bottom. --- apps/www/pages/partners/integrations/[slug].tsx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/apps/www/pages/partners/integrations/[slug].tsx b/apps/www/pages/partners/integrations/[slug].tsx index 89242defdee..9e1b67541a0 100644 --- a/apps/www/pages/partners/integrations/[slug].tsx +++ b/apps/www/pages/partners/integrations/[slug].tsx @@ -11,7 +11,7 @@ import { Dispatch, SetStateAction, useState } from 'react' import remarkGfm from 'remark-gfm' import { Swiper, SwiperSlide } from 'swiper/react' import 'swiper/swiper.min.css' -import { Admonition, IconChevronLeft, IconExternalLink } from 'ui' +import { Admonition, Button, IconChevronLeft, IconExternalLink } from 'ui' import ImageModal from '~/components/ImageModal' import DefaultLayout from '~/components/Layouts/Default' import SectionContainer from '~/components/Layouts/SectionContainer' @@ -245,6 +245,20 @@ function Partner({
+ {partner.call_to_action_link && ( + + )} From f05580fe959ab9b0a10c77334aeb3eb723ad32e5 Mon Sep 17 00:00:00 2001 From: Ivan Vasilov Date: Fri, 21 Jul 2023 16:50:36 +0200 Subject: [PATCH 6/8] Add expandable video on the side to the integration page. --- apps/docs/layouts/guides/index.tsx | 4 +-- .../pages/partners/integrations/[slug].tsx | 28 ++++++++----------- .../ExpandableVideo/ExpandableVideo.tsx | 18 +++++++----- 3 files changed, 23 insertions(+), 27 deletions(-) diff --git a/apps/docs/layouts/guides/index.tsx b/apps/docs/layouts/guides/index.tsx index b637c118b20..1363448853c 100644 --- a/apps/docs/layouts/guides/index.tsx +++ b/apps/docs/layouts/guides/index.tsx @@ -1,17 +1,15 @@ import { MDXProvider } from '@mdx-js/react' import { NextSeo } from 'next-seo' import Head from 'next/head' -import Link from 'next/link' import { useRouter } from 'next/router' import { FC, useEffect, useRef, useState } from 'react' -import { IconExternalLink } from 'ui' +import { ExpandableVideo, IconExternalLink } from 'ui' import components from '~/components' import { highlightSelectedTocItem } from '~/components/CustomHTMLElements/CustomHTMLElements.utils' import { FooterHelpCalloutType } from '~/components/FooterHelpCallout' import GuidesTableOfContents from '~/components/GuidesTableOfContents' import useHash from '~/hooks/useHash' import { LayoutMainContent } from '../DefaultLayout' -import ExpandableVideo from 'ui/src/components/ExpandableVideo/ExpandableVideo' interface Props { meta: { diff --git a/apps/www/pages/partners/integrations/[slug].tsx b/apps/www/pages/partners/integrations/[slug].tsx index 9e1b67541a0..e99c570d579 100644 --- a/apps/www/pages/partners/integrations/[slug].tsx +++ b/apps/www/pages/partners/integrations/[slug].tsx @@ -11,7 +11,7 @@ import { Dispatch, SetStateAction, useState } from 'react' import remarkGfm from 'remark-gfm' import { Swiper, SwiperSlide } from 'swiper/react' import 'swiper/swiper.min.css' -import { Admonition, Button, IconChevronLeft, IconExternalLink } from 'ui' +import { Admonition, Button, ExpandableVideo, IconChevronLeft, IconExternalLink } from 'ui' import ImageModal from '~/components/ImageModal' import DefaultLayout from '~/components/Layouts/Default' import SectionContainer from '~/components/Layouts/SectionContainer' @@ -166,22 +166,6 @@ function Partner({ Overview - {partner.video && ( -
-