Skip to content

[Refactor] Blazor Blueprint app shell and Blazor Web App hosting - #56

Merged
samatstariongroup merged 2 commits into
developmentfrom
feature/blazor-blueprint-shell
Oct 18, 2026
Merged

samatstariongroup merged 2 commits into
developmentfrom
feature/blazor-blueprint-shell

Conversation

@samatstariongroup

Copy link
Copy Markdown
Member

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the reqifviewer code style guidelines
  • I have provided test coverage for my change (where applicable)

Description

First step of revamping the viewer UI with Blazor Blueprint. This PR replaces the app shell only; the pages keep their Radzen components and are migrated in follow-up PRs.

Hosting

  • Moves from _Host.cshtml to the Blazor Web App model: App.razor is the host page, Routes.razor the router, and the app runs with the InteractiveServer render mode (MapRazorComponents / MapStaticAssets).

Shell

  • New MainLayout built on BbSidebarProvider: a sticky header with the sidebar toggle, About, GitHub and a light/dark toggle (BbDarkModeToggle; the choice is saved in local storage and applied before the first paint).
  • SideMenu is now a BbSidebar: one group per loaded ReqIF document with Statistics, a foldable Specifications list, Spec Objects, Spec Relations, Relation Matrix, External Objects and a foldable Types group. It collapses to an icon rail. Version and copyright moved from the footer bar to the sidebar footer.
  • SideMenu now unsubscribes from ReqIfChanged on dispose and re-renders through InvokeAsync.
  • Theme in wwwroot/css/theme.css (light and dark CSS variables, blue primary colour).

Transition

  • BlazorStrap.V5 is removed (it was only used for the off-canvas menu).
  • Radzen and Blueprint define types with the same names (DialogService, ButtonSize), so Blueprint is imported per folder via Shared/_Imports.razor.
  • Bootstrap and Radzen styles are not in a cascade layer and override Blueprint. A marked "bridge" section in app.css undoes the collisions and maps the Radzen theme variables onto the Blueprint theme, so the existing pages already follow light and dark mode. It goes away once the pages are migrated.
  • No Tailwind build is added: our own layout CSS lives in scoped .razor.css files.

Also fixed

  • launchSettings.json: dotnetRunMessages was the string "true", so dotnet run ignored the whole profile, ran outside Development and returned 500 for _content/ and _framework/ assets.

Testing

  • dotnet build clean; the 17 existing tests pass. No new tests: the change is layout and styling; SideMenu would be a good candidate for a bUnit test in the next PR.
  • Checked in Chrome with ProR_Traceability-Template-v1.0.reqif: loading a file, sidebar navigation to Statistics, a specification, Spec Objects and Data Types, folding Types, light/dark switching (including the Radzen grids), and collapsing the sidebar to the icon rail.
  • Not yet checked: the Docker image (./docker-build-local.sh).

Next steps

  1. New home page: drag-and-drop upload (BbFileUpload) and a "try a sample file" button.
  2. Migrate the pages from Radzen to Blueprint (cards and headings first, then the data grids and the tree), then remove Radzen and Bootstrap.
  3. Document view (specification tree beside the text), Ctrl+K search (BbCommand), breadcrumbs, charts on the statistics page.

🤖 Generated with Claude Code

samatstarion and others added 2 commits October 18, 2026 14:41
- Move from _Host.cshtml to the Blazor Web App model: App.razor is the host
  page, Routes.razor the router, InteractiveServer render mode.
- Replace the Radzen layout and the BlazorStrap off-canvas menu with a
  Blazor Blueprint sidebar, a header with About, GitHub and a light/dark
  toggle, and a theme in wwwroot/css/theme.css.
- Remove BlazorStrap.V5. Pages still use Radzen and the Bootstrap grid; a
  bridge section in app.css maps the Radzen theme onto the Blueprint theme so
  they follow light and dark mode until they are migrated.
- Import Blazor Blueprint per folder (Shared/_Imports.razor), because Radzen
  and Blueprint define types with the same names.
- SideMenu unsubscribes from ReqIfChanged on dispose and re-renders on the
  renderer's thread.
- Fix launchSettings.json: dotnetRunMessages must be a boolean, otherwise
  dotnet run ignores the profile and runs outside Development.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Unknown addresses show a "Page not found" page inside the app with a 404
  status, instead of an empty 404 (UseStatusCodePagesWithReExecute and the
  Router's NotFoundPage).
- The sidebar uses CreateUrl() for specification links and a new
  ExtractDisplayText() for their names, following the display-name order of
  ExtractDisplayName() as plain text.
- "Open a file" is highlighted on the home page; an empty Href never counted
  as active, so the home links now use "/".
- The GitHub link keeps rel="noopener noreferrer" from BbButton.
- The sidebar drawer closes after navigating on small screens.
- Tests for SideMenu, MainLayout, ExtractDisplayText and the hosting (host
  page, stylesheet order, not-found page): 24 new tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

This was referenced Oct 18, 2026
@samatstariongroup
samatstariongroup merged commit b10dae4 into development Oct 18, 2026
3 checks passed
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