From 9d0acffe7025a3aad7f636d4695dbb3a6916a6ec Mon Sep 17 00:00:00 2001 From: Joshua Higgins Date: Fri, 9 Oct 2026 13:24:23 -0400 Subject: [PATCH 1/3] fix(web): show carousel controls on touch devices - Hide navigation arrows until hover or keyboard focus on desktop - Keep arrows visible and usable on touch devices --- apps/web/components/content-carousel.tsx | 43 ++++++++++++++++++------ 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/apps/web/components/content-carousel.tsx b/apps/web/components/content-carousel.tsx index 27f44f5..91c54c1 100644 --- a/apps/web/components/content-carousel.tsx +++ b/apps/web/components/content-carousel.tsx @@ -15,6 +15,7 @@ import { CarouselItem, CarouselNext, CarouselPrevious, + useCarousel, } from "@/components/ui/carousel" import { cn } from "@/lib/utils" import { ArtistCard } from "./artist-card" @@ -34,6 +35,34 @@ function CarouselCard({ return } +const carouselNavButtonClassName = + "pointer-events-none z-10 h-16! w-6! border-0 bg-primary text-primary-foreground opacity-0 shadow-md transition-opacity hover:bg-primary/80 hover:text-primary-foreground focus-visible:pointer-events-auto! focus-visible:opacity-100! group-hover/carousel:pointer-events-auto! group-hover/carousel:opacity-100! group-focus-within/carousel:pointer-events-auto! group-focus-within/carousel:opacity-100! active:not-aria-[haspopup]:-translate-y-1/2 dark:bg-primary dark:text-primary-foreground dark:hover:bg-primary/80 [@media(hover:none)]:pointer-events-auto! [@media(hover:none)]:opacity-100!" + +function CarouselControls() { + const { canScrollPrev, canScrollNext } = useCarousel() + + if (!canScrollPrev && !canScrollNext) { + return null + } + + return ( +
+ {canScrollPrev ? ( + + ) : null} + {canScrollNext ? ( + + ) : null} +
+ ) +} + export function ContentCarousel({ title, href, @@ -67,24 +96,18 @@ export function ContentCarousel({ opts={{ align: "start", dragFree: true, - containScroll: false, - slidesToScroll: 5, + slidesToScroll: "auto", }} - className="relative min-w-0" + className="group/carousel relative min-w-0 px-8" > - + {content.map((item) => ( ))} -
- - -
+ ) From 36f588cc75a5999b6f3b743f52afb2d92539918b Mon Sep 17 00:00:00 2001 From: Joshua Higgins Date: Fri, 9 Oct 2026 13:51:05 -0400 Subject: [PATCH 2/3] fix(web): align carousel content and allow preview access - Inset carousel headings to match their controls - Add a preview route and allow access during development --- apps/web/app/(app)/carousel-preview/page.tsx | 33 ++++++++++++++++++++ apps/web/components/content-carousel.tsx | 24 +++++++------- apps/web/next.config.ts | 1 + apps/web/proxy.ts | 1 + 4 files changed, 48 insertions(+), 11 deletions(-) create mode 100644 apps/web/app/(app)/carousel-preview/page.tsx diff --git a/apps/web/app/(app)/carousel-preview/page.tsx b/apps/web/app/(app)/carousel-preview/page.tsx new file mode 100644 index 0000000..9fba8ff --- /dev/null +++ b/apps/web/app/(app)/carousel-preview/page.tsx @@ -0,0 +1,33 @@ +"use client" + +import { ContentCarousel } from "@/components/content-carousel" +import type { Id } from "@otunes/convex/_generated/dataModel" +import type { BrowseAlbum } from "@otunes/convex/types" + +const albums: BrowseAlbum[] = Array.from({ length: 8 }, (_, index) => ({ + id: `album-${index}` as Id<"albums">, + title: `Album ${index + 1}`, + cover: null, + artist: { + id: "artist-1" as Id<"artists">, + name: "Preview Artist", + photo: null, + }, +})) + +export default function CarouselPreviewPage() { + return ( +
+ + +
+ ) +} diff --git a/apps/web/components/content-carousel.tsx b/apps/web/components/content-carousel.tsx index 91c54c1..8792ea3 100644 --- a/apps/web/components/content-carousel.tsx +++ b/apps/web/components/content-carousel.tsx @@ -80,17 +80,19 @@ export function ContentCarousel({ }) { return (
- {href ? ( - - {title} - - - ) : ( -

{title}

- )} +
+ {href ? ( + + {title} + + + ) : ( +

{title}

+ )} +
Date: Fri, 9 Oct 2026 13:53:21 -0400 Subject: [PATCH 3/3] fix(web): remove the temporary carousel preview route The preview page and its dev-only access were only used to check heading alignment. Co-authored-by: Cursor --- apps/web/app/(app)/carousel-preview/page.tsx | 33 -------------------- apps/web/next.config.ts | 1 - apps/web/proxy.ts | 1 - 3 files changed, 35 deletions(-) delete mode 100644 apps/web/app/(app)/carousel-preview/page.tsx diff --git a/apps/web/app/(app)/carousel-preview/page.tsx b/apps/web/app/(app)/carousel-preview/page.tsx deleted file mode 100644 index 9fba8ff..0000000 --- a/apps/web/app/(app)/carousel-preview/page.tsx +++ /dev/null @@ -1,33 +0,0 @@ -"use client" - -import { ContentCarousel } from "@/components/content-carousel" -import type { Id } from "@otunes/convex/_generated/dataModel" -import type { BrowseAlbum } from "@otunes/convex/types" - -const albums: BrowseAlbum[] = Array.from({ length: 8 }, (_, index) => ({ - id: `album-${index}` as Id<"albums">, - title: `Album ${index + 1}`, - cover: null, - artist: { - id: "artist-1" as Id<"artists">, - name: "Preview Artist", - photo: null, - }, -})) - -export default function CarouselPreviewPage() { - return ( -
- - -
- ) -} diff --git a/apps/web/next.config.ts b/apps/web/next.config.ts index 7efe7a8..0cb8c5b 100644 --- a/apps/web/next.config.ts +++ b/apps/web/next.config.ts @@ -2,7 +2,6 @@ import path from "node:path" import type { NextConfig } from "next" const nextConfig: NextConfig = { - allowedDevOrigins: ["192.168.86.253"], output: "standalone", outputFileTracingRoot: path.join(__dirname, "../../"), experimental: { diff --git a/apps/web/proxy.ts b/apps/web/proxy.ts index 4360162..342af0d 100644 --- a/apps/web/proxy.ts +++ b/apps/web/proxy.ts @@ -14,7 +14,6 @@ const isPublic = createRouteMatcher([ "/artist/:id", "/artists/:id", "/playlist/:id", - "/carousel-preview", ]) export default convexAuthNextjsMiddleware(