From d09899ea3f9df58d444d577f320237e35ff85a9a Mon Sep 17 00:00:00 2001 From: Dylan Audius Date: Fri, 15 May 2026 15:13:09 -0700 Subject: [PATCH] feat(mobile): add queue icon to mini player Lets users open the play queue directly from the collapsed now-playing bar without first expanding the full now-playing drawer. Reuses the existing useDrawer('Queue') hook and useQueueNewFeatureBadge dismissal flow so behavior matches the queue button in the expanded player. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../components/now-playing-drawer/PlayBar.tsx | 39 +++++++++++++++++-- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/packages/mobile/src/components/now-playing-drawer/PlayBar.tsx b/packages/mobile/src/components/now-playing-drawer/PlayBar.tsx index 2822f12070e..204cb3eb536 100644 --- a/packages/mobile/src/components/now-playing-drawer/PlayBar.tsx +++ b/packages/mobile/src/components/now-playing-drawer/PlayBar.tsx @@ -1,5 +1,10 @@ +import { useCallback } from 'react' + import { useCurrentUserId, useToggleFavoriteTrack } from '@audius/common/api' -import { useGatedContentAccess } from '@audius/common/hooks' +import { + useGatedContentAccess, + useQueueNewFeatureBadge +} from '@audius/common/hooks' import { FavoriteSource, SquareSizes } from '@audius/common/models' import type { Track, User } from '@audius/common/models' import { playbackSelectors } from '@audius/common/store' @@ -7,9 +12,10 @@ import type { Nullable } from '@audius/common/utils' import { TouchableOpacity, Animated, View } from 'react-native' import { useSelector } from 'react-redux' -import { IconLock } from '@audius/harmony-native' +import { IconButton, IconIndent, IconLock } from '@audius/harmony-native' import { FavoriteButton } from 'app/components/favorite-button' import Text from 'app/components/text' +import { useDrawer } from 'app/hooks/useDrawer' import { makeStyles } from 'app/styles' import { useColor } from 'app/utils/theme' import { zIndex } from 'app/utils/zIndex' @@ -23,7 +29,8 @@ import { NOW_PLAYING_HEIGHT, PLAY_BAR_HEIGHT } from './constants' const { getPreviewing } = playbackSelectors const messages = { - preview: 'PREVIEW' + preview: 'PREVIEW', + queueLabel: 'Queue' } const useStyles = makeStyles(({ palette, spacing }) => ({ @@ -59,6 +66,11 @@ const useStyles = makeStyles(({ palette, spacing }) => ({ justifyContent: 'flex-start', gap: spacing(3) }, + queueContainer: { + flexShrink: 0, + alignItems: 'center', + justifyContent: 'center' + }, playContainer: { flexShrink: 1, alignItems: 'center', @@ -151,6 +163,18 @@ export const PlayBar = (props: PlayBarProps) => { source: FavoriteSource.PLAYBAR }) + const { onOpen: openQueue } = useDrawer('Queue') + const { + showBadge: showQueueNewFeatureBadge, + dismiss: dismissQueueNewFeatureBadge + } = useQueueNewFeatureBadge() + const handleOpenQueue = useCallback(() => { + if (showQueueNewFeatureBadge) { + dismissQueueNewFeatureBadge() + } + openQueue() + }, [showQueueNewFeatureBadge, dismissQueueNewFeatureBadge, openQueue]) + const renderFavoriteButton = () => { return ( { ) : null} + + +