-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blazor: More flexible Router / layout display #10493
Comments
Discussed this offline. We don't have clear picture regarding this adding value or not. |
Reactivating this based on API review discussions. This solve a bunch of hard layering problems that we think are worth taking on. We can think of a few practical design issues in this area that will help users as well, and decoupling all of these things is a good long term choice. We're planning to move the authorization features to We're planning to move the forms support to We plan to drop |
How does this affect #10445. Should we fold this into here? |
If we are considering moving forms and authorization out of M.A.Components. Should we also consider move Routing support to Microsoft.AspnetCore.Components.Routing?
Thoughts? |
We were talking about this today, and we don't have a really clear picture of what advantage this provides. If you want to make a case for it - what types would move there and what are the advantages of this? |
Done in #12800 |
Currently, we have a hardcoded set of assumptions about what you want to do with a router, i.e.,
The logic for this is all internal to
Router
andLayoutDisplay
(being renamed toPageDisplay
). Instead of this, we could reduceRouter
to be a templated component that just finds a page and parameters for you. Then you could choose how to render that, and where authorization wrappers go, etc., yourself.Example:
This would completely nuke issue #10445 in the most comprehensive manner.
One drawback is the amount of repetition of specifying
<LayoutDisplay Layout="@typeof(MainLayout)">
here, but doing this does eliminate any need for aDefaultLayout
concept, and completely decouplesRouter
,AuthorizeView
, andLayoutDisplay
from each other. They would no longer need to have any awareness of each others' existence.@rynowak @danroth27 @javiercn What's your gut response to this? Does it look too complicated, or do you think the flexibility warrants all the explicit code?
Plan
LayoutView
RouteView
Router
to new factoringAuthorizeRouteView
RemoveNo, keeping it.CascadingAuthenticationState
PageDisplay
The text was updated successfully, but these errors were encountered: