Skip to content

Split Area for pages #51411

@Alerinos

Description

@Alerinos

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

Many systems like mine have Areas.
Let's assume that in my case it looks like this:

  • Web, this is an area available to anyone
  • Manage, this is the area available to the logged in person
  • Management, this is an area available only to administration.

This is how my plugin tree looks like:

├───Areas
│   ├───Manage
│   │   │   _Imports.razor
│   │   │
│   │   └───Pages
│   │           Edit.razor
│   │           Edit.razor.cs
│   │           List.razor
│   │           List.razor.cs
│   │
│   ├───Management
│   │   │   _Imports.razor
│   │   │
│   │   └───Pages
│   │           Draft.razor
│   │           Draft.razor.cs
│   │           Edit.razor
│   │           Edit.razor.cs
│   │           List.razor
│   │           List.razor.cs
│   │
│   └───Web
│       │   _Imports.razor
│       │
│       ├───Pages
│       │       Article.razor
│       │       Article.razor.cs
│       │       Articles.razor
│       │       Articles.razor.cs
│       │       Search.razor
│       │       Search.razor.cs
│       │
│       └───Shared
│               ArticleCardCaption.razor
│               ArticleHead.razor
│               ArticlePopular.razor

You used to be able to separate everything into arenas that were separated, they could have their App.razor and Routing.razor.
Now it's all lumped into one ``bag''.

endpoints.MapRazorComponents<Areas.Web.App>()
                    .AddInteractiveServerRenderMode()
                    .AddInteractiveWebAssemblyRenderMode()
                    .AddAdditionalAssemblies(assemblyWeb);

endpoints.MapRazorComponents<Areas.Manager.App>()
                    .AddInteractiveServerRenderMode()
                    .AddInteractiveWebAssemblyRenderMode()
                    .AddAdditionalAssemblies(assemblyManager);

endpoints.MapRazorComponents<Areas.Management.App>()
                    .AddInteractiveServerRenderMode()
                    .AddInteractiveWebAssemblyRenderMode()
                    .AddAdditionalAssemblies(assemblyManagement);

It is now possible to solve this problem but only by creating a solucja (we are coming up with three more solucja). I think this is a bad solution and we need to have an impact on which pages should appear in routing.

If we add a component in AdditionalAssemblies it finds all other components from a given soluition. Instead of taking the Assmelby parameter, you can change it to Type[], then we can indicate the exact location of the component in question

Describe the solution you'd like

I would like it to be possible to indicate exactly the components to be under a given routing. He wants to separate everything. Each area has different values.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Pillar: Complete Blazor WebPriority:2Work that is important, but not critical for the releasearea-blazorIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing onefeature-blazor-areas

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions