Repository navigation
Add the admin shell and settle the ADR-0011 primitives spike - #2444
Merged
Merged
Conversation
19 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #2434
What
FluentCMS.Adminbecomes a Razor class library thatFluentCMS.Hostserves as a Blazor Web App with interactive server rendering per page: root component withdirand the theme class on<html>, routes, layout, a placeholder home page, and the/ui-spikepage (Development only, 404 elsewhere). Admin still references only Core.TailwindExecutablefor offline builds, a CI cache keyed on the version. The shadcn "neutral" tokens are ported verbatim for light and dark. Documented in CONTRIBUTING.Components/Ui: native<dialog>, the Popover API, Invoker Commands and CSS anchor positioning, withwwwroot/js/admin.jsas 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.docs/spikes/2026-10-admin-primitives.mdwith the comparison against Blazor Blueprint's headless layer, and ADR-0011 set to accepted with the outcome written into its open section.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=rtland?theme=darkswitch direction and theme). The final commit deletes the losing variant.Checklist
v2(ordevfor a v1 security fix)