Skip to content

Commit 286fa1d

Browse files
committed
refactor: navigation links were fixed
- Updated href attributes in various components (UsersSection, WindowsPeSection, Breadcrumbs, CommandPalette, MainLayout, SectionView, AdvancedShell, DocsEntry, DocsIndex, Landing, NotFound, Wizard pages) to use relative paths without leading slashes. - Introduced a new BrandIcon component for consistent branding across the application. - Enhanced the NotFound page with a more engaging design and added navigation options. - Updated localization strings for improved clarity and user experience. - Adjusted CSS styles for better visual consistency and responsiveness.
1 parent 7187f17 commit 286fa1d

32 files changed

Lines changed: 392 additions & 115 deletions

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</PropertyGroup>
2828

2929
<PropertyGroup Label="Package">
30-
<VersionPrefix>0.1.0</VersionPrefix>
30+
<VersionPrefix>0.1.1</VersionPrefix>
3131
<VersionSuffix>alpha</VersionSuffix>
3232
<Version>$(VersionPrefix)-$(VersionSuffix)</Version>
3333
<PackageVersion>$(Version)</PackageVersion>

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<br>
88

99
<p>
10-
<a href="https://github.com/kYaRick/preflight.xml/releases"><img alt="Version" src="https://img.shields.io/static/v1?label=version&message=v0.1.0-alpha&color=0ea5e9"></a>
10+
<a href="https://github.com/kYaRick/preflight.xml/releases"><img alt="Version" src="https://img.shields.io/static/v1?label=version&message=v0.1.1-alpha&color=0ea5e9"></a>
1111
<a href="https://dotnet.microsoft.com/"><img alt=".NET 10" src="https://img.shields.io/badge/.NET-10-512BD4?logo=dotnet&logoColor=white"></a>
1212
<a href="https://learn.microsoft.com/aspnet/core/blazor/"><img alt="Blazor WASM" src="https://img.shields.io/badge/Blazor-WebAssembly-512BD4?logo=blazor&logoColor=white"></a>
1313
<a href="https://www.fluentui-blazor.net/"><img alt="Fluent UI" src="https://img.shields.io/badge/Fluent%20UI-Blazor-0078D4?logo=microsoft&logoColor=white"></a>
@@ -21,7 +21,7 @@
2121

2222
> [!WARNING]
2323
> **Pre-alpha.** The Blazor app is being scaffolded - APIs, UI and file
24-
> layout can change without notice until `v0.1.0`. Pin to a specific tag
24+
> layout can change without notice until `v0.1.1`. Pin to a specific tag
2525
> if you depend on it.
2626
2727
---

docs/publishing.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,32 @@ Things the workflow **cannot** fix. Documented, not papered over.
139139
> output. Add `srcs/Preflight.App/wwwroot/CNAME` with a single line
140140
> containing the hostname, set DNS accordingly, and rerun `pages.yml`.
141141
142+
> [!CAUTION]
143+
> **IL Trimmer + Newtonsoft `$type` is a load-bearing combo.**
144+
> Blazor WASM Release publishing trims IL by default. Any type referenced
145+
> only via reflection - including Newtonsoft's `$type` polymorphism in
146+
> `Bloatware.json` - is invisible to the trimmer and gets stripped. The
147+
> first call to `BloatwareCatalog` then crashes with
148+
> `Could not load type ..., UnattendGenerator`.
149+
>
150+
> **Fix in place:** [`Preflight.App.csproj`](../srcs/Preflight.App/Preflight.App.csproj)
151+
> declares `<TrimmerRootAssembly Include="UnattendGenerator" />`, which
152+
> preserves every public type in the vendored library. Costs ~150 KB in
153+
> the WASM bundle. Cheaper than crashing.
154+
155+
> [!WARNING]
156+
> **Leading slashes in URIs break subpath deploys.**
157+
> `Nav.NavigateTo("/wizard")` resolves to `https://host/wizard`, **not**
158+
> `https://host/preflight.xml/wizard` - RFC 3986 says path-absolute URIs
159+
> replace the base path. Same trap applies to `<a href="/...">`,
160+
> `<NavLink href="/...">`, `<FluentAnchor Href="/...">` and any string
161+
> passed through `NavigationManager`.
162+
>
163+
> **Rule of thumb:** in code, **never start internal URIs with a slash**.
164+
> Use `"wizard"`, `$"docs/{slug}"`, `""` for home. The `@page "/wizard"`
165+
> directive itself is fine - Blazor's router strips the slash before
166+
> matching against the base-relative path.
167+
142168
---
143169

144170
## ↩️ Rolling back a bad deploy

srcs/Preflight.App/Content/Sections/ComputerNameSection.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<header class="pf-section__head">
1111
<h2 class="pf-section__title">@L["Advanced.Section.computer-name"]</h2>
1212
<p class="pf-section__subtitle">@L["Section.computer-name.Subtitle"]</p>
13-
<a class="pf-section__docs-link" href="/docs/computer-name">@L["Section.Docs.Link"]</a>
13+
<a class="pf-section__docs-link" href="docs/computer-name">@L["Section.Docs.Link"]</a>
1414
</header>
1515

1616
<section class="pf-section__options">

srcs/Preflight.App/Content/Sections/DiskSection.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<header class="pf-section__head">
1919
<h2 class="pf-section__title">@L[DiskSectionDefinition.Definition.TitleKey]</h2>
2020
<p class="pf-section__subtitle">@L[DiskSectionDefinition.Definition.SubtitleKey]</p>
21-
<a class="pf-section__docs-link" href="@($"/docs/{DiskSectionDefinition.Definition.Id}")">@L["Section.Docs.Link"]</a>
21+
<a class="pf-section__docs-link" href="@($"docs/{DiskSectionDefinition.Definition.Id}")">@L["Section.Docs.Link"]</a>
2222
</header>
2323

2424
<section class="pf-section__options">

srcs/Preflight.App/Content/Sections/EditionSection.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<header class="pf-section__head">
1717
<h2 class="pf-section__title">@L[EditionSectionDefinition.Definition.TitleKey]</h2>
1818
<p class="pf-section__subtitle">@L[EditionSectionDefinition.Definition.SubtitleKey]</p>
19-
<a class="pf-section__docs-link" href="@($"/docs/{EditionSectionDefinition.Definition.Id}")">@L["Section.Docs.Link"]</a>
19+
<a class="pf-section__docs-link" href="@($"docs/{EditionSectionDefinition.Definition.Id}")">@L["Section.Docs.Link"]</a>
2020
</header>
2121

2222
<section class="pf-section__options">

srcs/Preflight.App/Content/Sections/LockKeysForm.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<header class="pf-section__head">
1111
<h2 class="pf-section__title">@L[LockKeysSection.Definition.TitleKey]</h2>
1212
<p class="pf-section__subtitle">@L[LockKeysSection.Definition.SubtitleKey]</p>
13-
<a class="pf-section__docs-link" href="/docs/lock-keys">@L["Section.Docs.Link"]</a>
13+
<a class="pf-section__docs-link" href="docs/lock-keys">@L["Section.Docs.Link"]</a>
1414
</header>
1515
}
1616

srcs/Preflight.App/Content/Sections/SourceImageSection.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<header class="pf-section__head">
1414
<h2 class="pf-section__title">@L[SourceImageSectionDefinition.Definition.TitleKey]</h2>
1515
<p class="pf-section__subtitle">@L[SourceImageSectionDefinition.Definition.SubtitleKey]</p>
16-
<a class="pf-section__docs-link" href="@($"/docs/{SourceImageSectionDefinition.Definition.Id}")">@L["Section.Docs.Link"]</a>
16+
<a class="pf-section__docs-link" href="@($"docs/{SourceImageSectionDefinition.Definition.Id}")">@L["Section.Docs.Link"]</a>
1717
</header>
1818

1919
<section class="pf-section__options">

srcs/Preflight.App/Content/Sections/StickyKeysForm.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<header class="pf-section__head">
1111
<h2 class="pf-section__title">@L[StickyKeysSection.Definition.TitleKey]</h2>
1212
<p class="pf-section__subtitle">@L[StickyKeysSection.Definition.SubtitleKey]</p>
13-
<a class="pf-section__docs-link" href="/docs/sticky-keys">@L["Section.Docs.Link"]</a>
13+
<a class="pf-section__docs-link" href="docs/sticky-keys">@L["Section.Docs.Link"]</a>
1414
</header>
1515
}
1616

srcs/Preflight.App/Content/Sections/TimeZoneSection.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<header class="pf-section__head">
1212
<h2 class="pf-section__title">@L["Advanced.Section.time-zone"]</h2>
1313
<p class="pf-section__subtitle">@L["Section.time-zone.Subtitle"]</p>
14-
<a class="pf-section__docs-link" href="/docs/time-zone">@L["Section.Docs.Link"]</a>
14+
<a class="pf-section__docs-link" href="docs/time-zone">@L["Section.Docs.Link"]</a>
1515
</header>
1616

1717
<section class="pf-section__options">

0 commit comments

Comments
 (0)