Skip to content

Commit 89dc45c

Browse files
authored
Merge branch 'dev-v5' into users/aclerbois/dev-v5/support-icon
2 parents 0646d68 + 32091be commit 89dc45c

26 files changed

Lines changed: 390 additions & 263 deletions

.github/pull_request_template.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ Please provide a summary of the tests affected by this work and any unique strat
5858
- [ ] I have modified an existing component
5959
- [ ] I have validated the [Unit Tests](https://github.com/Microsoft/fluentui-blazor/blob/master/unit-tests.md) for an existing component
6060

61+
### MCP Server
62+
63+
<!--- Review the list and put an x in the boxes that apply. -->
64+
<!--- Remove this section if not applicable. -->
65+
- [ ] I have added or updated MCP Server tools/prompts/resources
66+
- [ ] I have added [Unit Tests](https://github.com/Microsoft/fluentui-blazor/blob/master/unit-tests.md) for my MCP Server changes
67+
6168
## ⏭ Next Steps
6269

6370
<!---

.github/workflows/build-core-lib.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,12 @@ on:
2323
- '**/*.gitattributes'
2424

2525
env:
26-
PROJECTS: "./src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj"
27-
TESTS: "./tests/Core/Components.Tests.csproj"
26+
PROJECTS: >
27+
./src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj
28+
./src/Tools/McpServer/Microsoft.FluentUI.AspNetCore.McpServer.csproj
29+
TESTS: >
30+
./tests/Core/Components.Tests.csproj
31+
./tests/Tools/McpServer.Tests/Microsoft.FluentUI.AspNetCore.McpServer.Tests.csproj
2832
INTEGRATION_TEST: "" # DISABLING: ./tests/Integration/Components.IntegrationTests.csproj
2933
MIN_COVERAGE: "98"
3034

@@ -61,13 +65,21 @@ jobs:
6165
run: dotnet restore Microsoft.FluentUI-v5.slnx
6266

6367
- name: Build
64-
run: dotnet build ${{ env.PROJECTS }} --configuration Release -warnaserror
68+
run: |
69+
PROJECTS="${{ env.PROJECTS }}"
70+
for project in $PROJECTS; do
71+
dotnet build "$project" --configuration Release -warnaserror
72+
done
6573
working-directory: ${{ github.workspace }}
6674

6775
# Unit Tests
6876

6977
- name: Tests
70-
run: dotnet test ${{ env.TESTS }} --logger:trx --results-directory ./TestResults --verbosity normal --configuration Release /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:DebugType=Full
78+
run: |
79+
TESTS="${{ env.TESTS }}"
80+
for test in $TESTS; do
81+
dotnet test "$test" --logger:trx --results-directory ./TestResults --verbosity normal --configuration Release /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:DebugType=Full
82+
done
7183
working-directory: ${{ github.workspace }}
7284

7385
- name: Publish Unit Tests
@@ -214,7 +226,10 @@ jobs:
214226
- if: matrix.language == 'csharp'
215227
name: Manually build CSharp on .NET
216228
run: |
217-
dotnet build ${{ env.PROJECTS }}
229+
PROJECTS="${{ env.PROJECTS }}"
230+
for project in $PROJECTS; do
231+
dotnet build "$project"
232+
done
218233
219234
- name: Perform CodeQL Analysis
220235
uses: github/codeql-action/analyze@v3

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,3 +422,4 @@ mcp-documentation.json
422422
all-icons.json
423423
all-emojis.json
424424
/global.json
425+
/src/Core.Scripts/src/BuildConstants.ts

Directory.Build.props

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<Project>
22
<PropertyGroup>
33

4-
<!-- .NET Framework Version -->
4+
<!-- .NET Framework Version used with the Demo and Unit Tests projects -->
55
<!-- Change this to switch between net8.0, net9.0, or net10.0 -->
6-
<NetVersion>net9.0</NetVersion>
76
<!--
87
NOTES: When updating the NetVersion above, also update the files
98
- _PublishDemoLocally.ps1
@@ -12,7 +11,13 @@
1211
- examples\Tools\FluentUI.Demo.DocApiGen.IntegrationTests\FluentUIComponentsIntegrationTests.cs
1312
- tests\Integration\WebServer\StartServerFixture.cs
1413
-->
14+
<NetVersion>net9.0</NetVersion>
1515

16+
<!-- Target .NET versions for multi-targeting -->
17+
<!-- Used with the published libraries: Core; McpServer -->
18+
<!-- Debug: single target for faster builds; Release: full multi-targeting -->
19+
<TargetNetVersions Condition="'$(Configuration)' == 'Release'">net9.0;net10.0</TargetNetVersions>
20+
<TargetNetVersions Condition="'$(Configuration)' != 'Release'">$(NetVersion)</TargetNetVersions>
1621

1722
<!-- Versioning -->
1823
<VersionFile>5.0.0</VersionFile>

Directory.Packages.props

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,36 @@
11
<Project>
22
<PropertyGroup>
33
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
4-
<RuntimeVersion9>9.0.11</RuntimeVersion9>
5-
<AspNetCoreVersion9>9.0.11</AspNetCoreVersion9>
6-
<EfCoreVersion9>9.0.11</EfCoreVersion9>
7-
<RuntimeVersion10>10.0.1</RuntimeVersion10>
8-
<AspNetCoreVersion10>10.0.1</AspNetCoreVersion10>
9-
<EfCoreVersion10>10.0.1</EfCoreVersion10>
4+
<RuntimeVersion9>9.0.13</RuntimeVersion9>
5+
<AspNetCoreVersion9>9.0.13</AspNetCoreVersion9>
6+
<EfCoreVersion9>9.0.13</EfCoreVersion9>
7+
<RuntimeVersion10>10.0.3</RuntimeVersion10>
8+
<AspNetCoreVersion10>10.0.3</AspNetCoreVersion10>
9+
<EfCoreVersion10>10.0.3</EfCoreVersion10>
1010
</PropertyGroup>
11+
1112
<!-- Independent from TargetFrameWorks-->
1213
<ItemGroup>
1314
<!-- For Sample Apps -->
14-
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.13.2" />
15-
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.Icons" version="4.13.2" />
16-
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.Emoji" Version="4.13.2" />
17-
<PackageVersion Include="LoxSmoke.DocXml" Version="3.8.0" />
15+
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.14.0" />
16+
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.Icons" version="4.14.0" />
17+
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.Emoji" Version="4.14.0" />
18+
<PackageVersion Include="LoxSmoke.DocXml" Version="3.9.0" />
1819
<!-- For MCP Apps -->
19-
<PackageVersion Include="ModelContextProtocol" Version="0.4.0-preview.3" />
20+
<PackageVersion Include="ModelContextProtocol" Version="0.8.0-preview.1" />
2021
<!-- Test dependencies -->
21-
<PackageVersion Include="bunit" Version="2.2.2" />
22+
<PackageVersion Include="bunit" Version="2.5.3" />
2223
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
2324
<PackageVersion Include="xunit" Version="2.9.3" />
24-
<PackageVersion Include="xunit.v3" Version="3.2.1" />
25+
<PackageVersion Include="xunit.v3" Version="3.2.2" />
2526
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />
2627
<PackageVersion Include="coverlet.msbuild" Version="6.0.4" />
2728
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
2829
<PackageVersion Include="Microsoft.Playwright" Version="1.57.0" />
2930
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.11" />
3031
<!-- Shared dependencies -->
3132
<PackageVersion Include="Markdig.Signed" Version="0.44.0" />
32-
<PackageVersion Include="Meziantou.Analyzer" Version="2.0.257" />
33+
<PackageVersion Include="Meziantou.Analyzer" Version="2.0.286" />
3334
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" />
3435
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="5.0.0" />
3536
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.14.15" />
@@ -70,6 +71,7 @@
7071
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="$(EfCoreVersion10)" />
7172
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="$(RuntimeVersion10)" />
7273
<PackageVersion Include="Microsoft.Extensions.Configuration.CommandLine" Version="$(RuntimeVersion10)" />
74+
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="$(RuntimeVersion10)" />
7375
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="$(RuntimeVersion10)" />
7476
<PackageVersion Include="Microsoft.Extensions.Http" Version="$(RuntimeVersion10)" />
7577
<PackageVersion Include="System.Text.Encodings.Web" Version="$(RuntimeVersion10)" />

_PublishDemoLocally.ps1

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
#!/usr/bin/env pwsh
22

3+
# ###########################################
4+
# Requires PowerShell Version 7.0+
5+
# ###########################################
6+
37
# Script to generate documentation and publish the FluentUI Demo locally
48

59
# .NET Framework Version - Change this to net8.0, net9.0, or net10.0 as needed
6-
$NetVersion = "net9.0"
10+
$NetVersion = "net10.0"
711

812
Write-Host "👉 Starting local demo publish process..." -ForegroundColor Green
913
Write-Host "👉 Using .NET Framework: $NetVersion" -ForegroundColor Cyan
@@ -27,21 +31,30 @@ if (Test-Path "./src/Core/obj/") {
2731
Remove-Item -Path "./src/Core/obj" -Recurse -Force
2832
}
2933

34+
$RootDir = $PSScriptRoot
35+
36+
# Update the Directory.Build.props file with the correct .NET version
37+
Write-Host "👉 Updating Directory.Build.props with .NET version: $NetVersion..." -ForegroundColor Yellow
38+
(Get-Content "./Directory.Build.props") -replace '<NetVersion>net[0-9]+\.[0-9]+</NetVersion>', "<NetVersion>$NetVersion</NetVersion>" | Set-Content "./Directory.Build.props"
39+
(Get-Content "./Directory.Build.props") -replace "<TargetNetVersions Condition=`"'\$\(Configuration\)' == 'Release'`">.*</TargetNetVersions>", "<TargetNetVersions Condition=`"'`$(Configuration)' == 'Release'`">$NetVersion</TargetNetVersions>" | Set-Content "./Directory.Build.props"
40+
41+
3042
# Build the core project
3143
Write-Host "👉 Building Core project..." -ForegroundColor Yellow
3244
dotnet build "./src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj" -c Release -o "./src/Core/bin/Publish" -f $NetVersion
3345

3446
# Generate API documentation file
3547
Write-Host "👉 Generating API documentation..." -ForegroundColor Yellow
36-
dotnet run --project ".\examples\Tools\FluentUI.Demo.DocApiGen\FluentUI.Demo.DocApiGen.csproj" --xml "./src/Core/bin/Publish/Microsoft.FluentUI.AspNetCore.Components.xml" --dll "./src/Core/bin/Publish/Microsoft.FluentUI.AspNetCore.Components.dll" --output "./examples/Demo/FluentUI.Demo.Client/wwwroot/api-comments.json" --format json
48+
dotnet run --project ".\examples\Tools\FluentUI.Demo.DocApiGen\FluentUI.Demo.DocApiGen.csproj" --xml "$RootDir/src/Core/bin/Publish/Microsoft.FluentUI.AspNetCore.Components.xml" --dll "$RootDir/src/Core/bin/Publish/Microsoft.FluentUI.AspNetCore.Components.dll" --output "$RootDir/examples/Demo/FluentUI.Demo.Client/wwwroot/api-comments.json" --format json
3749

3850
# Build the MCP Server project
3951
Write-Host "👉 Building MCP Server project..." -ForegroundColor Yellow
4052
dotnet build "./src/Tools/McpServer/Microsoft.FluentUI.AspNetCore.McpServer.csproj" -c Release -o "./src/Tools/McpServer/bin/Publish" -f $NetVersion
4153

4254
# Generate MCP documentation file
4355
Write-Host "👉 Generating MCP documentation..." -ForegroundColor Yellow
44-
dotnet run --project ".\examples\Tools\FluentUI.Demo.DocApiGen\FluentUI.Demo.DocApiGen.csproj" --xml "./src/Tools/McpServer/bin/Publish/Microsoft.FluentUI.AspNetCore.McpServer.xml" --dll "./src/Tools/McpServer/bin/Publish/Microsoft.FluentUI.AspNetCore.McpServer.dll" --output "./examples/Demo/FluentUI.Demo.Client/wwwroot/mcp-documentation.json" --format json --mode mcp
56+
# dotnet run --project ".\examples\Tools\FluentUI.Demo.DocApiGen\FluentUI.Demo.DocApiGen.csproj" --xml "$RootDir/src/Tools/McpServer/bin/Publish/Microsoft.FluentUI.AspNetCore.McpServer.xml" --dll "$RootDir/src/Tools/McpServer/bin/Publish/Microsoft.FluentUI.AspNetCore.McpServer.dll" --output "$RootDir/examples/Demo/FluentUI.Demo.Client/wwwroot/mcp-documentation.json" --format json --mode mcp
57+
Write-Host " Skipped."
4558

4659
# Publish the demo
4760
Write-Host "👉 Publishing demo..." -ForegroundColor Yellow

docs/contributing.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ To begin you'll need **Git**, **.NET**, and **NodeJS** setup on your machine.
88

99
The `fluentui-blazor` repository uses Git as its source control system. If you haven't already installed it, you can download it [here](https://git-scm.com/downloads) or if you prefer a GUI-based approach, try [GitHub Desktop](https://desktop.github.com/).
1010

11-
Once Git is installed, you'll also need **.NET** and **NodeJS**. Instructions and downloads for .NET on your preferred OS can be found [here](https://dotnet.microsoft.com/download). NodeJS can be found [here](https://nodejs.org). You need to install the 20.15 LTS version.
11+
Once Git is installed, you'll also need **.NET** and **NodeJS**. Instructions and downloads for .NET on your preferred OS can be found [here](https://dotnet.microsoft.com/download). NodeJS can be found [here](https://nodejs.org). You need to install the 20.15+ LTS version.
1212

1313
On Windows, we prefere to develop using [Visual Studio 2022 Preview](https://visualstudio.microsoft.com/vs/preview/).
1414

@@ -31,12 +31,20 @@ Cloning via SSH:
3131
git clone git@github.com:microsoft/fluentui-blazor.git
3232
```
3333

34+
Next, checkout the `dev-v5` branch:
35+
36+
```shell
37+
git checkout dev-v5
38+
```
39+
40+
41+
3442
### Installing and building
3543

3644
From within the folder where you've cloned the repo, build the project with the following command.
3745

3846
```bash
39-
dotnet build
47+
dotnet build ./Microsoft.FluentUI-v5.slnx
4048
```
4149

4250
The **Components.Scripts** project uses several NPM packages.
@@ -57,6 +65,27 @@ In the event of an NPM authentication problem (E401), you will probably need to
5765
npm install
5866
```
5967

68+
### Running the Demo project locally
69+
70+
The demo application can be run in two modes: **Blazor Server** and **Blazor WebAssembly**.
71+
72+
#### 1. Blazor Server
73+
74+
From the root of the repository, run the following command:
75+
76+
```bash
77+
dotnet run --project examples/Demo/FluentUI.Demo
78+
```
79+
80+
#### 2. Blazor WebAssembly
81+
82+
From the root of the repository, run the following command:
83+
84+
```bash
85+
dotnet run --project examples/Demo/FluentUI.Demo.Client
86+
```
87+
88+
Once running, open the URL displayed in the terminal output in your browser.
6089

6190
### Submitting a pull request
6291

eng/pipelines/build-all-lib.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ parameters:
1313
- name: Projects # List of projects to build
1414
default: |
1515
**/Microsoft.FluentUI.AspNetCore.Components.csproj
16+
**/Microsoft.FluentUI.AspNetCore.McpServer.csproj
1617
1718
- name: Tests # List of Unit-Test projects to run
1819
default: |
1920
**/Components.Tests.csproj
21+
**/Microsoft.FluentUI.AspNetCore.McpServer.Tests.csproj
2022
2123
- name: NugetPackageVersion # NuGet package version to use (overrides computed version)
2224
type: string

eng/pipelines/build-core-lib.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@ parameters:
4444
- name: Projects # List of projects to build
4545
default: |
4646
**/Microsoft.FluentUI.AspNetCore.Components.csproj
47+
**/Microsoft.FluentUI.AspNetCore.McpServer.csproj
4748
4849
- name: Tests # List of Unit-Test projects to run
4950
default: |
5051
**/Components.Tests.csproj
52+
**/Microsoft.FluentUI.AspNetCore.McpServer.Tests.csproj
5153
5254
variables:
5355
- template: /eng/pipelines/version.yml@self

examples/Demo/FluentUI.Demo.Client/Documentation/Components/AppBar/Examples/AppBarClick.razor

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,35 @@
11
@inject IDialogService DialogService
22

33
<FluentStack Orientation="Orientation.Vertical" Style="height: 330px;">
4-
<FluentAppBar Style="height: 100%;">
5-
<FluentAppBarItem Href="/"
6-
Match="NavLinkMatch.All"
7-
IconRest="HomeIcon()"
8-
IconActive="HomeIcon(active: true)"
9-
Text="Home"
10-
OnClick="HandleOnClick" />
11-
<FluentAppBarItem Href="/AppBar"
12-
IconRest="AppBarIcon()"
13-
IconActive="AppBarIcon(active: true)"
14-
Text="AppBar"
15-
OnClick="HandleOnClick" />
16-
<FluentAppBarItem IconRest="WhatsNewIcon()"
17-
IconActive="WhatsNewIcon(active: true)"
18-
Text="What's New"
19-
OnClick="ShowSuccessAsync" />
20-
<FluentAppBarItem Href="@(null)"
21-
IconRest="IconsIcon()"
22-
IconActive="IconsIcon(active: true)"
23-
Text="Icons"
24-
OnClick="ShowWarningAsync" />
25-
<FluentAppBarItem Href="/Dialog"
26-
IconRest="DialogIcon()"
27-
IconActive="DialogIcon(active: true)"
28-
Text="Dialog"
29-
OnClick="HandleOnClick" />
30-
</FluentAppBar>
4+
<div style="background-color: var(--colorNeutralBackground5); overflow: hidden; resize: vertical; height: 270px; width: 86px; padding: 10px;">
5+
<FluentAppBar Style="height: 100%;">
6+
<FluentAppBarItem Href="/"
7+
Match="NavLinkMatch.All"
8+
IconRest="HomeIcon()"
9+
IconActive="HomeIcon(active: true)"
10+
Text="Home"
11+
OnClick="HandleOnClick" />
12+
<FluentAppBarItem Href="/AppBar"
13+
IconRest="AppBarIcon()"
14+
IconActive="AppBarIcon(active: true)"
15+
Text="AppBar"
16+
OnClick="HandleOnClick" />
17+
<FluentAppBarItem IconRest="WhatsNewIcon()"
18+
IconActive="WhatsNewIcon(active: true)"
19+
Text="What's New"
20+
OnClick="ShowSuccessAsync" />
21+
<FluentAppBarItem Href="@(null)"
22+
IconRest="IconsIcon()"
23+
IconActive="IconsIcon(active: true)"
24+
Text="Icons"
25+
OnClick="HandleOnClick" />
26+
<FluentAppBarItem Href="/Dialog"
27+
IconRest="DialogIcon()"
28+
IconActive="DialogIcon(active: true)"
29+
Text="Dialog"
30+
OnClick="HandleOnClick" />
31+
</FluentAppBar>
32+
</div>
3133
</FluentStack>
3234

3335
@code {

0 commit comments

Comments
 (0)