diff --git a/openspec/changes/refine-visitor-pages-and-shell/specs/admin-visual-design/spec.md b/openspec/changes/refine-visitor-pages-and-shell/specs/admin-visual-design/spec.md index 09931da..0d722c2 100644 --- a/openspec/changes/refine-visitor-pages-and-shell/specs/admin-visual-design/spec.md +++ b/openspec/changes/refine-visitor-pages-and-shell/specs/admin-visual-design/spec.md @@ -36,13 +36,14 @@ The admin header SHALL NOT repeat the page title. On a page reached directly fro ### Requirement: Table Scroll Cue -A table wider than its container SHALL show a fade on each edge where more columns can be scrolled into view. The fade SHALL disappear at that end of the scroll. +A table wider than its container SHALL show a fade on each edge where more columns can be scrolled into view. The fade SHALL disappear at that end of the scroll. Where a data table pins its first column, the pinned column covers the left fade and SHALL instead show a divider on its right edge. #### Scenario: Users list on a phone - **WHEN** an admin opens the Users list at 360 px wide - **THEN** a fade shows on the right edge of the table - **AND** after scrolling to the last column the right fade is gone +- **AND** the pinned username column shows a divider on its right edge ### Requirement: Sidebar Sections diff --git a/openspec/changes/refine-visitor-pages-and-shell/tasks.md b/openspec/changes/refine-visitor-pages-and-shell/tasks.md index d52ea3c..81273d5 100644 --- a/openspec/changes/refine-visitor-pages-and-shell/tasks.md +++ b/openspec/changes/refine-visitor-pages-and-shell/tasks.md @@ -54,3 +54,4 @@ Verify for every task: `cd solvway-admin-portal && npx vitest run; echo VITEST=$ - Reset password (throwaway CV staff user, reverted afterwards): same frame as login at 1280 and 360 px, and the policy error is shown. - My QR (same user, temporarily on the LC Live Check team, then removed and disabled): card layout at 360, 700, 1024 and 1280 px. At 1280 px a button overflowed the card, so the QR now stacks above the buttons (fix found in this check). + - After the whole-branch review: the giraffe-spot coat and 16px corners were removed from the signed-out frame (DESIGN.md forbids them); login checked again at 1280 and 360 px. DESIGN.md updated to the shipped look. Full verify: vitest 1585 passed (exit 0), tsc 0, lint 0 errors. diff --git a/solvway-admin-portal/DESIGN.md b/solvway-admin-portal/DESIGN.md index 354792e..ee405c5 100644 --- a/solvway-admin-portal/DESIGN.md +++ b/solvway-admin-portal/DESIGN.md @@ -177,10 +177,16 @@ Slate neutrals with a single blue voice, plus muted semantic and chart tones tha An app shell: a sticky 240px white sidebar (collapsible to a 76px icon rail on desktop, a left sheet below the lg breakpoint) beside a column holding a sticky 56px white header and the main area. The sidebar's top block is header-high so its bottom hairline continues the header's. Main content sits on the slate ground with 16px padding, centred up to 1600px. -Page anatomy: breadcrumb in the header, page header (title, optional meta line, actions right-aligned and wrapping), then filter row, then the content card. Rhythm is a 4px base: 8px between related controls, 16px between blocks and around the page, 24px inside cards. KPI tiles sit in one row of equal columns. Tables scroll horizontally inside their card with a soft shadow on whichever edge has more content. The page reserves the scrollbar gutter so overlays never shift the layout. +Page anatomy: on a sub-page the header shows its parent page as a link back (a page reached from the sidebar shows none, since its title already names it), then the page header (title, optional meta line, actions right-aligned and wrapping), then filter row, then the content card. Rhythm is a 4px base: 8px between related controls, 16px between blocks and around the page, 24px inside cards. KPI tiles sit in one row of equal columns. Tables scroll horizontally inside their card with a 20px shadow at 18% ink on whichever edge has more content; it fades out at that end of the scroll. A data table's pinned first column covers the left shadow, so it carries a 1px hairline on its right edge instead. The page reserves the scrollbar gutter so overlays never shift the layout. The footer credit "Powered by Containerverse Sdn. Bhd." sits at the foot of the sidebar on desktop and under the content on mobile, in 12px muted text. +**Public visitor pages** (`/r`, `/i`, `/c`) have no shell. One white card sits on the slate ground, full width with a 16px gutter on phones and at most 448px wide, with the footer credit under it. The card opens with the event header: the company name as a 12px semibold uppercase label in Action Blue, the event name as the 24px h1, then dates and location on their own muted lines with 16px icons. The privacy notice is fine print: 12px muted text on a slate-tint panel, both languages in full. Every end state (loading, thank you, welcome, not yet, inactive) is a centred 40px round icon (blue tint, or 10% red for errors) over a balanced semibold heading. The look is neutral: no company logo or colour. + +**Signed-out pages** (login, reset password) share one frame: from the lg breakpoint a blue-tint panel on the left with the "Back office" pill, a headline and three feature lines, and the form column on the ground at right; below lg the panel folds into a short band above the form. + +**My QR codes** shows one card per code in a grid (one column on phones, two from 768px, three from 1280px): the event name as the card title, dates and location under it, the warning pill in the header when switched off, then the QR above its link and a wrapping row of outline buttons. + ## Elevation & Depth Flat surfaces separated by hairlines, with a whisper of shadow that only says "this lifts slightly". Cards carry the card shadow; controls carry a barely-there shadow; floating layers (menus, popovers, toasts, dialogs) step up. In dark mode the card shadow becomes a single dark drop and hairlines do the work. @@ -231,8 +237,8 @@ Quiet, compact, unmistakable. - Live inside a card or an 8px framed container. Header row in slate tint, 40px tall, 12px semibold uppercase muted labels with sort chevrons; cells 14px with 8px padding; rows separated by hairlines, hovering at 50% slate tint. The pager below reads "1-7 of 7" left and outline Previous / Next right. ### Navigation -- **Sidebar:** white, right hairline. Items are 44px tall, 8px radius, 20px outline icon plus 14px medium label. Idle: muted slate, hover slate tint with ink. Active: blue tint with deep blue ink, `aria-current="page"`. Groups expand with a rotating chevron and indent children behind a left hairline. The collapsed rail shows icons only, with groups opening as a side popover. -- **Header:** white, bottom hairline, 56px; breadcrumb left; company picker (a styled select), locale switcher, theme toggle and user menu (blue avatar initial) right. +- **Sidebar:** white, right hairline. Items are 44px tall, 8px radius, 20px outline icon plus 14px medium label. Idle: muted slate, hover slate tint with ink. Active: blue tint with deep blue ink, `aria-current="page"`. Groups expand with a rotating chevron and indent children behind a left hairline. The collapsed rail shows icons only, with groups opening as a side popover. Admin pages (Users, Roles, Emails, Login security, Audit log, Companies) sit below a hairline divider and a 12px semibold muted "Administration" label; the rail keeps the divider only, and a section with nothing to open is not drawn. +- **Header:** white, bottom hairline, 56px; the link back to the parent page left (sub-pages only); company picker (a styled select), locale switcher, theme toggle and user menu (blue avatar initial) right. ### Data States - Empty: centred muted icon, 14px muted message and a corrective action. Error: a 40% red-bordered panel on 5% red with an alert icon and an outline Retry. Loading: skeleton rows in a bordered surface. @@ -253,4 +259,4 @@ Quiet, compact, unmistakable. - **Don't** add a second typeface or a display face; Inter carries everything. - **Don't** use semantic or chart tones to mark something clickable. - **Don't** add shadows beyond the four steps, or let a shadow stand in for a hairline. -- **Don't** apply this system to the booth (My QR), visitor pages (/r, /i, /c) or login screens piecemeal; they move onto it in their own follow-up change. +- **Don't** brand the visitor pages per company (logo or colour) without an owner decision; they stay on the neutral Co-Lite tokens. diff --git a/solvway-admin-portal/app/c/[token]/page.card.test.tsx b/solvway-admin-portal/app/c/[token]/page.card.test.tsx index b8e673a..2ae6921 100644 --- a/solvway-admin-portal/app/c/[token]/page.card.test.tsx +++ b/solvway-admin-portal/app/c/[token]/page.card.test.tsx @@ -44,6 +44,12 @@ describe("/c visitor card", () => { expect(h1s().map((h) => h.textContent)).toEqual(["Expo 2026"]); }); + it("loading icon spins", () => { + mocks.getCheckin.mockReturnValue(new Promise(() => {})); + render(); + expect(screen.getByRole("status").querySelector("svg")).toHaveClass("motion-safe:animate-spin"); + }); + it("welcome shows an icon and heading under the event header", async () => { const user = userEvent.setup(); render(); diff --git a/solvway-admin-portal/app/c/[token]/page.tsx b/solvway-admin-portal/app/c/[token]/page.tsx index d25d82d..2abed69 100644 --- a/solvway-admin-portal/app/c/[token]/page.tsx +++ b/solvway-admin-portal/app/c/[token]/page.tsx @@ -59,12 +59,12 @@ export default function CheckinPage() { } const open = state?.state === "OPEN" ? state : null; - const alone = (icon: typeof Clock, heading: string, role: "status" | "alert", tone?: "error") => ( - + const alone = (icon: typeof Clock, heading: string, role: "status" | "alert", tone?: "error", iconClassName?: string) => ( + ); - if (phase === "loading") return alone(Loader2, t("UiLoading"), "status"); + if (phase === "loading") return alone(Loader2, t("UiLoading"), "status", undefined, "motion-safe:animate-spin"); if (phase === "inactive") return alone(AlertCircle, t("RegInactive"), "alert"); - if (phase === "error" || !state) return alone(AlertCircle, error ?? "", "alert", "error"); + if (phase === "error" || !state) return alone(AlertCircle, error ?? t("RegLoadFailed"), "alert", "error"); if (!open) return alone(Clock, state.state === "NOT_YET" ? t("ChkNotYet", { date: state.startDate }) : t("ChkEnded"), "status"); let body; diff --git a/solvway-admin-portal/app/components/app/AuthFrame.tsx b/solvway-admin-portal/app/components/app/AuthFrame.tsx index 048644b..54d2302 100644 --- a/solvway-admin-portal/app/components/app/AuthFrame.tsx +++ b/solvway-admin-portal/app/components/app/AuthFrame.tsx @@ -13,16 +13,13 @@ const PANEL_POINTS = [ ] as const; // Two-column frame shared by the signed-out pages (login, forced password change): an accent panel -// with the giraffe-spot coat on the left from lg, the page's own content on the right. Below lg the +// on the left from lg, the page's own content on the right. Below lg the // panel folds into a compact brand row above the content. export default function AuthFrame({ children }: { children: ReactNode }) { const t = useT(); return (