Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
5fff491
Add re-exec tests for SSR + move NotFound sources into one directory.
ilonatommy May 21, 2025
66cc974
Per-component interactivity: test navigation to non-existing page.
ilonatommy May 21, 2025
8907524
Add streaming SSR tests.
ilonatommy May 21, 2025
3b89c4b
Clean up tests and make them work.
ilonatommy May 21, 2025
217e8dd
Fix interactivity tests.
ilonatommy May 21, 2025
6e3eb98
Remove routing sandwitch.
ilonatommy May 22, 2025
e89fe2d
Trigger streaming.
ilonatommy May 22, 2025
e4b89c1
Templates use reexecution.
ilonatommy May 22, 2025
0f52575
Merge branch 'main' into not-found-works-after-navigation
ilonatommy May 23, 2025
fe7074f
Fix templates and layout.
ilonatommy May 28, 2025
1c2dcae
Fix namespace.
ilonatommy May 28, 2025
9f6df01
Make sure that interactive tests work only when interactivity is on.
ilonatommy May 28, 2025
b69773a
Fix: link has to have ID to check if layout is rendered.
ilonatommy May 28, 2025
6b439b5
Merge branch 'main' into not-found-works-after-navigation
ilonatommy May 28, 2025
f1bbf65
Fix: Wrong placing of NotFoundPage parameter.
ilonatommy May 28, 2025
a10a0fb
Whitespace
ilonatommy May 28, 2025
561c04c
Empty templates should not contain `NotFound.razor`.
ilonatommy May 29, 2025
8d96617
Move layout import for -ai Auto from server to client project.
ilonatommy May 29, 2025
90f6f0f
Feedback: use `RouteView`.
ilonatommy May 29, 2025
bdc5050
Feedback: explicit layout passing is not necessary when rendering wit…
ilonatommy May 29, 2025
05169c9
Fix misscommit.
ilonatommy May 29, 2025
1e207c2
Add error pages middlewarefor reexecution + use status code pages on …
ilonatommy May 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 5 additions & 14 deletions src/Components/Components/src/Routing/Router.cs
Original file line number Diff line number Diff line change
Expand Up @@ -398,23 +398,14 @@ private void RenderNotFound()
{
if (NotFoundPage != null)
{
builder.OpenComponent<RouteView>(0);
builder.AddAttribute(1, nameof(RouteView.RouteData),
new RouteData(NotFoundPage, _emptyParametersDictionary));
if (_notFoundLayoutType is Type layoutType)
{
// Directly instantiate the layout type, supplying the NotFoundPage as the Body
builder.OpenComponent(0, layoutType);
builder.AddAttribute(1, LayoutComponentBase.BodyPropertyName,
(RenderFragment)(childBuilder =>
{
childBuilder.OpenComponent(2, NotFoundPage);
childBuilder.CloseComponent();
}));
builder.CloseComponent();
}
else
{
builder.OpenComponent(0, NotFoundPage);
builder.CloseComponent();
builder.AddAttribute(2, nameof(RouteView.DefaultLayout), layoutType);
}
builder.CloseComponent();
}
else if (NotFound != null)
{
Expand Down
Loading