fix(library): fix artist view height and scroll timing
- Adjusted artist two-column layout height to account for NowPlayingBar (was calc(100vh - 320px), now calc(100vh - 424px)) - Added 100ms delay before scrolling to artist card to ensure content is fully rendered after tab switch
This commit is contained in:
1 parent
72c42c289a
commit
28ab39a905
1 file changed
+10
-6
@@ -2229,12 +2229,15 @@
|
|||||||
selectedArtistName = name;
|
selectedArtistName = name;
|
||||||
|
|
||||||
// Scroll to the artist card after DOM updates
|
// Scroll to the artist card after DOM updates
|
||||||
|
// Use multiple ticks + small delay to ensure content is fully rendered
|
||||||
tick().then(() => {
|
tick().then(() => {
|
||||||
const artistId = `local-artist-${normalizeArtistName(name)}`;
|
setTimeout(() => {
|
||||||
const artistCard = document.getElementById(artistId);
|
const artistId = `local-artist-${normalizeArtistName(name)}`;
|
||||||
if (artistCard) {
|
const artistCard = document.getElementById(artistId);
|
||||||
artistCard.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
if (artistCard) {
|
||||||
}
|
artistCard.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||||
|
}
|
||||||
|
}, 100);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5793,7 +5796,8 @@
|
|||||||
.artist-two-column-layout {
|
.artist-two-column-layout {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 24px;
|
gap: 24px;
|
||||||
height: calc(100vh - 320px);
|
/* 320px for header/tabs, 104px for NowPlayingBar */
|
||||||
|
height: calc(100vh - 424px);
|
||||||
min-height: 400px;
|
min-height: 400px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user