Fix PlaylistManager grid view consistency

- Only render header div when drag handle is present (fixes top margin)
- Set fixed 2-line height (34px) for playlist names
- Ensures track count row is always at same vertical position
This commit is contained in:
vicrodh committed 2026-01-24 17:51:56 -06:00
1 parent 2d031a237f
commit 507209656b
1 file changed
+4 -11
@@ -581,14 +581,14 @@
ondrop={(e) => !isUnavailable && handleDrop(e, playlist.id)} ondrop={(e) => !isUnavailable && handleDrop(e, playlist.id)}
ondragend={handleDragEnd} ondragend={handleDragEnd}
> >
<!-- Top row: drag handle only --> <!-- Top row: drag handle only (when in custom sort mode) -->
<div class="grid-item-header">
{#if sort === 'custom' && !isUnavailable} {#if sort === 'custom' && !isUnavailable}
<div class="grid-item-header">
<div class="drag-handle"> <div class="drag-handle">
<GripVertical size={14} /> <GripVertical size={14} />
</div> </div>
{/if}
</div> </div>
{/if}
<!-- Clickable area: artwork + info --> <!-- Clickable area: artwork + info -->
<div <div
@@ -1054,14 +1054,6 @@
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
min-height: 0;
}
.grid-item-header:empty {
display: none;
}
.grid-item-header:has(.drag-handle) {
margin-bottom: 4px; margin-bottom: 4px;
} }
@@ -1249,6 +1241,7 @@
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
overflow: hidden; overflow: hidden;
line-height: 1.3; line-height: 1.3;
height: 34px; /* Fixed 2-line height: 13px * 1.3 * 2 */
} }
.grid-item .meta { .grid-item .meta {