diff --git a/.github/workflows/GithubActionsRelease.yml b/.github/workflows/GithubActionsRelease.yml index f0a7c6df0..9a3895291 100644 --- a/.github/workflows/GithubActionsRelease.yml +++ b/.github/workflows/GithubActionsRelease.yml @@ -9,7 +9,7 @@ name: GithubActionsRelease on: push: tags: - - 5.** # Push events to matching pattern, i.e. 5.0.0, 5.1.0 + - 6.** # Push events to matching pattern, i.e. 6.0.0, 6.1.0 env: buildPlatform: 'Any CPU' @@ -48,15 +48,15 @@ jobs: - name: Use dotnet uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.x' + dotnet-version: '10.x' - name: Install pnpm uses: pnpm/action-setup@v4 with: - version: 11.12.0 + version: 12.6.0 - name: Run the acceptance tests as the first build action and cancel out the rest if it fails - run: dotnet test ${{env.projectTest}} --configuration ${{env.buildConfiguration}} + run: dotnet test --project ${{env.projectTest}} --configuration ${{env.buildConfiguration}} ############################################################################################################ # Build documentation ############################################################################################################ @@ -71,7 +71,7 @@ jobs: - name: Setup dotnet uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.x' + dotnet-version: '10.x' - name: Setup docfx run: dotnet tool update -g docfx @@ -79,7 +79,7 @@ jobs: - name: Install pnpm uses: pnpm/action-setup@v4 with: - version: 11.12.0 + version: 12.6.0 - name: Build Material.Blazor run: dotnet build ${{env.projectMB}} --configuration ${{env.buildConfiguration}} @@ -114,12 +114,12 @@ jobs: - name: Setup dotnet uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.x' + dotnet-version: '10.x' - name: Install pnpm uses: pnpm/action-setup@v4 with: - version: 11.12.0 + version: 12.6.0 - name: Build and Publish Website 🔧 run: > @@ -128,7 +128,7 @@ jobs: --output ${{env.outputWeb}} -p:Version=${{env.version}} -p:BlazorEnableCompression=false - --framework net8.0 + --framework net10.0 - name: Upload Website Artifacts 🔺 # The website is then uploaded as an artifact named 'siteWeb'. uses: actions/upload-artifact@v4 @@ -152,12 +152,12 @@ jobs: - name: Setup dotnet uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.x' + dotnet-version: '10.x' - name: Install pnpm uses: pnpm/action-setup@v4 with: - version: 11.12.0 + version: 12.6.0 - name: Download Artifacts 🔻 # The documentation is downloaded into the 'siteDocFx' folder. uses: actions/download-artifact@v4 @@ -207,12 +207,12 @@ jobs: - name: Setup dotnet uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.x' + dotnet-version: '10.x' - name: Install pnpm uses: pnpm/action-setup@v4 with: - version: 11.12.0 + version: 12.6.0 - name: Build Material.Blazor & Generate the NuGet package 🔧 run: > diff --git a/.github/workflows/GithubActionsWIP.yml b/.github/workflows/GithubActionsWIP.yml index 208eff24d..f7a162879 100644 --- a/.github/workflows/GithubActionsWIP.yml +++ b/.github/workflows/GithubActionsWIP.yml @@ -61,7 +61,7 @@ jobs: steps: - id: setVersion - run: echo "version=5.0.0-wip.$(date +'%Y-%m-%d--%H-%M-%S')" >> $GITHUB_OUTPUT + run: echo "version=6.0.0-wip.$(date +'%Y-%m-%d--%H-%M-%S')" >> $GITHUB_OUTPUT shell: bash ############################################################################################################ @@ -79,15 +79,15 @@ jobs: - name: Setup dotnet uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.x' + dotnet-version: '10.x' - name: Install pnpm uses: pnpm/action-setup@v4 with: - version: 11.12.0 + version: 12.6.0 - name: Run the acceptance tests as the first build action and cancel out the rest if it fails - run: dotnet test ${{env.projectTest}} --configuration ${{env.buildConfiguration}} + run: dotnet test --project ${{env.projectTest}} --configuration ${{env.buildConfiguration}} ############################################################################################################ # Build documentation @@ -104,7 +104,7 @@ jobs: - name: Setup dotnet uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.x' + dotnet-version: '10.x' - name: Setup docfx run: dotnet tool update -g docfx @@ -112,7 +112,7 @@ jobs: - name: Install pnpm uses: pnpm/action-setup@v4 with: - version: 11.12.0 + version: 12.6.0 - name: Build Material.Blazor run: dotnet build ${{env.projectMB}} --configuration ${{env.buildConfiguration}} @@ -154,12 +154,12 @@ jobs: - name: Setup dotnet uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.x' + dotnet-version: '10.x' - name: Install pnpm uses: pnpm/action-setup@v4 with: - version: 11.12.0 + version: 12.6.0 - name: Build & Publish Website 🔧 run: > @@ -168,7 +168,7 @@ jobs: --output ${{env.outputWeb}} -p:Version=${{env.ciVersion}} -p:BlazorEnableCompression=false - --framework net8.0 + --framework net10.0 # All of the trace was added to show that .js & .min.js files were getting created but not # being included in the published content. This was a result of VS 'helpfully' adding some @@ -218,12 +218,12 @@ jobs: - name: Setup dotnet uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.x' + dotnet-version: '10.x' - name: Install pnpm uses: pnpm/action-setup@v4 with: - version: 11.12.0 + version: 12.6.0 - name: Build Material.Blazor & Generate the NuGet package 🔧 run: > @@ -402,12 +402,12 @@ jobs: - name: Setup dotnet uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.x' + dotnet-version: '10.x' - name: Install pnpm uses: pnpm/action-setup@v4 with: - version: 11.12.0 + version: 12.6.0 - name: Build Material.Blazor & Generate the NuGet package 🔧 run: > diff --git a/Directory.Build.props b/Directory.Build.props index c893b394f..472bd66c9 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -4,7 +4,7 @@ - net8.0 + net10.0 Server;WebAssembly diff --git a/Material.Blazor.Test/Material.Blazor.Test.csproj b/Material.Blazor.Test/Material.Blazor.Test.csproj index b0b7864d6..6d120e632 100644 --- a/Material.Blazor.Test/Material.Blazor.Test.csproj +++ b/Material.Blazor.Test/Material.Blazor.Test.csproj @@ -6,14 +6,14 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/Material.Blazor.Website.Server/Material.Blazor.Website.Server.csproj b/Material.Blazor.Website.Server/Material.Blazor.Website.Server.csproj index be44a9035..6a6f91399 100644 --- a/Material.Blazor.Website.Server/Material.Blazor.Website.Server.csproj +++ b/Material.Blazor.Website.Server/Material.Blazor.Website.Server.csproj @@ -2,6 +2,8 @@ true + + true @@ -13,26 +15,23 @@ - - - - - - - + - - $(CompressionIncludePatterns);**/*.css;**/*.js - gzip;brotli + + gzip gzip;brotli diff --git a/Material.Blazor.Website.Server/Pages/Host.cshtml b/Material.Blazor.Website.Server/Pages/Host.cshtml index 01cc46fbe..ff9792b0b 100644 --- a/Material.Blazor.Website.Server/Pages/Host.cshtml +++ b/Material.Blazor.Website.Server/Pages/Host.cshtml @@ -5,13 +5,8 @@ @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers @using Material.Blazor.Website -@using Material.Blazor.Website.Server @using Microsoft.AspNetCore.Components.Web -@{ - Microsoft.AspNetCore.Mvc.Rendering.RenderMode renderMode = PlatformDetermination.IsBlazorServer ? Microsoft.AspNetCore.Mvc.Rendering.RenderMode.Server : Microsoft.AspNetCore.Mvc.Rendering.RenderMode.WebAssembly; -} - @@ -21,12 +16,15 @@ Material.Blazor - + @* Maps JS module paths to their fingerprinted URLs from MapStaticAssets *@ + + + - + @@ -41,28 +39,12 @@ - @if (PlatformDetermination.IsBlazorServer) - { - - } + - @if (PlatformDetermination.IsBlazorServer) - { - - } - else - { -
- - - - -
-
- } +
@@ -75,18 +57,11 @@ 🗙
- - - - - @if (PlatformDetermination.IsBlazorServer) - { - - } - else - { - - } + + + + + diff --git a/Material.Blazor.Website.Server/PlatformDetermination.cs b/Material.Blazor.Website.Server/PlatformDetermination.cs deleted file mode 100644 index b6796d6dc..000000000 --- a/Material.Blazor.Website.Server/PlatformDetermination.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace Material.Blazor.Website.Server; - -/// -/// A class that determines the current platform: -/// Blazor Server or WebAssembly. -/// MD2 or MD3 -/// -public static class PlatformDetermination -{ -#if BLAZOR_SERVER - /// - /// We are running Blazor Server. - /// - public const bool IsBlazorServer = true; - public const bool IsBlazorWebAssembly = false; -#else - /// - /// We are running Blazor WebAssembly. - /// - public const bool IsBlazorServer = false; - public const bool IsBlazorWebAssembly = true; -#endif -} diff --git a/Material.Blazor.Website.Server/Program.cs b/Material.Blazor.Website.Server/program_server.cs similarity index 90% rename from Material.Blazor.Website.Server/Program.cs rename to Material.Blazor.Website.Server/program_server.cs index b34a13cfa..f15ca1fce 100644 --- a/Material.Blazor.Website.Server/Program.cs +++ b/Material.Blazor.Website.Server/program_server.cs @@ -36,13 +36,7 @@ // Add services to the container. builder.Services.AddRazorPages(); - -#if SERVER - builder.Services.AddServerSideBlazor(); - builder.Services.AddMvc(options => options.EnableEndpointRouting = false); - -#endif // Option 1: add options to services, which are then accessed by the Material Blazor services. @@ -72,11 +66,7 @@ if (app.Environment.IsDevelopment()) { -#if SERVER app.UseDeveloperExceptionPage(); -#else - app.UseWebAssemblyDebugging(); -#endif } else { @@ -89,16 +79,17 @@ app.UseSerilogRequestLogging(); #endif app.UseHttpsRedirection(); - app.UseStaticFiles(); app.UseRouting(); -#if SERVER + // MapStaticAssets serves every build-time static web asset (including the .NET 10 Blazor + // script) with content-based ETags and fingerprinted URLs, so browsers never run stale + // scripts after an upgrade. + app.MapStaticAssets(); + app.MapBlazorHub(); -#else - app.UseBlazorFrameworkFiles(); -#endif + app.MapRazorPages().WithStaticAssets(); app.MapFallbackToPage("/Host"); app.Run(); diff --git a/Material.Blazor.Website.WebAssembly/Material.Blazor.Website.WebAssembly.csproj b/Material.Blazor.Website.WebAssembly/Material.Blazor.Website.WebAssembly.csproj index fa7268105..b35b4a642 100644 --- a/Material.Blazor.Website.WebAssembly/Material.Blazor.Website.WebAssembly.csproj +++ b/Material.Blazor.Website.WebAssembly/Material.Blazor.Website.WebAssembly.csproj @@ -2,13 +2,15 @@ true + + true - - - - + + + + diff --git a/Material.Blazor.Website.WebAssembly/Program.cs b/Material.Blazor.Website.WebAssembly/program_wasm.cs similarity index 100% rename from Material.Blazor.Website.WebAssembly/Program.cs rename to Material.Blazor.Website.WebAssembly/program_wasm.cs diff --git a/Material.Blazor.Website.WebAssembly/wwwroot/index.html b/Material.Blazor.Website.WebAssembly/wwwroot/index.html index d1ff4a3f8..99ddeff2e 100644 --- a/Material.Blazor.Website.WebAssembly/wwwroot/index.html +++ b/Material.Blazor.Website.WebAssembly/wwwroot/index.html @@ -6,7 +6,11 @@ Material.Blazor - + + + + + @@ -43,10 +47,10 @@ 🗙 - + - - + + diff --git a/Material.Blazor.Website/Material.Blazor.Website.csproj b/Material.Blazor.Website/Material.Blazor.Website.csproj index 5084d9cc6..9138b7e82 100644 --- a/Material.Blazor.Website/Material.Blazor.Website.csproj +++ b/Material.Blazor.Website/Material.Blazor.Website.csproj @@ -29,8 +29,8 @@ - - + + diff --git a/Material.Blazor.Website/Pages/Index.razor b/Material.Blazor.Website/Pages/Index.razor index 77681e95d..e90dd471e 100644 --- a/Material.Blazor.Website/Pages/Index.razor +++ b/Material.Blazor.Website/Pages/Index.razor @@ -20,7 +20,7 @@ Use nuget to procure the current release.
  • - Material.Blazor has been built by Simon Ziegler of Dioptra and Mark Stega of Optimium Health, and is licensed under the permissive + Material.Blazor has been built by Simon Ziegler and Mark Stega of Materia Technologies, and is licensed under the permissive MIT License.
  • diff --git a/Material.Blazor.Website/Pages/Index.razor.cs b/Material.Blazor.Website/Pages/Index.razor.cs index 0ce3b67ad..87f68ba0b 100644 --- a/Material.Blazor.Website/Pages/Index.razor.cs +++ b/Material.Blazor.Website/Pages/Index.razor.cs @@ -1,5 +1,6 @@ using Microsoft.AspNetCore.Components; using Microsoft.JSInterop; +using System; using System.Runtime.InteropServices; using System.Threading.Tasks; @@ -10,11 +11,8 @@ public partial class Index [Inject] private NavigationManager NavigationManager { get; set; } [Inject] private IJSRuntime JSRuntime { get; set; } -#if BLAZOR_SERVER - private string BuildMode { get; set; } = "Server"; -#else - private string BuildMode { get; set; } = "WebAssembly"; -#endif + // Determined at runtime: the same assembly is hosted by both the Server and WebAssembly launch projects + private string BuildMode { get; set; } = OperatingSystem.IsBrowser() ? "WebAssembly" : "Server"; private string OSArchitecture { get; set; } private string OSDescription { get; set; } @@ -35,6 +33,6 @@ private async Task NavigateToDocs() } private void NavigateToButton() { - NavigationManager.NavigateTo("anchor"); + NavigationManager.NavigateTo("button"); } } diff --git a/Material.Blazor/Material.Blazor.csproj b/Material.Blazor/Material.Blazor.csproj index b16ebe086..7b78fd510 100644 --- a/Material.Blazor/Material.Blazor.csproj +++ b/Material.Blazor/Material.Blazor.csproj @@ -1,22 +1,8 @@  - - - net8.0 false - 5.0.0-preview.WIP + 6.0.0-preview.WIP Simon Ziegler of Dioptra and Mark Stega of Optimium Health Material.Blazor @@ -51,10 +37,10 @@ --> - - - - + + + + diff --git a/README.md b/README.md index c13f0da43..84ce48eb2 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,8 @@ Material.Blazor is a lightweight [Material Theme](https://material.io/) [web development platform](https://material.io/develop/web/) component library for [ASP.NET Blazor](https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor). It is rigorously faithful to the Material Theme's design philosophy, markup and code usage. Material Theme has very specific and detailed guidance showing web designers how to build web apps with HTML, CSS and JavaScript. Since Blazor is not directly supported, Blazor developers either need to roll their own components or use a component library such as Material.Blazor. +> **From the Material.Blazor team:** we formed [Materia Technologies](https://chameleonui.io) to keep working on Material, and Materia Technologies now supports Material.Blazor's continued maintenance. Our new library, [Chameleon](https://chameleonui.io), is built on Material 3 Expressive and brings 55 components to Blazor, React and plain web components from one source — one color in, a whole theme out. If you're starting something new, we'd love for you to take a look at [ChameleonUI.io](https://chameleonui.io). + - Material.Blazor is implemented using Material Theme version 14.0.0 - Visit our website at https://material-blazor.com; - See release notes at https://material-blazor.com/docs/ReleaseNotes.html; @@ -35,10 +37,13 @@ Material.Blazor is a lightweight [Material Theme](https://material.io/) [web dev - If you intend to submit pull requests please note that we use a gitub repository with a `main` branch upon which pull requests can be made. You can read [detailed development environment instructions](https://material-blazor.com/docs/articles/DevelopmentEnvironment.html) on our docs site. Material.Blazor has one release train available via NuGet. The train is MD2 based. -The MD2 NuGet packages are available in V3, V4, and V5. +The MD2 NuGet packages are available in V3, V4, V5, and V6. - V3.x is a DotNet 6 LTS stable version using Material Design 2 and is the version used in some production settings. This version will be deprecated on November 12, 2024 (Corresponding to the DN6 EOL). No updates to Material.Blazor in this version are expected. - V4.x is a DotNet 7 STS stable version using Material Design 2 and is the version used in some production settings. This version was deprecated on May 14, 2024 (Corresponding to the DN7 EOL). -- V5.x is a DotNet 8 LTS stable version. We encourage adoption of this version for existing and new production settings. +- V5.x is a DotNet 8 LTS stable version using Material Design 2 and is the version used in some production settings. 5.3.29 is the final V5.x release; no further updates to Material.Blazor in this version are expected. - V5.x releases are published as a NuGet package - Material.Blazor - - This version will be deprecated on November 10, 2026. + - This version will be deprecated on November 10, 2026 (Corresponding to the DN8 EOL). +- V6.x is a DotNet 10 LTS stable version. We encourage adoption of this version for existing and new production settings. + - V6.x releases are published as a NuGet package - Material.Blazor + - This version will be deprecated on November 14, 2028 (Corresponding to the DN10 EOL). \ No newline at end of file diff --git a/ReleaseNotes.md b/ReleaseNotes.md index f94836930..968ff4442 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -4,6 +4,34 @@ title: ReleaseNotes --- # Release Notes +#### [6.0.0](https://github.com/Material-Blazor/Material.Blazor/tree/6.0.0) + +Released 2026-10-01 + +> **From the Material.Blazor team:** we formed [Materia Technologies](https://chameleonui.io) to keep working on Material, and Materia Technologies now supports Material.Blazor's continued maintenance. Our new library, [Chameleon](https://chameleonui.io), is built on Material 3 Expressive and brings 55 components to Blazor, React and plain web components from one source — one color in, a whole theme out. If you're starting something new, we'd love for you to take a look at [ChameleonUI.io](https://chameleonui.io). + +**Updates** +- Dependabot updates. +- .Net 10.0.12 updates; package references that .Net 10 provides implicitly have been removed from the website server project. +- Website: Material.Blazor.Website.Server now always runs as Blazor Server (previously it hosted the WebAssembly app unless built in the Server configuration, where the Blazor hub was never mapped). Material.Blazor.Website.WebAssembly is the standalone WebAssembly site, as published to GitHub Pages. +- Website: the server uses MapStaticAssets with fingerprinted, versioned script and stylesheet URLs, and the WebAssembly site uses .Net 10 index.html asset fingerprinting (OverrideHtmlAssetPlaceholders), so browsers no longer run stale cached scripts after an upgrade. +- Website: the startup files are renamed program_server.cs and program_wasm.cs, and the home page reports the hosting mode at runtime rather than from the build configuration. +- Tests: the .Net 10 SDK no longer runs xunit.v3 through VSTest, so global.json opts `dotnet test` in to Microsoft.Testing.Platform; run the tests with `dotnet test --project Material.Blazor.Test/Material.Blazor.Test.csproj`. +- Website: the home page Demonstration card now opens the Button demo page as its text says; since 2023 it had opened the Anchor page. + +**New components** + +**New features** + +**Breaking Changes** +- Material.Blazor now targets .Net 10. .Net 8 is no longer supported; 5.3.29 was the last .Net 8 based release. + +**Deprecated Components** + +**Known issues** + +
    + #### [5.3.29](https://github.com/Material-Blazor/Material.Blazor/tree/5.3.29) Released 2026-09-26 diff --git a/global.json b/global.json index 8fe79c34a..4527a92bf 100644 --- a/global.json +++ b/global.json @@ -1,7 +1,10 @@ { "sdk": { - "version": "8.0.400", + "version": "10.0.401", "rollForward": "patch", "allowPrerelease": false + }, + "test": { + "runner": "Microsoft.Testing.Platform" } } \ No newline at end of file