mirror of
https://github.com/jeffvli/feishin.git
synced 2026-07-13 22:20:13 +02:00
fix JoinedArtists not truncating on ItemCard
This commit is contained in:
@@ -223,3 +223,11 @@
|
|||||||
.row.muted.compact {
|
.row.muted.compact {
|
||||||
color: var(--theme-colors-foreground);
|
color: var(--theme-colors-foreground);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.row.artists-row {
|
||||||
|
display: -webkit-box;
|
||||||
|
overflow: hidden;
|
||||||
|
-webkit-line-clamp: 1;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1154,6 +1154,7 @@ export const getDataRows = (type?: 'compact' | 'default' | 'poster'): DataRow[]
|
|||||||
artists={data.albumArtists}
|
artists={data.albumArtists}
|
||||||
linkProps={{ fw: 400, isMuted: true }}
|
linkProps={{ fw: 400, isMuted: true }}
|
||||||
rootTextProps={{
|
rootTextProps={{
|
||||||
|
className: styles.artistsRow,
|
||||||
fw: 400,
|
fw: 400,
|
||||||
isMuted: type === 'compact' ? false : true,
|
isMuted: type === 'compact' ? false : true,
|
||||||
size: 'sm',
|
size: 'sm',
|
||||||
@@ -1406,6 +1407,7 @@ const ItemCardRow = memo(
|
|||||||
|
|
||||||
// All rows except the first one (index 0) should be muted
|
// All rows except the first one (index 0) should be muted
|
||||||
const isMuted = index > 0 || row.isMuted;
|
const isMuted = index > 0 || row.isMuted;
|
||||||
|
const isArtistRow = row.id === 'albumArtists' || row.id === 'artists';
|
||||||
|
|
||||||
const formattedContent = useMemo(() => {
|
const formattedContent = useMemo(() => {
|
||||||
if (!data) {
|
if (!data) {
|
||||||
@@ -1432,6 +1434,7 @@ const ItemCardRow = memo(
|
|||||||
return (
|
return (
|
||||||
<Text
|
<Text
|
||||||
className={clsx(styles.row, alignmentClass, {
|
className={clsx(styles.row, alignmentClass, {
|
||||||
|
[styles.artistsRow]: isArtistRow,
|
||||||
[styles.bold]: index === 0,
|
[styles.bold]: index === 0,
|
||||||
[styles.compact]: type === 'compact',
|
[styles.compact]: type === 'compact',
|
||||||
[styles.default]: type === 'default',
|
[styles.default]: type === 'default',
|
||||||
|
|||||||
Reference in New Issue
Block a user