Skip to content

Split Admin mega-page into Overview/People/Content/System sub-routes - #34

Merged
duckyquang merged 1 commit into
mainfrom
feat/batch-6-editor-admin-split
Jul 13, 2026
Merged

Split Admin mega-page into Overview/People/Content/System sub-routes#34
duckyquang merged 1 commit into
mainfrom
feat/batch-6-editor-admin-split

Conversation

@duckyquang

Copy link
Copy Markdown
Member

Unit 6 of the framed-workspace redesign batch: editor/moderator portals, headlined by the Admin IA split.

What changed

Task A — Admin split (13-section scroll page → 4 sub-routes)

  • src/pages/editor/Admin.jsx: default export is now AdminLayout (title + subtitle + .admin-nav tab header + global EmailStatusBanner + <Outlet />). The 13 existing section components are untouched and regrouped into named exports:
    • AdminOverview (/editor/admin): AnalyticsCards + NewsPoster (director-only)
    • AdminPeople (people): People, Applications, Moderation, ReferralLeaderboard
    • AdminContent (content): ProgramsPanel, CompetitionsAdmin, GlobalEvents, Archive
    • AdminSystem (system): AuditLog, Integrations (director-only), Backup (director-only), SetupGuide
  • src/pages/editor/EditorApp.jsx: nested admin routes with a wildcard redirect back to /editor/admin.
  • Hash-compat: legacy #adm-<section> deep links redirect to the hosting tab (replace: true, hash preserved) and scroll the section into view after render.
  • id="adm-*" wrappers kept; auditors see all four tabs with director-only sections omitted (same conditionals as before).
  • views.js verified (matches sub-paths via startsWith) — not edited.

Task B — design-audit sweep

  • Owned CSS region: .admin-nav pills extended to NavLinks with an accent active state (var(--accent, var(--brand-deep)) fallback until the new token layer lands) and a transform-only 150ms ease-out :active press. New-token usage carries old-token fallbacks so the branch renders correctly pre- and post-token-merge.
  • DirectorDashboard.jsx: replaced off-palette fallback hexes (#e5484d, #4f7cff) on workload bars with token values.
  • Remaining owned files (EditorDashboard, Email, PaperModal, ModeratorConsole/App) were already token-clean — no raw hexes, sane button hierarchy — so no churn.

Testing

  • Backend suite: 25 files / 201 tests pass.
  • E2E on backend :4006 + vite :5206: admin (director powers) and auditor walked all four tabs; #adm-programs → Content and #adm-setup → System (with scroll) deep links verified; wildcard /editor/admin/bogus redirects; client-side tab switching keeps the sidebar Admin item active; editor review queue, Director Desk, and moderator console all render; light + dark at 1440px and 375px.
  • npm run build clean (docs/ artifacts reverted per batch convention).

🤖 Generated with Claude Code

…ystem)

- Admin.jsx default export is now AdminLayout: page title + tab header
  (NavLinks reusing .admin-nav) + global EmailStatusBanner + <Outlet />.
  The 13 section components are unchanged and regrouped into named
  exports AdminOverview / AdminPeople / AdminContent / AdminSystem,
  keeping the id="adm-*" section wrappers and mirroring today's
  director-only conditionals (Integrations, Backup, NewsPoster).
- EditorApp.jsx: nested admin routes with index/people/content/system
  and a wildcard redirect back to /editor/admin.
- Hash-compat: legacy /editor/admin#adm-<section> deep links redirect
  to the tab that hosts the section (replace, hash preserved) and
  scroll it into view after render.
- styles.css (owned region): .admin-nav pills now also style NavLinks,
  with an accent active state and a transform-only :active press.
- DirectorDashboard: replace off-palette fallback hexes on the
  workload bars with token-based values.

Co-Authored-By: Claude Fable 5 <[email protected]>
@vercel

vercel Bot commented Jul 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dashboard Error Error Jul 12, 2026 9:15am

@duckyquang
duckyquang merged commit 9a18e8d into main Jul 13, 2026
3 of 4 checks passed
duckyquang added a commit that referenced this pull request Jul 13, 2026
…ration tree

Those four unit branches are already fully contained in this branch with
their conflicts resolved against the unit-1 foundation (which main does not
have yet). main introduced no other content, so the integrated tree is kept
as-is.

Co-Authored-By: Claude Fable 5 <[email protected]>
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