Skip to content

Commit da151c1

Browse files
dylanjeffersclaude
andauthored
Update track page hero to match new Figma design (#14089)
Convert hero action buttons (repost, favorite, share, more) to icon-only using IconButton, and reorder the bottom section so the description renders before the metadata list and tags. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 44dba8d commit da151c1

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

packages/web/src/components/track/GiantTrackTile.tsx

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import {
3636
IconShare,
3737
IconRocket,
3838
Button,
39+
IconButton,
3940
MusicBadge,
4041
Paper,
4142
PlainButton,
@@ -86,8 +87,6 @@ const messages = {
8687
makePublic: 'MAKE PUBLIC',
8788
releaseNow: 'RELEASE NOW',
8889
isPublishing: 'PUBLISHING',
89-
repostButtonText: 'repost',
90-
repostedButtonText: 'reposted',
9190
unplayed: 'Unplayed',
9291
timeLeft: 'left',
9392
played: 'Played',
@@ -274,14 +273,15 @@ export const GiantTrackTile = ({
274273
const shouldShow =
275274
(!isUnlisted && !isPublishing) || fieldVisibility.share || isOwner
276275
return shouldShow ? (
277-
<Button
278-
variant='secondary'
279-
iconLeft={IconShare}
280-
widthToHideText={BUTTON_COLLAPSE_WIDTHS.first}
281-
onClick={onShare}
282-
>
283-
share
284-
</Button>
276+
<Tooltip text='Share'>
277+
<IconButton
278+
aria-label='Share'
279+
icon={IconShare}
280+
color='subdued'
281+
size='2xl'
282+
onClick={onShare}
283+
/>
284+
</Tooltip>
285285
) : null
286286
}
287287

@@ -344,18 +344,15 @@ export const GiantTrackTile = ({
344344
text={isReposted ? 'Unrepost' : 'Repost'}
345345
>
346346
<div>
347-
<Button
348-
variant={isReposted ? 'primary' : 'secondary'}
347+
<IconButton
348+
aria-label={isReposted ? 'Unrepost' : 'Repost'}
349349
name='repost'
350350
disabled={isOwner}
351-
widthToHideText={BUTTON_COLLAPSE_WIDTHS.second}
352-
iconLeft={IconRepost}
351+
icon={IconRepost}
352+
color={isReposted ? 'active' : 'subdued'}
353+
size='2xl'
353354
onClick={onRepost}
354-
>
355-
{isReposted
356-
? messages.repostedButtonText
357-
: messages.repostButtonText}
358-
</Button>
355+
/>
359356
</div>
360357
</Tooltip>
361358
</Toast>
@@ -379,16 +376,15 @@ export const GiantTrackTile = ({
379376
text={isSaved ? 'Unfavorite' : 'Favorite'}
380377
>
381378
<div>
382-
<Button
379+
<IconButton
380+
aria-label={isSaved ? 'Unfavorite' : 'Favorite'}
383381
name='favorite'
384382
disabled={isOwner}
385-
variant={isSaved ? 'primary' : 'secondary'}
386-
widthToHideText={BUTTON_COLLAPSE_WIDTHS.third}
387-
iconLeft={IconHeart}
383+
icon={IconHeart}
384+
color={isSaved ? 'active' : 'subdued'}
385+
size='2xl'
388386
onClick={toggleSaveTrack}
389-
>
390-
{isSaved ? 'favorited' : 'favorite'}
391-
</Button>
387+
/>
392388
</div>
393389
</Tooltip>
394390
</Toast>
@@ -568,32 +564,35 @@ export const GiantTrackTile = ({
568564
</Flex>
569565
</Flex>
570566
{isUnlisted && !isOwner ? null : (
571-
<div
572-
className={cn(styles.actionButtons, fadeIn)}
567+
<Flex
568+
gap='2xl'
569+
alignItems='center'
570+
className={cn(fadeIn)}
573571
role='group'
574572
aria-label={messages.actionGroupLabel}
575573
>
576-
{renderShareButton()}
577-
{renderMakePublicButton()}
578574
{hasStreamAccess && renderRepostButton()}
579575
{hasStreamAccess && renderFavoriteButton()}
576+
{renderShareButton()}
577+
{renderMakePublicButton()}
580578
<span>
581579
{/* prop types for overflow menu don't work correctly
582580
so we need to cast here */}
583581
<Menu {...(overflowMenu as any)}>
584582
{(ref, triggerPopup) => (
585583
<div className={cn(styles.menuKebabContainer)} ref={ref}>
586-
<Button
587-
variant='secondary'
584+
<IconButton
588585
aria-label='More options'
589-
iconLeft={IconKebabHorizontal}
586+
icon={IconKebabHorizontal}
587+
color='subdued'
588+
size='2xl'
590589
onClick={() => triggerPopup()}
591590
/>
592591
</div>
593592
)}
594593
</Menu>
595594
</span>
596-
</div>
595+
</Flex>
597596
)}
598597
</Flex>
599598
<Flex
@@ -638,9 +637,8 @@ export const GiantTrackTile = ({
638637
backgroundColor='surface1'
639638
borderTop='default'
640639
className={cn(fadeIn)}
641-
gap='m'
640+
gap='l'
642641
>
643-
<TrackMetadataList trackId={trackId} />
644642
{description ? (
645643
<Flex column gap='m'>
646644
{/* Container with height transition */}
@@ -682,6 +680,8 @@ export const GiantTrackTile = ({
682680
</Flex>
683681
) : null}
684682

683+
<TrackMetadataList trackId={trackId} />
684+
685685
{renderTags()}
686686
</Flex>
687687
</Paper>

0 commit comments

Comments
 (0)