From 94efd7d379e5f60acc604ede5cca8dec3c75017d Mon Sep 17 00:00:00 2001 From: 4gray <4gray@users.noreply.github.com> Date: Sat, 1 Aug 2026 20:26:38 +0200 Subject: [PATCH] fix(workspace): restore playlist info entry in header playlist dropdown (#1328) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The context-actions section of the playlist switcher lost its "Playlist info" button when playlist actions moved into the per-row menu (156c12c51): the showPlaylistInfo input, the playlistInfoRequested output and the whole shell wiring stayed alive, but no template rendered the entry anymore — the active playlist's info dialog was only reachable by locating its own row in the list. Render the button again, gated on the existing showPlaylistInfo input, alongside Account info and Add playlist. Regression test asserts all three context actions render in the opened menu and that clicking Playlist info emits. Co-authored-by: Claude Opus 5 --- .changes/workspace-playlist-info-menu-item.md | 8 +++++ .../playlist-switcher.component.html | 21 +++++++++--- .../playlist-switcher.component.spec.ts | 32 +++++++++++++++++++ 3 files changed, 56 insertions(+), 5 deletions(-) create mode 100644 .changes/workspace-playlist-info-menu-item.md diff --git a/.changes/workspace-playlist-info-menu-item.md b/.changes/workspace-playlist-info-menu-item.md new file mode 100644 index 000000000..2a67ed63d --- /dev/null +++ b/.changes/workspace-playlist-info-menu-item.md @@ -0,0 +1,8 @@ +--- +type: fix +area: workspace +--- + +The playlist dropdown in the header shows a "Playlist info" entry for the +active playlist again, next to "Account info" and "Add playlist" — it had +disappeared when playlist actions moved into the per-row menu. diff --git a/libs/playlist/shared/ui/src/lib/playlist-switcher/playlist-switcher.component.html b/libs/playlist/shared/ui/src/lib/playlist-switcher/playlist-switcher.component.html index 3e70348aa..d662a4c60 100644 --- a/libs/playlist/shared/ui/src/lib/playlist-switcher/playlist-switcher.component.html +++ b/libs/playlist/shared/ui/src/lib/playlist-switcher/playlist-switcher.component.html @@ -202,16 +202,16 @@ } - @if (showAddPlaylist() || showAccountInfo()) { + @if (showAddPlaylist() || showAccountInfo() || showPlaylistInfo()) {
- @if (showAddPlaylist()) { + @if (showPlaylistInfo()) { } @@ -226,6 +226,17 @@ }} } + @if (showAddPlaylist()) { + + }
} diff --git a/libs/playlist/shared/ui/src/lib/playlist-switcher/playlist-switcher.component.spec.ts b/libs/playlist/shared/ui/src/lib/playlist-switcher/playlist-switcher.component.spec.ts index 2ee742ad7..9be63edc0 100644 --- a/libs/playlist/shared/ui/src/lib/playlist-switcher/playlist-switcher.component.spec.ts +++ b/libs/playlist/shared/ui/src/lib/playlist-switcher/playlist-switcher.component.spec.ts @@ -295,6 +295,38 @@ describe('PlaylistSwitcherComponent', () => { expect(accountInfoSpy).toHaveBeenCalledTimes(1); }); + it('renders playlist info, account info, and add playlist context actions in the menu', async () => { + await createComponent(); + fixture.componentRef.setInput('showPlaylistInfo', true); + fixture.componentRef.setInput('showAccountInfo', true); + fixture.componentRef.setInput('showAddPlaylist', true); + fixture.detectChanges(); + + const playlistInfoSpy = jest.fn(); + component.playlistInfoRequested.subscribe(playlistInfoSpy); + + component.menuTrigger().openMenu(); + fixture.detectChanges(); + + const actionButtons = Array.from( + document.querySelectorAll( + '.context-actions-section .context-action-item' + ) + ); + const labels = actionButtons.map((button) => + button.textContent?.trim() + ); + + expect(labels).toEqual([ + expect.stringContaining('PLAYLIST_INFO'), + expect.stringContaining('ACCOUNT_INFO'), + expect.stringContaining('ADD_PLAYLIST'), + ]); + + actionButtons[0].click(); + expect(playlistInfoSpy).toHaveBeenCalledTimes(1); + }); + it('opens the menu, syncs overlay width, and checks portal statuses for Xtream playlists', fakeAsync(async () => { await createComponent();