Skip to content

Conversation

@msynk
Copy link
Member

@msynk msynk commented Jun 11, 2025

closes #10968

Summary by CodeRabbit

  • Refactor

    • Updated namespaces across multiple components for improved organization and consistency.
    • Renamed several classes for clarity.
    • Added and adjusted Razor imports files to streamline component references.
  • Style

    • Updated SCSS import paths and cleaned up unused or redundant stylesheets.
    • Simplified and reorganized component styles for better maintainability.
  • Bug Fixes

    • Improved formatting of user count display in the roles management UI.
  • Chores

    • Removed unused or unnecessary using directives and minor formatting adjustments.

@msynk msynk requested a review from ysmoradi June 11, 2025 13:34
@coderabbitai
Copy link

coderabbitai bot commented Jun 11, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This change reorganizes namespaces and file structures for components in the Boilerplate project template, aligning them with a more logical and maintainable hierarchy. Several class and namespace renamings were performed, SCSS import paths were adjusted, and redundant or obsolete files were removed or updated. No functional logic was altered.

Changes

File(s) / Group Change Summary
.../Boilerplate.Client.Core/Boilerplate.Client.Core.csproj Added default import for Boilerplate.Client.Core.Components.Common namespace.
.../Components/Common/*.razor.cs, .../Components/Common/RedirectToSignIn.cs Moved components to Common namespace; renamed RedirectToSignInPageRedirectToSignIn.
.../Components/Layout/Header/*.razor.cs Moved header-related components to Layout.Header namespace.
.../Components/Layout/_Imports.razor, .../Components/Pages/Settings/_Imports.razor Added new Razor imports files for layout and settings directories.
.../Components/Pages/Categories/.razor.cs, .../Components/Pages/Dashboard/.razor.cs Changed namespaces from Authorized.* to direct subfolders (e.g., Pages.Categories).
.../Components/Pages/Management/*.razor.cs Changed namespaces from Authorized.Management to Pages.Management.
.../Components/Pages/Products/*.razor.cs Changed namespaces from Authorized.Products to Pages.Products.
.../Components/Pages/Settings/**/*.razor.cs Changed namespaces from Authorized.Settings to Pages.Settings (and subfolders).
.../Components/Pages/SystemPromptsPage.razor.cs, .../Components/Pages/TodoPage.razor.cs Changed namespaces from Authorized.* to Pages.
.../Components/Layout/AppErrorBoundary.razor.cs, .../Components/Common/Prompt.razor.cs Changed namespaces to match new structure.
.../Components/AppClientCoordinator.cs Renamed class ClientAppCoordinatorAppClientCoordinator.
.../Components/Pages/Settings/SettingsPage.razor Removed unused @using directive.
.../Components/Pages/Management/RolesPage.razor Changed UI: user count now displayed in parentheses.
.../Components/Pages/Settings/TwoFactorSection.razor.scss Added new SCSS file for section width.
.../Components/Pages/Settings/UpgradeAccountSection.razor.scss Simplified CSS, removed empty selector.
.../Components/Pages/Categories/AddOrEditCategoryModal.razor.scss Removed unused CSS variable import.
.../Components/Pages/Settings/UpgradeAccountSection.razor.scss, .../UpgradeAccountSection.razor.scss Deleted obsolete or redundant SCSS files.
.../Components/Layout/Header/.razor.scss, .../Pages/**/.razor.scss Updated SCSS import paths to match new directory structure.
.../Components/_Imports.razor Removed trailing newline.
.../Services/PromptService.cs Added BOM character (no functional change).
.../Server/Boilerplate.Server.Web/Components/_Imports.razor Added using directive for Common components.

Sequence Diagram(s)

Not applicable: The changes are limited to namespace restructuring, file moves, and minor non-functional updates.

Assessment against linked issues

Objective (Issue #) Addressed Explanation
Refactor and improve the file structure and namespaces of components (#10968)

Assessment against linked issues: Out-of-scope changes

No out-of-scope functional code changes detected.

Poem

🐇
A hop, a skip, a tidy warren—
Names and files are now less foreign!
With folders neat and namespaces bright,
Our codebase shines, a lovely sight.
So let us thump with joyful glee,
For structure brings us harmony!
🥕

✨ Finishing Touches
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Commit Unit Tests in branch 10968-templates-boilerplate-file-structure-improvements
  • Post Copyable Unit Tests in Comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (3)
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Categories/AddOrEditCategoryModal.razor.cs (1)

1-4: Same namespace update — see earlier verification note

The change mirrors the dashboard refactor; nothing further.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Categories/CategoriesPage.razor.cs (1)

1-5: Namespace update mirrors prior comment

No additional issues spotted.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/TwoFactorSection.razor.cs (1)

1-4: Namespace realignment consistent

Change is identical in spirit to previous files; nothing else to flag.

🧹 Nitpick comments (6)
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Categories/CategoriesPage.razor.scss (1)

1-2: Validate and centralize SCSS imports. The reduced ../../../Styles/abstracts path aligns with other component stylesheets—please confirm these imports still resolve correctly after the change. Consider using a shared index file or Sass alias to minimize fragile relative paths.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Header/AppMenu.razor.scss (1)

1-2: Confirm updated SCSS import paths for AppMenu. Paths were adjusted to ../../../Styles/abstracts/... to match the new folder structure. Please verify these partials still compile and consider centralizing imports if this pattern repeats.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Management/RolesPage.razor (1)

118-118: Validate header text localization with zero-count case.
Currently the code always invokes Localizer even when selectedRoleUsers.Count is 0, passing an empty string which may produce a trailing space or unintended output. Consider moving the count check outside the localization call to only invoke Localizer when Count > 0, e.g.:

HeaderText="@(selectedRoleUsers.Count > 0
  ? Localizer[nameof(AppStrings.UsersWithCount), $"({selectedRoleUsers.Count})"]
  : string.Empty)"
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Boilerplate.Client.Core.csproj (1)

47-47: Add <Using> for new common components namespace
Including Boilerplate.Client.Core.Components.Common ensures shared components are globally available. For consistency, consider placing it alphabetically before the Layout entry.

Proposed diff:

-        <Using Include="Boilerplate.Client.Core.Components.Layout" />
-        <Using Include="Boilerplate.Client.Core.Components.Common" />
+        <Using Include="Boilerplate.Client.Core.Components.Common" />
+        <Using Include="Boilerplate.Client.Core.Components.Layout" />
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Dashboard/DashboardPage.razor.cs (1)

1-1: Remove unintended BOM/invisible character.
The file begins with a byte order mark or zero-width character before the //+:cnd:noEmit comment. This can cause encoding inconsistencies and build issues. Please save the file in UTF-8 without BOM.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Dashboard/OverallStatsWidget.razor.cs (1)

1-1: Remove unintended BOM/invisible character.
An extra BOM or zero-width character appears before the first using directive. Please ensure the file is encoded as UTF-8 without BOM to avoid hidden characters in source control.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Knowledge Base: Disabled due to Reviews > Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between c698a2a and 67ff21f.

📒 Files selected for processing (60)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Boilerplate.Client.Core.csproj (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/AppClientCoordinator.cs (2 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/AppErrorBoundary.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Common/AppPageData.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Common/LoadingComponent.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Common/Prompt.razor.cs (2 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Common/RedirectToSignIn.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/AppErrorBoundary.razor.scss (0 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Header/AppMenu.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Header/AppMenu.razor.scss (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Header/DiagnosticSpacer.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Header/Header.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Header/Header.razor.scss (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Header/IdentityHeader.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Header/IdentityHeader.razor.scss (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Header/SignOutConfirmDialog.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/_Imports.razor (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Authorized/Settings/UpgradeAccountSection.razor.scss (0 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Categories/AddOrEditCategoryModal.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Categories/AddOrEditCategoryModal.razor.scss (0 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Categories/CategoriesPage.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Categories/CategoriesPage.razor.scss (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Dashboard/DashboardPage.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Dashboard/OverallStatsWidget.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Dashboard/OverallStatusCard.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Dashboard/OverallStatusCard.razor.scss (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Dashboard/ProductsCountPerCategoryWidget.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Dashboard/ProductsCountPerCategoryWidget.razor.scss (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Dashboard/ProductsPercentageWidget.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Dashboard/ProductsPercentageWidget.razor.scss (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Management/RolesPage.razor (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Management/RolesPage.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Management/RolesPage.razor.scss (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Management/UsersPage.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Management/UsersPage.razor.scss (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Products/AddOrEditProductPage.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Products/ProductsPage.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Products/ProductsPage.razor.scss (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/Accordion.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/Account/AccountSection.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/Account/ChangeEmailTab.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/Account/ChangePhoneNumberTab.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/Account/DeleteAccountTab.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/Account/PasswordlessTab.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/ProfileSection.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/SessionsSection.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/SessionsSection.razor.scss (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/SettingsPage.razor (0 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/SettingsPage.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/TwoFactorSection.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/TwoFactorSection.razor.scss (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/UpgradeAccountSection.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/UpgradeAccountSection.razor.scss (0 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/_Imports.razor (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/SystemPromptsPage.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/TodoPage.razor.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/TodoPage.razor.scss (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/_Imports.razor (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/PromptService.cs (1 hunks)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Web/Components/_Imports.razor (1 hunks)
💤 Files with no reviewable changes (5)
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/SettingsPage.razor
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/UpgradeAccountSection.razor.scss
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/AppErrorBoundary.razor.scss
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Authorized/Settings/UpgradeAccountSection.razor.scss
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Categories/AddOrEditCategoryModal.razor.scss
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Management/RolesPage.razor.cs (1)
src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/AppFeatures.cs (1)
  • Management (10-20)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build and test
🔇 Additional comments (48)
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/Account/AccountSection.razor.cs (1)

3-3: Updated file-scoped namespace is correct
The removal of the Authorized segment aligns with the new directory structure and employs C# 10 file-scoped namespace syntax. Ensure the physical folder path matches .../Pages/Settings/Account to avoid any mismatches during compilation.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Products/ProductsPage.razor.scss (1)

1-2: Corrected SCSS import paths
The adjusted relative paths now correctly resolve to src/Client/Boilerplate.Client.Core/Styles/abstracts/..., matching the project’s directory structure and keeping imports consistent across components.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Products/ProductsPage.razor.cs (1)

5-5: Verify namespace-consistency in Razor markup
The code-behind namespace was updated to Boilerplate.Client.Core.Components.Pages.Products to match the new folder layout. Please confirm that the corresponding .razor file’s @namespace (and any route directives) have been updated accordingly to avoid namespace mismatches at build/runtime.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/_Imports.razor (1)

26-26: Approve added import for service contracts.

Including @using Boilerplate.Client.Core.Services.Contracts ensures components in this namespace can reference your service interfaces without fully qualifying them.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/TwoFactorSection.razor.scss (1)

1-3: Approve new component SCSS.

The rule setting section { width: 100%; } in an isolated .razor.scss file will scope to this component only under Blazor's CSS isolation. No global side‐effects are introduced.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Dashboard/ProductsCountPerCategoryWidget.razor.scss (1)

1-1: Approve updated import path.

The adjusted import from ../../../Styles/abstracts/_media-queries.scss correctly reflects the new folder hierarchy.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/TodoPage.razor.cs (1)

4-4: Approve flattened namespace.

Moving TodoPage to Boilerplate.Client.Core.Components.Pages aligns with the updated folder structure and removes the obsolete Authorized segment.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/_Imports.razor (1)

1-2: Centralize Settings namespace imports. Introducing _Imports.razor with @using Boilerplate.Client.Core.Components.Pages.Settings.Account cleans up individual component files. Verify that the custom @*+:cnd:noEmit*@ directive is recognized and applied consistently by your build tooling.

src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Web/Components/_Imports.razor (1)

10-10: Verify necessity of new common components import. Adding @using Boilerplate.Client.Core.Components.Common makes shared client-core components available server-side. Ensure these components are actually referenced to avoid redundant imports.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Common/AppPageData.razor.cs (1)

1-1: Validate namespace alignment with folder structure. The namespace Boilerplate.Client.Core.Components.Common now mirrors the Components/Common directory. Confirm that your project’s default <Using> entries and any _Imports.razor files are updated so all references resolve correctly.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Common/LoadingComponent.razor.cs (1)

2-2: Align file-scoped namespace with folder structure.

The namespace has been updated to Boilerplate.Client.Core.Components.Common, which matches the Components/Common directory.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/AppErrorBoundary.razor.cs (1)

1-1: Align file-scoped namespace with folder.

Updated from .Components.Layout to .Components, matching the file's location in Components/.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Management/RolesPage.razor.scss (1)

1-2: Verify updated SCSS import paths.

Changed imports to ../../../Styles/...; ensure the build resolves these paths correctly and no import errors occur.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Header/Header.razor.scss (1)

1-2: Verify SCSS import path adjustment.

Updated relative imports to ../../../Styles/...; confirm correct file resolution and that styles compile without regressions.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Header/AppMenu.razor.cs (1)

5-5: Align file-scoped namespace with folder structure.

Updated to Boilerplate.Client.Core.Components.Layout.Header, matching the Components/Layout/Header directory.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/_Imports.razor (1)

1-2: Register header namespace for Layout components

The new _Imports.razor correctly imports the Layout.Header namespace, simplifying component usage in this folder.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Header/Header.razor.cs (1)

3-3: Apply C# 10 file-scoped namespace

The namespace is updated to Boilerplate.Client.Core.Components.Layout.Header;, aligning with the directory structure and using the concise file-scoped syntax.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Header/DiagnosticSpacer.razor.cs (1)

1-1: Apply C# 10 file-scoped namespace

Updated namespace to Boilerplate.Client.Core.Components.Layout.Header; to match the Header folder location.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Dashboard/ProductsPercentageWidget.razor.cs (1)

1-1: Align widget with refactored namespace and dependencies

The using Boilerplate.Shared.Controllers.Dashboard directive and file-scoped namespace Boilerplate.Client.Core.Components.Pages.Dashboard; have been updated to reflect the new folder layout and correct controller import.

Also applies to: 3-3

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Dashboard/ProductsPercentageWidget.razor.scss (1)

1-1: Correct SCSS import path depth

The import path for _media-queries.scss is now at three levels up, ensuring the shared style file is resolved correctly.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/SystemPromptsPage.razor.cs (1)

5-5: Namespace updated correctly: The new Boilerplate.Client.Core.Components.Pages namespace aligns with the file’s folder structure and removes the obsolete Authorized segment.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Management/UsersPage.razor.scss (1)

1-2: SCSS import paths updated correctly: Reduced directory traversal to three levels, matching the project’s Styles/abstracts directory and aligning with other .scss files.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/SessionsSection.razor.scss (1)

1-1: SCSS import path adjusted correctly: Reduced one level of traversal to reference _media-queries.scss from the Styles/abstracts folder, consistent with the broader restructure.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/SettingsPage.razor.cs (1)

1-1: Namespace updated correctly: The Pages.Settings namespace now matches the folder path and removes the old Authorized segment. Ensure the newly-added _Imports.razor in this directory includes @using Boilerplate.Client.Core.Components.Pages.Settings.Account.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Management/RolesPage.razor.cs (1)

5-5: Namespace updated correctly: Switching to Pages.Management aligns with the directory structure and drops the deprecated Authorized layer. Verify that the corresponding .razor and styling files reflect this namespace update.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Management/UsersPage.razor.cs (1)

10-10:

✅ Verification successful

Namespace alignment
Namespace updated to Boilerplate.Client.Core.Components.Pages.Management to reflect the new file path. Ensure all references (including razor markup and imports) have been updated from the old Authorized.Management namespace.

Run this script to catch any lingering references:


🏁 Script executed:

#!/bin/bash
rg -n "Boilerplate\.Client\.Core\.Components\.Pages\.Authorized\.Management"

Length of output: 78


🏁 Script executed:

#!/bin/bash
# Search for any lingering references to the old namespace in C# and Razor files
rg -n "Authorized\.Management" -g "*.cs" -g "*.razor"
rg -n "Boilerplate\.Client\.Core\.Components\.Pages\.Authorized" -g "*.cs" -g "*.razor"

Length of output: 145


Namespace alignment confirmed
All references to the old Authorized.Management namespace have been removed or replaced. The namespace

namespace Boilerplate.Client.Core.Components.Pages.Management;

is correctly applied in UsersPage.razor.cs, and no lingering usages were found in any .cs or .razor files.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/ProfileSection.razor.cs (1)

6-6:

✅ Verification successful

Namespace realignment for Settings
Changed to Boilerplate.Client.Core.Components.Pages.Settings to match the relocated folder. Verify that no code still imports the old Authorized.Settings namespace and that _Imports.razor or other usings have been updated accordingly.


🏁 Script executed:

#!/bin/bash
rg -n "Boilerplate\.Client\.Core\.Components\.Pages\.Authorized\.Settings"

Length of output: 76


To ensure we’ve caught all lingering imports and updated your Razor imports as well, let’s broaden the search:


🏁 Script executed:

#!/bin/bash
# 1. Look for any explicit using directives still pointing at the old namespace
rg -n "using Boilerplate\.Client\.Core\.Components\.Pages\.Authorized\.Settings"

# 2. Scan all Razor import files for references to Authorized.Settings
rg -n "Authorized\.Settings" -g "*_Imports.razor"

# 3. Catch any other stray mentions across the repo
rg -n "Authorized\.Settings"

Length of output: 165


Namespace alignment complete

  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/ProfileSection.razor.cs has been updated to
    namespace Boilerplate.Client.Core.Components.Pages.Settings;
  • Ran ripgrep across the repo—no uses of Authorized.Settings remain in code or _Imports.razor files.

No further changes needed.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Header/SignOutConfirmDialog.razor.cs (1)

3-3:

✅ Verification successful

Updated namespace for header component
Moved SignOutConfirmDialog into Layout.Header for clearer separation of header-related components. Confirm that the new _Imports.razor includes this namespace and that consumers have updated imports.


🏁 Script executed:

#!/bin/bash
rg -n "Boilerplate\.Client\.Core\.Components\.Layout\.(?!Header)"

Length of output: 375


To verify that only the Layout.Header namespace is used and that _Imports.razor files include it, let’s run:


🏁 Script executed:

#!/bin/bash
# 1) Find any Layout.* imports outside of Header
grep -R -n "Boilerplate\.Client\.Core\.Components\.Layout\." . | grep -v "Layout\.Header\."

# 2) Ensure all _Imports.razor files include the new Header namespace
find . -name "_Imports.razor" -print0 | xargs -0 grep -Hn "Boilerplate\.Client\.Core\.Components\.Layout\.Header"

Length of output: 1492


Namespace and Imports Verified

  • No stray Boilerplate.Client.Core.Components.Layout.* namespaces outside of Layout.Header
  • _Imports.razor in Components/Layout includes @using Boilerplate.Client.Core.Components.Layout.Header

All good to go.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/TodoPage.razor.scss (1)

1-2:

✅ Verification successful

SCSS import path update
Adjusted relative traversal to two levels up (../../Styles/abstracts/...) to align with the reorganized folder structure. Ensure these partials are reachable and the styles compile without errors.


🏁 Script executed:

#!/bin/bash
# Verify partial locations from this file’s directory
fd --base-directory src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core --relative-path "Styles/abstracts/_media-queries.scss"
fd --base-directory src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core --relative-path "Styles/abstracts/_bit-css-variables.scss"

Length of output: 307


🏁 Script executed:

#!/bin/bash
# Search for the SCSS partials across the repository to confirm their locations
fd --type f --name '_media-queries.scss'
fd --type f --name '_bit-css-variables.scss'

Length of output: 587


🏁 Script executed:

#!/bin/bash
# Properly search for SCSS partials by filename
fd _media-queries.scss -t f
fd _bit-css-variables.scss -t f

Length of output: 937


SCSS import paths validated
Both _media-queries.scss and _bit-css-variables.scss are located at
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Styles/abstracts,
which matches the ../../Styles/abstracts/... imports in TodoPage.razor.scss. No further changes required.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Dashboard/OverallStatusCard.razor.scss (1)

1-1:

✅ Verification successful

SCSS partial import correction
Updated import to ../../../Styles/abstracts/_media-queries.scss reflecting the new component hierarchy. Verify that _media-queries.scss is present at this location and that no build warnings are introduced.


🏁 Script executed:

#!/bin/bash
fd --base-directory src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core --relative-path "Styles/abstracts/_media-queries.scss"

Length of output: 151


🏁 Script executed:

#!/bin/bash
# Search for _media-queries.scss across the entire repository
fd --type f "_media-queries.scss"

Length of output: 507


Import path verified
Confirmed that _media-queries.scss exists at

  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Styles/abstracts/_media-queries.scss
    No build warnings are expected from this import.
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/Accordion.razor.cs (1)

1-1: Ensure namespace alignment and update related references.
The namespace was updated to remove the Authorized segment. Verify that the corresponding .razor markup (and any explicit @namespace directives) and all component imports/usages reflect this change to avoid mismatches at compile or runtime.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Products/AddOrEditProductPage.razor.cs (1)

6-6: Verify namespace update across markup and code-behind.
The Authorized segment was removed from the namespace. Ensure the .razor file’s @namespace (if specified) and any project-level imports or references to this component have been updated accordingly.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/UpgradeAccountSection.razor.cs (1)

3-3: Confirm namespace realignment and razor updates.
The namespace was changed to drop Authorized. Make sure the .razor markup’s namespace and any references (e.g., imports in parent components) are in sync to prevent broken component resolution.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/SessionsSection.razor.cs (1)

5-5: Validate namespace harmonization and matching markup.
The Authorized segment was removed. Verify that the Razor file’s implicit or explicit namespace remains correct and that any using or @using statements are updated so the component still compiles and renders.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Dashboard/OverallStatusCard.razor.cs (1)

1-1: Namespace adjusted to match folder hierarchy
The Boilerplate.Client.Core.Components.Pages.Dashboard namespace now aligns with the file’s path under Components/Pages/Dashboard.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Header/IdentityHeader.razor.scss (1)

1-1: SCSS import path consolidated
Importing only the CSS variables reduces redundancy. The relative path ../../../Styles/abstracts/_bit-css-variables.scss correctly points to the shared variables.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/Account/DeleteAccountTab.razor.cs (1)

3-3:

✅ Verification successful

Namespace updated to remove Authorized segment
The new Boilerplate.Client.Core.Components.Pages.Settings.Account namespace matches the directory structure. Ensure no leftover references to the old Authorized.Settings.Account namespace remain in your _Imports.razor files.


🏁 Script executed:

#!/bin/bash
# Verify no stale references to the old namespace
rg -n "Authorized.Settings.Account"

Length of output: 35


Namespace update verified and no stale references remain
The updated Boilerplate.Client.Core.Components.Pages.Settings.Account namespace aligns with the folder structure. I ran a search for Authorized.Settings.Account across the codebase (including _Imports.razor files) and found no matches.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/Account/ChangeEmailTab.razor.cs (1)

4-4: Namespace realigned with new folder structure
Switching to Boilerplate.Client.Core.Components.Pages.Settings.Account keeps this component consistent with its directory.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/Account/PasswordlessTab.razor.cs (1)

4-4: Namespace updated to match the new folder hierarchy
The namespace now aligns with the Settings/Account directory, reflecting the removal of the obsolete Authorized segment.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/Account/ChangePhoneNumberTab.razor.cs (1)

4-4: Namespace updated to match the new folder hierarchy
The namespace now aligns with the Settings/Account directory, reflecting the removal of the obsolete Authorized segment.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Header/IdentityHeader.razor.cs (1)

1-1: Namespace updated to reflect the new Layout.Header grouping
The namespace now matches the Components/Layout/Header path, ensuring consistency with other header components.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/AppClientCoordinator.cs (2)

21-21: Class renamed to AppClientCoordinator for consistency
The class declaration now matches the filename and new naming conventions across the project.


36-36: Logger injection updated to use the new class type
Injected ILogger<AppClientCoordinator> replaces the old ILogger<ClientAppCoordinator>, keeping logging aligned with the renamed class.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Common/Prompt.razor.cs (1)

1-1: Namespace updated to Common to categorize shared components
Moved the Prompt component into the Components.Common namespace to better reflect its role.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Dashboard/ProductsCountPerCategoryWidget.razor.cs (1)

1-3:

✅ Verification successful

Namespace refactor approved – please sweep for dangling references

The Authorized segment has been cleanly removed from the namespace and import lines. Looks good, but please make sure no other files still reference the old namespace to avoid silent runtime failures.


🏁 Script executed:

#!/bin/bash
# Search the entire repo for any remaining usages of the removed “Authorized” namespaces
rg -n 'Boilerplate\.Client\.Core\.Components\.Pages\.Authorized' -g '*.cs'

Length of output: 76


🏁 Script executed:

#!/bin/bash
# Comprehensive search for the removed “Authorized” namespace across all files
rg -n 'Boilerplate\.Client\.Core\.Components\.Pages\.Authorized'
# Fallback search for any usage of “Pages.Authorized” in the repo
rg -n 'Pages\.Authorized'

Length of output: 94


No remaining Authorized namespace references found

I performed a comprehensive search across all source files for the old Boilerplate.Client.Core.Components.Pages.Authorized namespace and found no occurrences. You can safely merge these changes.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Common/RedirectToSignIn.cs (1)

1-3: Component moved to Common – all good

Move to Components.Common makes sense; ensure all Razor views import the new namespace (the server _Imports.razor already does).

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Dashboard/DashboardPage.razor.cs (1)

4-4: Approve namespace alignment.
Updating the namespace from .Authorized.Dashboard to .Dashboard correctly mirrors the new folder structure and simplifies the component hierarchy.

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Dashboard/OverallStatsWidget.razor.cs (1)

4-4: Approve namespace alignment.
Changing the namespace to .Dashboard accurately reflects the component’s new location and maintains consistency across related widgets.

@msynk msynk merged commit 64efe4d into bitfoundation:develop Jun 11, 2025
3 checks passed
@msynk msynk deleted the 10968-templates-boilerplate-file-structure-improvements branch June 11, 2025 17:05
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.

The file structure of the components needs improvement in the Boilerplate project template

1 participant