From 6a76405444a9ecd01bb08ea8b9f418186acbdb7c Mon Sep 17 00:00:00 2001 From: Broque Thomas <26755000+Nezreka@users.noreply.github.com> Date: Wed, 22 Apr 2026 16:19:25 -0700 Subject: [PATCH] Add Similar Artists to standalone /artist-detail page, hide library-only UI for source artists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit First increment of the artist-detail unification redesign. Delivers the two most-visible missing pieces for source artists without touching the hero layout — that's a later commit. Changes: - HTML: new #ad-similar-artists-section inside #artist-detail-main (scoped IDs with 'ad-' prefix so they don't collide with the inline Artists page, which has the same section using base IDs). - shared-helpers.js: similar-artists helpers (loadSimilarArtists + display/progressive/createBubble + lazy image loader) moved out of artists.js. New _resolveSimilarArtistsTargets() resolver picks whichever candidate set has a `.page.active` ancestor, so the same function works on both the inline Artists page and the standalone artist-detail page without caller changes. - library.js populateArtistDetailPage: sets document.body.dataset.artistSource = 'library' | 'source' before rendering, and fires loadSimilarArtists(artist.name) after populating the rest of the page. - style.css: body[data-artist-source='source'] rules hide library-only UI on the artist-detail page — Enhanced view toggle, Status (owned/missing) filter, completion bars, enrichment coverage, Top Tracks sidebar, Radio / Enhance Quality buttons, "X owned / Y missing" section-stats counts. CSS-only, additive, library artists completely unaffected. Impact today: - Library artists: Similar Artists section now appears at the bottom of their detail page (previously only the inline Artists page had it). All other UI unchanged. - Source artists: still route to the inline Artists page (Part B reverted earlier this session). The standalone page is now source-ready infrastructure-wise, but source artists don't reach it yet. A later commit will re-migrate source callers to the standalone page once the hero rendering is also source-ready. artists.js shrinks from 1903 -> 1584 lines (similar-artists block extracted). shared-helpers.js grows correspondingly. 357/357 tests still pass. No version bump — this is still 2.39 pending. --- webui/index.html | 21 ++ webui/static/artists.js | 319 ----------------------------- webui/static/library.js | 12 ++ webui/static/shared-helpers.js | 363 +++++++++++++++++++++++++++++++++ webui/static/style.css | 36 ++++ 5 files changed, 432 insertions(+), 319 deletions(-) diff --git a/webui/index.html b/webui/index.html index fed35624..29aec63a 100644 --- a/webui/index.html +++ b/webui/index.html @@ -2667,6 +2667,27 @@ + +
+
+

Similar Artists

+

Discover artists with a similar sound

+
+ + +
+ +
+
+