Page management, step 3: section types with their own settings; the front page as sections

Migration 083 gives the section types that need more than blocks their
own tables (hero, slides, countdown, stats, paths, featured cards, the
Community blog's slots, pinned posts and feeds) and turns the front page
into Home's sections: the hero, then its bands in order. Any section can
be hidden. The Front page editor, its tables and the Community page's
are gone; /api/front-page and /api/community-blog fold into the page's
sections (sectionData.js). The admin engine reads and writes a child
collection's own side tables and gated nested collections.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aidan Dona 2026-10-17 00:34:56 -05:00
parent f33c0008fe
commit f1a0b06ac2
46 changed files with 1525 additions and 1339 deletions

View file

@ -14,13 +14,12 @@ import { AuthProvider, RequireAuth } from "./lib/auth.tsx"
import RequireRole from "./pages/admin/RequireRole.tsx"
/*Pages*/
// Home is the landing page, so it ships in the main bundle. Every
// other page, and all of the admin, is fetched when first visited:
// a visitor to the front page never downloads the admin, the QR
// encoder, the calendar or the group map. Layout and AdminLayout
// wrap their <Outlet /> in <Suspense>, so the header stays put while
// a page loads.
import Home from "./pages/Home.tsx"
// Every page, the front page included, and all of the admin, is
// fetched when first visited: a visitor never downloads the admin,
// and a page's own parts come with it. The front page's data is asked
// for by its HTML before this runs (pageMeta.js, preload). Layout and
// AdminLayout wrap their <Outlet /> in <Suspense>, so the header stays
// put while a page loads.
/* A page's chunk can be missing when a deploy replaced the build while
this tab still ran the old one. Reload once to pick up the new
@ -51,6 +50,8 @@ const lazyPage = (load) =>
)
// Every page at its address (Pages → Page management): its sections.
const PageAtPath = lazyPage(() => import("./pages/PageAtPath.tsx"))
// The front page: its sections, in the front page's layout.
const SitePage = lazyPage(() => import("./pages/SitePage.tsx"))
// Profile accounts (076): signing in, an invite's welcome, the profile.
const SignIn = lazyPage(() => import("./pages/SignIn.tsx"))
const AccountWelcome = lazyPage(() => import("./pages/AccountWelcome.tsx"))
@ -91,7 +92,7 @@ export default function App() {
<Routes>
{/* Layout renders the nav once and swaps page content into <Outlet /> */}
<Route element={<Layout />}>
<Route index element={<Home />} />
<Route index element={<SitePage key="home" id="home" />} />
<Route path="/events/:id" element={<EventDetail />} />
<Route path="/regions/:id" element={<OrganizationDetail />} />
<Route path="/groups/:id" element={<OrganizationDetail />} />