From 6f476df45da605527e35ce37a6d2a17678cbff43 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 18:34:12 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Improve=20playlist=20?= =?UTF-8?q?empty=20state=20and=20button=20types?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added explicit `type="button"` to dynamically created buttons in `playlist-manager.ts` and refined the empty state using existing classes to be a clear call to action without inline CSS or JS-driven hover states. Co-authored-by: ford442 <9397845+ford442@users.noreply.github.com> --- src/core/input/playlist-manager.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/core/input/playlist-manager.ts b/src/core/input/playlist-manager.ts index 007aea0..be03f10 100644 --- a/src/core/input/playlist-manager.ts +++ b/src/core/input/playlist-manager.ts @@ -213,6 +213,7 @@ export function renderPlaylist(): void { const displayName = formatSongTitle(file.name); const btn = document.createElement('button'); + btn.type = 'button'; btn.className = 'playlist-btn'; // 🎨 Palette: Use formatted title for tooltip and screen readers btn.title = displayName; @@ -244,6 +245,7 @@ export function renderPlaylist(): void { // Remove Button (UX Improvement) const removeBtn = document.createElement('button'); + removeBtn.type = 'button'; removeBtn.className = 'playlist-remove-btn'; removeBtn.innerHTML = ''; // 🎨 Palette: Use formatted title for tooltip and screen readers @@ -292,9 +294,15 @@ export function renderPlaylist(): void { li.style.textAlign = 'center'; const emptyBtn = document.createElement('button'); + emptyBtn.type = 'button'; emptyBtn.className = 'secondary-button'; // Reuse existing class for consistent look + // 🎨 Palette: Improve empty state by making it clear and actionable using existing styles emptyBtn.style.fontSize = '1em'; // Make it slightly more prominent if needed - emptyBtn.innerHTML = 'No songs... Click to Add! '; + emptyBtn.style.width = '100%'; + emptyBtn.innerHTML = ` + Your playlist is empty + Click to add music! + `; emptyBtn.setAttribute('aria-label', 'Playlist empty. Click to upload music files.'); emptyBtn.onclick = (e) => {