Skip to content

Add the admin shell and settle the ADR-0011 primitives spike - #2444

Merged
pournasserian merged 2 commits into
v2from
2434-admin-spike
Oct 18, 2026
Merged

pournasserian merged 2 commits into
v2from
2434-admin-spike

Conversation

@pournasserian

Copy link
Copy Markdown
Member

Refs #2434

What

  • FluentCMS.Admin becomes a Razor class library that FluentCMS.Host serves as a Blazor Web App with interactive server rendering per page: root component with dir and the theme class on <html>, routes, layout, a placeholder home page, and the /ui-spike page (Development only, 404 elsewhere). Admin still references only Core.
  • Tailwind CSS v4 through the standalone CLI from an MSBuild target in the Admin project: pinned version, SHA-256 checked against the release checksums, downloaded once per machine into a cache, TailwindExecutable for offline builds, a CI cache keyed on the version. The shadcn "neutral" tokens are ported verbatim for light and dark. Documented in CONTRIBUTING.
  • Dialog, DropdownMenu and Command on our own headless primitives in Components/Ui: native <dialog>, the Popover API, Invoker Commands and CSS anchor positioning, with wwwroot/js/admin.js as the one interop module (focus wrapping, roving tab index, typeahead, client-side filtering, and fallbacks for the two newest platform features). Same class names as the shadcn examples, physical utilities swapped for logical ones.
  • The spike record in docs/spikes/2026-10-admin-primitives.md with the comparison against Blazor Blueprint's headless layer, and ADR-0011 set to accepted with the outcome written into its open section.
  • bUnit tests for the three components and integration tests for the shell and the showcase route.

Why

ADR-0011 left one point open: write the headless primitives, or build on Blazor Blueprint's headless layer. The spike built Dialog, DropdownMenu and Command both ways with the same shadcn classes and compared them on keyboard and screen-reader behaviour, RTL, behaviour over an interactive-server circuit including a forced reconnect, dependency size and maintenance activity.

Own primitives won. Blueprint's headless package has no Command primitive, so one of the three would have been ours anyway or a dependency on its styled package. Its overlays keep their open state on the server and need a portal host inside an interactive subtree, which per-page render modes make awkward, while the native variant keeps working through a lost circuit and after a pause and resume. Keyboard and screen-reader behaviour was otherwise equivalent, with the native variant ahead on three details (inert page behind a modal, focus on the first menu item, focus back to the trigger after Escape). The wrappers needed to put the shadcn classes on Blueprint were as long as the primitives themselves, the package adds 891 KB of assembly and 212 KB of JavaScript for two components, and the project has shipped three major versions in eight months from one maintainer.

To see the comparison before deciding: commit 4595d28 on this branch holds both variants side by side (git checkout 4595d282, dotnet run --project src/FluentCMS.Host -- --environment Development, open /ui-spike; ?dir=rtl and ?theme=dark switch direction and theme). The final commit deletes the losing variant.

Checklist

  • Linked to an issue a maintainer has confirmed
  • Targets v2 (or dev for a v1 security fix)
  • Tests or docs updated where behaviour changed
  • No tool-generated co-author trailers or footers

@pournasserian pournasserian mentioned this pull request Oct 17, 2026
19 tasks done
@pournasserian pournasserian added v2 FluentCMS v2 (v2 branch) type:chore Repository, tooling or housekeeping area:infra Persistence, host, CI and build labels Oct 17, 2026
@pournasserian pournasserian added this to the M1 Governance core milestone Oct 17, 2026
@pournasserian
pournasserian merged commit b4d1a24 into v2 Oct 18, 2026
2 checks passed
@pournasserian
pournasserian deleted the 2434-admin-spike branch October 18, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:infra Persistence, host, CI and build type:chore Repository, tooling or housekeeping v2 FluentCMS v2 (v2 branch)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant