feat(portal-admin): header brand logo + sidebar background covers full column #148
Reference in New Issue
Block a user
Delete Branch "feat/portal-admin-header-logo-and-sidebar-envelope"
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
Two small portal-admin polish items so the admin shell stops looking like a scaffold:
APF Portalwordmark — same lock-up portal-shell already ships.What lands
Header — brand logo
apps/portal-admin/src/app/components/header/header.html—<img>slipped in before the wordmark inside the.brandflex row:The image is decorative:
alt=""+aria-hidden="true". The accessible name of the brand link is already carried byAPF Portal+ theAdminbadge — adding a non-emptyalthere would just produce noise for screen-reader users (WCAG 1.1.1 / Decorative images).Sized at 28×28 (1.75rem) to keep the lock-up proportionate to the admin header's compact 3.5rem height — portal-shell uses 36×36 in a 4rem header. The new
.brand-logoSCSS rule pinsdisplay: block; flex-shrink: 0; height/width: 1.75remso the SVG can't be squashed by other header content.Sidebar — full-column chrome
apps/portal-admin/src/app/components/sidebar/sidebar.scss— the gray background and right border move from the inner<nav class="admin-sidebar">to:host(i.e. the<app-admin-sidebar>element itself). Result: the chrome covers the whole flex column, not just the area the link list occupies.Three things had to move together for the visual to land:
background-color+border-right— what the user asked for.width: 16rem+flex: 0 0 16rem— the host is the direct flex child of.shell-body; sizing must live on the flex item, not on a grandchild.display: flex; flex-direction: column— Angular custom elements default todisplay: inline. Without an explicit display, background and border don't render on the host, regardless of the parent'salign-items: stretch.The inner
<nav>now keeps just its content concerns:paddingfor the list breathing room,overflow-y: autofor the scroll, andflex: 1 1 autoso it grows to fill the host envelope.Dark-mode variants follow the same move —
:host-context(.dark)swaps the host's background + border-color directly.Assets
apps/portal-admin/public/logos/{apf-logo.svg, apf-portal.svg}mirror the portal-shellpublic/logos/layout; Angular's build pipeline picks them up at/logos/*per the standard static-asset convention.Test plan
pnpm nx test portal-admin— 45 specs pass, unchanged. Header spec asserts on.brand-wordmark+.brand-badge(untouched); sidebar spec asserts on the<nav>landmark + RouterLinks (also untouched).pnpm nx lint portal-admin— clean.pnpm nx build portal-admin— clean; lazy chunks unchanged (audit4.35 KB gzip,users3.76 KB gzip)./auditand/usersand confirm the gray background + right border extend the full height of the sidebar column.