From 121201beb5f84dfe4e2b9cd99cef6b7843788972 Mon Sep 17 00:00:00 2001 From: Joshua Higgins Date: Sun, 1 Nov 2026 19:37:58 -0500 Subject: [PATCH] fix(web): allow opening the sidebar on mobile --- apps/web/app/(app)/playlists/page.tsx | 6 ++++- apps/web/app/(app)/search/page.tsx | 4 +++- apps/web/components/album-view.tsx | 10 +++++--- apps/web/components/app-sidebar.tsx | 8 ++++--- apps/web/components/artist-view.tsx | 10 +++++--- apps/web/components/library-skeletons.tsx | 2 ++ .../web/components/mobile-sidebar-trigger.tsx | 23 +++++++++++++++++++ apps/web/components/playlist-view.tsx | 10 +++++--- apps/web/components/songs-view.tsx | 11 +++++++-- 9 files changed, 68 insertions(+), 16 deletions(-) create mode 100644 apps/web/components/mobile-sidebar-trigger.tsx diff --git a/apps/web/app/(app)/playlists/page.tsx b/apps/web/app/(app)/playlists/page.tsx index 9bbdf08..3eb6535 100644 --- a/apps/web/app/(app)/playlists/page.tsx +++ b/apps/web/app/(app)/playlists/page.tsx @@ -1,5 +1,6 @@ "use client" +import { MobileSidebarTrigger } from "@/components/mobile-sidebar-trigger" import { Plus } from "lucide-react" import { useAddToPlaylist } from "@/components/add-to-playlist-provider" @@ -17,7 +18,10 @@ export default function Page() { return (
-

Playlists

+
+ +

Playlists

+
) diff --git a/apps/web/components/mobile-sidebar-trigger.tsx b/apps/web/components/mobile-sidebar-trigger.tsx new file mode 100644 index 0000000..f86fb03 --- /dev/null +++ b/apps/web/components/mobile-sidebar-trigger.tsx @@ -0,0 +1,23 @@ +"use client" + +import { Menu } from "lucide-react" + +import { Button } from "@/components/ui/button" +import { useSidebar } from "@/components/ui/sidebar" + +export function MobileSidebarTrigger() { + const { openMobile, setOpenMobile } = useSidebar() + + return ( + + ) +} diff --git a/apps/web/components/playlist-view.tsx b/apps/web/components/playlist-view.tsx index b33533c..2391eb1 100644 --- a/apps/web/components/playlist-view.tsx +++ b/apps/web/components/playlist-view.tsx @@ -1,5 +1,6 @@ "use client" +import { MobileSidebarTrigger } from "@/components/mobile-sidebar-trigger" import { stationArtistId } from "@/lib/station-artist" import * as React from "react" import Image from "next/image" @@ -544,9 +545,12 @@ export function PlaylistView({ playlist }: { playlist: BrowsePlaylistDetail }) {

Playlist

-

- {playlist.title} -

+
+ +

+ {playlist.title} +

+

{playlist.owner.name}

diff --git a/apps/web/components/songs-view.tsx b/apps/web/components/songs-view.tsx index 3271feb..066fb5b 100644 --- a/apps/web/components/songs-view.tsx +++ b/apps/web/components/songs-view.tsx @@ -1,5 +1,6 @@ "use client" +import { MobileSidebarTrigger } from "@/components/mobile-sidebar-trigger" import { stationArtistId } from "@/lib/station-artist" import { useEffect, useMemo, useState, useRef, MouseEvent } from "react" import Image from "next/image" @@ -362,7 +363,10 @@ export function SongsView() { return (
-

Songs

+
+ +

Songs

+
@@ -372,7 +376,10 @@ export function SongsView() { return (
-

Songs

+
+ +

Songs

+