You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MENDELU/Backport #1333: admin-sidebar gutter via CSS var (no logged-in reload shift) (#1355)
Backport of #1333 (originally landed on customer/vsb-tuo).
Problem: for an authenticated user, a hard reload shifted the whole page right by the
admin-sidebar width when the SSR snapshot was removed. The .outer-wrapper left gutter was
produced by the @slideSidebarPadding animation, whose width is read from a browser-only
CSS-variable store; on the server that store is empty so it renders padding-left:0, then the
browser resolves the real width and the page jumps.
Fix: drive the gutter from a CSS class (ds-admin-sidebar-{hidden,unpinned,pinned}, set from a
small sidebarPaddingState$) whose padding-left resolves from the admin-sidebar width custom
properties in CSS. CSS resolves those identically on the server (the SSR snapshot) and the
browser (the live app), so there is no shift and no hardcoded width. The pin/unpin slide is
preserved via transition:padding-left, gated behind ds-admin-sidebar-animate (enabled only
after the first browser paint) so the initial SSR->CSR gutter resolution does not animate.
Translated to this branch's root.component (Angular 18 standalone generation, base + themed root components), not a cherry-pick.
Refs: dataquest-dev/dspace-customers#717, #1333
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments