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
JCU/fix(root): resolve the admin-sidebar gutter in CSS, not in an animation (#1496)
Backport of #1333, already on customer/TUL, customer/lindat and
customer/mendelu. Written for this branch rather than cherry-picked.
@slideSidebarPadding reads the gutter width from the browser-only CSS-variable store, so the server
has nothing to substitute and renders style="padding-left: *", which is not valid CSS. For a
logged-in user the browser then resolves the real width and the page moves right by the sidebar.
That is visible on every reload, and all the more so now that the anti-flicker overlay holds the
server's paint on screen while it happens.
The gutter now comes from a ds-admin-sidebar-{hidden,unpinned,pinned} class whose padding-left reads
--ds-admin-sidebar-fixed-element-width / --ds-admin-sidebar-total-width. CSS resolves those the same
on the server and in the browser, so there is nothing left to shift and no width is hardcoded. The
pin/unpin slide survives as transition: padding-left, gated behind ds-admin-sidebar-animate, which is
added only after the first paint so the initial resolution never animates.
Measured on the docker stack, logged in, reloading /home: outer-wrapper padding-left goes from
"padding-left: *" (computed 0px, sidebar overlapping the content) to 55px, identical in the SSR
snapshot and the live app, and the horizontal position of #main-content no longer moves at all.
Refs: dataquest-dev/dspace-customers#717
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments