Skip to content

UFAL/Backport #1333: admin-sidebar gutter via CSS var (no logged-in reload shift)#1350

Open
jr-rk wants to merge 1 commit into
dtq-devfrom
ufal/fe-admin-sidebar-ssr-padding
Open

UFAL/Backport #1333: admin-sidebar gutter via CSS var (no logged-in reload shift)#1350
jr-rk wants to merge 1 commit into
dtq-devfrom
ufal/fe-admin-sidebar-ssr-padding

Conversation

@jr-rk

@jr-rk jr-rk commented Jul 3, 2026

Copy link
Copy Markdown

Backport of #1333 (originally landed on customer/vsb-tuo) to ufal. 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-wrapper left gutter came from the @slideSidebarPadding animation, whose width is read from a browser-only CSS-variable store; on the server that store is empty so it rendered padding-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 small sidebarPaddingState$) whose padding-left resolves 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 via transition: padding-left, gated behind ds-admin-sidebar-animate (enabled only after first browser paint) so the initial SSR→CSR gutter resolution doesn't animate.

This branch

Same root.component generation 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.component generation, not a cherry-pick.

Verification

Refs: dataquest-dev/dspace-customers#717, #1333

… 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>
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jr-rk, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 41 seconds

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 366ad20c-e312-4fe2-bade-c1e98056ac46

📥 Commits

Reviewing files that changed from the base of the PR and between c49ef5e and 151213e.

📒 Files selected for processing (4)
  • src/app/root/root.component.html
  • src/app/root/root.component.scss
  • src/app/root/root.component.ts
  • src/themes/custom/app/root/root.component.ts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jr-rk jr-rk changed the title Backport #1333: admin-sidebar gutter via CSS var (no logged-in reload shift) UFAL/Backport #1333: admin-sidebar gutter via CSS var (no logged-in reload shift) Jul 3, 2026
@jr-rk jr-rk self-assigned this Jul 3, 2026
@jr-rk jr-rk requested a review from milanmajchrak July 3, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant