Skip to content

Commit a490447

Browse files
Fix public playlist request layout (#61)
1 parent 7e77275 commit a490447

File tree

4 files changed

+136
-123
lines changed

4 files changed

+136
-123
lines changed

src/app.css

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,16 @@ body.extension-mode #app {
504504
flex: 1 1 12rem;
505505
}
506506

507+
.dashboard-playlist__actions--public {
508+
width: auto;
509+
max-width: 100%;
510+
justify-content: center;
511+
}
512+
513+
.dashboard-playlist__actions--public > * {
514+
flex: 0 0 auto;
515+
}
516+
507517
.dashboard-admin > section:nth-of-type(2) {
508518
grid-template-columns: repeat(2, minmax(0, 1fr));
509519
}
@@ -610,6 +620,14 @@ body.extension-mode #app {
610620
flex: 1 1 8rem;
611621
}
612622

623+
.dashboard-playlist__actions--public {
624+
justify-content: center;
625+
}
626+
627+
.dashboard-playlist__actions--public > * {
628+
flex: 0 0 auto;
629+
}
630+
613631
.dashboard-playlist__versions-updated {
614632
display: none;
615633
}

src/components/playlist-management-surface.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -766,13 +766,13 @@ export function PlaylistManagementSurface(
766766

767767
{props.embedCurrentPlaylist ? (
768768
<section className="grid gap-3">
769-
<div className="flex flex-wrap items-start justify-between gap-4">
769+
<div className="flex flex-wrap items-start justify-between gap-4 max-[960px]:px-4">
770770
{props.currentPlaylistTitle ? (
771771
<h2 className="text-2xl font-semibold text-(--text)">
772772
{props.currentPlaylistTitle}
773773
</h2>
774774
) : null}
775-
<div className="dashboard-playlist__actions flex flex-wrap gap-3">
775+
<div className="dashboard-playlist__actions dashboard-playlist__actions--public flex flex-wrap items-center gap-3">
776776
<Button
777777
variant="outline"
778778
onClick={() => mutation.mutate({ action: "shufflePlaylist" })}
@@ -1390,7 +1390,7 @@ function CurrentPlaylistRows(props: {
13901390
))}
13911391
</AnimatePresence>
13921392
{props.items.length === 0 ? (
1393-
<p className="text-sm leading-7 text-(--muted)">
1393+
<p className="px-4 text-sm leading-7 text-(--muted)">
13941394
No songs in the playlist yet.
13951395
</p>
13961396
) : null}

src/components/public-played-history-card.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,14 @@ export function PublicPlayedHistoryCard(props: {
149149
});
150150

151151
return (
152-
<Card className="max-[960px]:rounded-none max-[960px]:border-x-0 max-[960px]:bg-transparent max-[960px]:shadow-none max-[960px]:[background-image:none]">
153-
<CardHeader className="flex flex-row items-center justify-between gap-4 max-[960px]:px-0">
154-
<div className="flex items-center gap-3">
152+
<Card className="min-w-0 max-[960px]:rounded-none max-[960px]:border-x-0 max-[960px]:bg-transparent max-[960px]:shadow-none max-[960px]:[background-image:none]">
153+
<CardHeader className="flex min-w-0 flex-wrap items-start justify-between gap-3 max-[960px]:px-4">
154+
<div className="flex min-w-0 items-center gap-3">
155155
<div className="border border-(--border) bg-(--panel-soft) p-2 text-(--brand)">
156156
<History className="h-4 w-4" />
157157
</div>
158-
<div>
159-
<CardTitle>
158+
<div className="min-w-0">
159+
<CardTitle className="break-words">
160160
{props.channelDisplayName
161161
? `${props.channelDisplayName}'s played history`
162162
: "Played history"}
@@ -165,6 +165,7 @@ export function PublicPlayedHistoryCard(props: {
165165
</div>
166166
<Button
167167
variant="outline"
168+
className="shrink-0 max-[520px]:w-full"
168169
onClick={() => setHistoryOpen((current) => !current)}
169170
>
170171
{historyOpen ? (
@@ -181,7 +182,7 @@ export function PublicPlayedHistoryCard(props: {
181182
</Button>
182183
</CardHeader>
183184
{historyOpen ? (
184-
<CardContent className="grid gap-4 max-[960px]:px-0">
185+
<CardContent className="grid gap-4 max-[960px]:px-4">
185186
<div className="grid gap-4 lg:grid-cols-[minmax(0,1.35fr)_minmax(0,1fr)]">
186187
<div className="grid gap-2">
187188
<label

0 commit comments

Comments
 (0)