handle text overflow on sidebar playlist duration

This commit is contained in:
jeffvli
2025-12-15 21:37:58 -08:00
parent 5b5cdbfb7f
commit 68b6a58ac5
2 changed files with 33 additions and 2 deletions
@@ -59,17 +59,43 @@
gap: var(--theme-spacing-md); gap: var(--theme-spacing-md);
align-items: center; align-items: center;
min-width: 0; min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
} }
.metadata-group-item { .metadata-group-item {
display: flex; display: flex;
flex-shrink: 0; flex-shrink: 1;
flex-wrap: nowrap; flex-wrap: nowrap;
gap: var(--theme-spacing-xs); gap: var(--theme-spacing-xs);
align-items: center; align-items: center;
min-width: 0;
overflow: hidden;
white-space: nowrap; white-space: nowrap;
} }
.metadata-group-item-no-shrink {
flex-shrink: 0;
}
.metadata-group-item > * {
flex-shrink: 0;
}
.metadata-group-item > *:last-child {
flex-shrink: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.metadata-group-item-no-shrink > *:last-child {
flex-shrink: 0;
overflow: visible;
text-overflow: clip;
}
.name { .name {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@@ -185,7 +185,12 @@ const PlaylistRowButton = memo(({ item, name, onContextMenu, to }: PlaylistRowBu
{name} {name}
</Text> </Text>
<div className={styles.metadataGroup}> <div className={styles.metadataGroup}>
<div className={styles.metadataGroupItem}> <div
className={clsx(
styles.metadataGroupItem,
styles.metadataGroupItemNoShrink,
)}
>
<Icon color="muted" icon="itemSong" size="sm" /> <Icon color="muted" icon="itemSong" size="sm" />
<Text isMuted size="sm"> <Text isMuted size="sm">
{item.songCount || 0} {item.songCount || 0}