From 7d1f5ddf0690eb8cf7ad00d077bbe3781e9cd3db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deluan=20Quint=C3=A3o?= Date: Sun, 8 Jun 2025 14:21:40 -0400 Subject: [PATCH] fix(ui): playlist details overflow in spotify-based themes (#4184) * test: ensure playlist details width * fix(test): simplify expectation for minWidth in NDPlaylistDetails Signed-off-by: Deluan * fix(test): test all themes Signed-off-by: Deluan --------- Signed-off-by: Deluan --- ui/src/themes/nord.js | 1 - ui/src/themes/spotify.js | 1 - ui/src/themes/theme.test.js | 14 ++++++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 ui/src/themes/theme.test.js diff --git a/ui/src/themes/nord.js b/ui/src/themes/nord.js index 8c346eefe..5420bbc60 100644 --- a/ui/src/themes/nord.js +++ b/ui/src/themes/nord.js @@ -259,7 +259,6 @@ export default { }, details: { fontSize: '.875rem', - minWidth: '75vw', color: 'rgba(255,255,255, 0.8)', }, }, diff --git a/ui/src/themes/spotify.js b/ui/src/themes/spotify.js index 703d8159e..980183759 100644 --- a/ui/src/themes/spotify.js +++ b/ui/src/themes/spotify.js @@ -204,7 +204,6 @@ export default { }, details: { fontSize: '.875rem', - minWidth: '75vw', color: 'rgba(255,255,255, 0.8)', }, }, diff --git a/ui/src/themes/theme.test.js b/ui/src/themes/theme.test.js new file mode 100644 index 000000000..b65c3a5fe --- /dev/null +++ b/ui/src/themes/theme.test.js @@ -0,0 +1,14 @@ +import themes from './index' +import { describe, it, expect } from 'vitest' + +describe('NDPlaylistDetails styles', () => { + const themeEntries = Object.entries(themes) + + it.each(themeEntries)( + '%s should not set minWidth on details', + (themeName, theme) => { + const details = theme.overrides?.NDPlaylistDetails?.details + expect(details?.minWidth).toBeUndefined() + }, + ) +})