From d7543d536f032b2f410435284927bd95cea3d04c Mon Sep 17 00:00:00 2001 From: Gildas Garcia <1122076+djhi@users.noreply.github.com> Date: Tue, 30 Jun 2026 16:32:02 +0200 Subject: [PATCH] chore: www `Tabs` migration (#47449) ## Problem We're still maintaining the old `Tabs` component which is deprecated. ## Solution Cleanup its usages in `www`: - Remove dead code - Migrate actual tabs to the new Shadcn component - Migrate non tabs to use `Button` instead There should be almost no visual changes (slight background color change on the active button below): - https://zone-www-dot-8z5cao88c-supabase.vercel.app/solutions/agencies (at the bottom) Before: image After: image - https://zone-www-dot-8z5cao88c-supabase.vercel.app/blog/postgres-full-text-search-vs-the-rest#results ## Summary by CodeRabbit * **Bug Fixes** * Simplified navigation in API examples and chart tabs for a more consistent browsing experience. * Updated chart tab switching to better match the current UI behavior. * **Refactor** * Removed several carousel and admin access components, along with related styling, reducing unused page elements. --- apps/www/components/AdminAccess/index.tsx | 18 -- .../Carousels/ImageCarousel.module.css | 7 - .../components/Carousels/ImageCarousel.tsx | 192 ------------------ .../Carousels/SplitCodeBlockCarousel.tsx | 150 -------------- apps/www/components/Charts/PGCharts.tsx | 24 +-- apps/www/components/Sections/APISection.tsx | 27 ++- 6 files changed, 28 insertions(+), 390 deletions(-) delete mode 100644 apps/www/components/AdminAccess/index.tsx delete mode 100644 apps/www/components/Carousels/ImageCarousel.module.css delete mode 100644 apps/www/components/Carousels/ImageCarousel.tsx delete mode 100644 apps/www/components/Carousels/SplitCodeBlockCarousel.tsx diff --git a/apps/www/components/AdminAccess/index.tsx b/apps/www/components/AdminAccess/index.tsx deleted file mode 100644 index f71b81f1792..00000000000 --- a/apps/www/components/AdminAccess/index.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react' -import ImageCarousel from '~/components/Carousels/ImageCarousel' -import SectionContainer from '~/components/Layouts/SectionContainer' - -import AdminAccessData from 'data/home/admin-access.json' - -const AdminAccess = () => { - return ( - -
-

Build your app without leaving the dashboard

-
- -
- ) -} - -export default AdminAccess diff --git a/apps/www/components/Carousels/ImageCarousel.module.css b/apps/www/components/Carousels/ImageCarousel.module.css deleted file mode 100644 index de0465a8225..00000000000 --- a/apps/www/components/Carousels/ImageCarousel.module.css +++ /dev/null @@ -1,7 +0,0 @@ -/* bright */ -.gradient-bg { - background: - linear-gradient(338.96deg, rgba(0, 0, 0, 0.2) -18.99%, rgba(0, 0, 0, 0) 25.34%), - linear-gradient(300.08deg, #53ffb1 7.6%, #3ecf8e 64.93%); - /* transform: rotate(-89.79deg); */ -} diff --git a/apps/www/components/Carousels/ImageCarousel.tsx b/apps/www/components/Carousels/ImageCarousel.tsx deleted file mode 100644 index bb8e06b295a..00000000000 --- a/apps/www/components/Carousels/ImageCarousel.tsx +++ /dev/null @@ -1,192 +0,0 @@ -import { CornerRightUp } from 'lucide-react' -import { useRouter } from 'next/router' -import { useRef, useState } from 'react' -import { Button, Tabs } from 'ui' - -// Import Swiper React components -import { Swiper, SwiperSlide } from 'swiper/react' - -// Import Swiper styles -import 'swiper/css' - -import { useInView } from 'framer-motion' -import Image from 'next/image' -import TextLink from '../TextLink' -import ImageCarouselStyles from './ImageCarousel.module.css' - -interface Content { - title: string - label?: string - img_url?: string - text?: string - cta?: string - url?: string - youtube_id?: string -} - -interface ImageCarouselProps { - content: Content[] - footer?: React.ReactNode - altTabView?: boolean -} - -function ImageCarousel(props: ImageCarouselProps) { - const sectionRef = useRef(null) - const isInView = useInView(sectionRef, { margin: '75%', once: true }) - // base path for images - const { basePath } = useRouter() - - // store API swiper instance - const [imageSwiper, setImageSwiper] = useState(undefined) - const [swiperDetails, setSwiperDetails] = useState(undefined) - - const [imageSwiperActiveIndex, setImageSwiperActiveIndex] = useState(0) - - function handleImageSwiperNav(e: number) { - setImageSwiperActiveIndex(e) - // @ts-ignore - imageSwiper.slideTo(e) - // @ts-ignore - swiperDetails.slideTo(e) - } - - const details = ( -
-

- Allow fetch something -

-

-

- This would only allow the authenticated user access to a folder that is named after their - own account UID. This is useful for things like profile images. -

-

-

- -

-
- ) - - return ( -
-
-
-
- handleImageSwiperNav(Number(id))} - > - {props.content.map((content: Content, i) => { - return ( - - - - ) - })} - -
-
- - {props.content.map((content: Content, i: number) => { - return ( - - {content.img_url && ( - {content.title} - )} - {isInView && content.youtube_id && ( -
-