🐛 Keep assets list view scroll position across sidebar tabs (#12115)

In list view the height of each component row depended on its
thumbnail, which renders deferred. When the Assets tab mounted again,
rows were shorter until the thumbnails appeared, so the restored
scrollTop landed several rows further down and scroll anchoring kept
it there. Reserve the thumbnail height in the row grid so rows keep
their size from the first render.

Closes #11971

AI-assisted-by: claude-opus-5-5
This commit is contained in:
Eva Marco 2026-10-06 16:55:16 +02:00 committed by GitHub
parent fcbb8f1fc0
commit d046f6997d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -69,6 +69,10 @@
.component-item-list {
display: grid;
grid-template-columns: auto 1fr auto;
// The thumbnail renders deferred; reserve its height so rows keep their
// size on mount and the saved sidebar scroll lands on the same item.
grid-template-rows: $sz-40;
align-items: center;
column-gap: var(--sp-s);
padding: var(--sp-xxs);