UFAL/Backport #1333: admin-sidebar gutter via CSS var (no logged-in reload shift)#1350
UFAL/Backport #1333: admin-sidebar gutter via CSS var (no logged-in reload shift)#1350jr-rk wants to merge 1 commit into
Conversation
… shift) 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 (identical to the vsb-tuo pre-#1333 generation; applied verbatim), not a cherry-pick. Refs: dataquest-dev/dspace-customers#717, #1333 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 41 seconds Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Backport of #1333 (originally landed on
customer/vsb-tuo) toufal. Part of the SSR anti-flicker family tracked in dataquest-dev/dspace-customers#717.Problem
For an authenticated user, a hard reload shifted the whole page right by the admin-sidebar width the moment the SSR snapshot was removed. (Anonymous users were fine — no admin sidebar, no gutter.) The
.outer-wrapperleft gutter came from the@slideSidebarPaddinganimation, whose width is read from a browser-only CSS-variable store; on the server that store is empty so it renderedpadding-left:0, then the browser resolved the real width and the page jumped.Fix
Drive the gutter from a CSS class (
ds-admin-sidebar-{hidden,unpinned,pinned}, set from a smallsidebarPaddingState$) whosepadding-leftresolves from the admin-sidebar width custom properties in CSS — resolved identically on the server (snapshot) and the browser (live app), so no shift and no hardcoded px. The pin/unpin slide is preserved viatransition: padding-left, gated behindds-admin-sidebar-animate(enabled only after first browser paint) so the initial SSR→CSR gutter resolution doesn't animate.This branch
Same
root.componentgeneration as vsb-tuo's pre-#1333 state (all four files were byte-identical), so #1333 is applied verbatim. Uses--ds-admin-sidebar-fixed-element-width/--ds-admin-sidebar-total-width.Translate-not-transplant: re-derived against this branch's
root.componentgeneration, not a cherry-pick.Verification
Refs: dataquest-dev/dspace-customers#717, #1333