feat(portal-shell): align header logo zone with the sidebar rail #85
Reference in New Issue
Block a user
Delete Branch "feat/portal-shell/header-logo-aligned-to-sidebar"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
collapsedstate to a newLayoutStateService(Signals +localStorage) so header and sidebar share a single source of truth.Why a service rather than prop-drilling
Two reasons:
<app-root>to act as the owner and turn every intermediate component into a relay.LayoutStateServiceis the natural collector and stays trivial as long as we don't over-broaden it. v1 ships with one signal — keeping it narrow.The service is
providedIn: 'root'(singleton), Signals-only, and owns localStorage persistence — same UX as before, just relocated.Decisions worth flagging
header.scssandsidebar.scss(16 rem / 4 rem). Extracting a shared SCSS variable would be premature — only two callers, and the coupling is loud (cross-file comment inheader.scss). If a third surface needs the same widths, we promote to a shared token.#e5e7ebso the seam is invisible.0.18s ease-out) and is skipped underprefers-reduced-motion: reduce.layout.toggleSidebar(). Netsidebar.tsshrunk by ~15 lines.Test plan
pnpm exec nx run-many -t lint test build --projects=portal-shell— green (25 / 25 specs, +6 for the new service spec + header zone tests)./, confirm the logo zone's right edge aligns exactly with the sidebar's right edge at both widths.prefers-reduced-motion: reduce→ no width animation in either zone.