Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion .github/workflows/build-core-lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ env:
./src/Templates/Microsoft.FluentUI.AspNetCore.Templates.csproj
TESTS: >
./tests/Core/Components.Tests.csproj
./tests/Tools/McpServer.Tests/Microsoft.FluentUI.AspNetCore.McpServer.Tests.csproj
./tests/Charts/Components.Charts.Tests.csproj
./tests/McpServer/McpServer.Tests.csproj
INTEGRATION_TEST: "" # DISABLING: ./tests/Integration/Components.IntegrationTests.csproj
MIN_COVERAGE: "98"

Expand Down
5 changes: 4 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Microsoft.FluentUI.AspNetCore.Components.Tests</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Microsoft.FluentUI.AspNetCore.Components.Charts.Tests</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>FluentUI.Demo.DocViewer.Tests</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
Expand Down
9 changes: 4 additions & 5 deletions Microsoft.FluentUI-v5.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,11 @@
<Project Path="src/Tools/McpServer/Microsoft.FluentUI.AspNetCore.McpServer.csproj" />
</Folder>
<Folder Name="/tests/">
<Project Path="tests/Charts/Components.Charts.Tests.csproj" />
<Project Path="tests/Core/Components.Tests.csproj" />
<Project Path="tests/Integration/Components.IntegrationTests.csproj">
<Build Solution="Debug|*" Project="false" />
</Project>
</Folder>
<Folder Name="/tests/Tools/">
<Project Path="tests/Tools/McpServer.Tests/Microsoft.FluentUI.AspNetCore.McpServer.Tests.csproj" />
</Folder>
</Solution>
<Project Path="tests/McpServer/McpServer.Tests.csproj" />
<Project Path="tests/Tools/Components.Tests.Tools.csproj" />
</Folder></Solution>
3 changes: 2 additions & 1 deletion eng/pipelines/build-all-lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ parameters:
- name: Tests # List of Unit-Test projects to run
default: |
**/Components.Tests.csproj
**/Microsoft.FluentUI.AspNetCore.McpServer.Tests.csproj
**/Components.Charts.Tests.csproj
**/McpServer.Tests.csproj

- name: NugetPackageVersion # NuGet package version to use (overrides computed version)
type: string
Expand Down
3 changes: 2 additions & 1 deletion eng/pipelines/build-core-lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ parameters:
- name: Tests # List of Unit-Test projects to run
default: |
**/Components.Tests.csproj
**/Microsoft.FluentUI.AspNetCore.McpServer.Tests.csproj
**/Components.Charts.Tests.csproj
**/McpServer.Tests.csproj

variables:
- template: /eng/pipelines/version.yml@self
Expand Down
2 changes: 2 additions & 0 deletions src/Charts/Charts/FluentCartesianChartBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// This file is licensed to you under the MIT License.
// ------------------------------------------------------------------------

using System.Diagnostics.CodeAnalysis;
using System.Text.Json;
using System.Text.Json.Serialization;
using Microsoft.AspNetCore.Components;
Expand Down Expand Up @@ -209,6 +210,7 @@ protected override TooltipContext BuildTooltipContext(
[JsonSerializable(typeof(IDictionary<string, string>))]
[JsonSerializable(typeof(Dictionary<string, string>))]
[JsonSourceGenerationOptions(WriteIndented = false)]
[ExcludeFromCodeCoverage(Justification = "This class is used for source-generated JSON serialization and does not contain any logic to be tested.")]
#pragma warning disable MA0048 // File name must match type name
internal partial class ChartJsonSerializerContext : JsonSerializerContext
#pragma warning restore MA0048 // File name must match type name
Expand Down
2 changes: 2 additions & 0 deletions src/Charts/Infrastructure/ChartJson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
// This file is licensed to you under the MIT License.
// ------------------------------------------------------------------------

using System.Diagnostics.CodeAnalysis;
using System.Text.Json;

namespace Microsoft.FluentUI.AspNetCore.Components.Charts;

/// <summary>
/// Provides shared source-generated JSON serialization helpers for chart payloads.
/// </summary>
[ExcludeFromCodeCoverage(Justification = "Thin convenience wrapper around source-generated JSON contexts; behavior is covered by serializer context tests.")]
public static class ChartJson
{
/// <summary>
Expand Down

This file was deleted.

2 changes: 2 additions & 0 deletions src/Charts/Serialization/DataVizPaletteJsonConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// This file is licensed to you under the MIT License.
// ------------------------------------------------------------------------

using System.Diagnostics.CodeAnalysis;
using System.Text.Json;
using System.Text.Json.Serialization;
using Microsoft.FluentUI.AspNetCore.Components.Extensions;
Expand All @@ -13,6 +14,7 @@ namespace Microsoft.FluentUI.AspNetCore.Components.Charts;
/// (e.g. <c>"color5"</c>, <c>"info"</c>) so the chart web components can
/// resolve it to an actual hex color at runtime.
/// </summary>
[ExcludeFromCodeCoverage(Justification = "Serialization glue with minimal behavior; covered by higher-level serialization tests.")]
internal sealed class DataVizPaletteJsonConverter : JsonConverter<DataVizPalette>
{
/// <inheritdoc/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// This file is licensed to you under the MIT License.
// ------------------------------------------------------------------------

using System.Diagnostics.CodeAnalysis;
using System.Text.Json.Serialization;

namespace Microsoft.FluentUI.AspNetCore.Components.Charts;
Expand All @@ -11,6 +12,7 @@ namespace Microsoft.FluentUI.AspNetCore.Components.Charts;
/// </summary>
[JsonSerializable(typeof(DonutDataPoint))]
[JsonSerializable(typeof(IReadOnlyList<DonutDataPoint>))]
[ExcludeFromCodeCoverage(Justification = "This class is used for source-generated JSON serialization and does not contain any logic to be tested.")]
internal sealed partial class DonutChartDataJsonSerializerContext : JsonSerializerContext
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// This file is licensed to you under the MIT License.
// ------------------------------------------------------------------------

using System.Diagnostics.CodeAnalysis;
using System.Text.Json.Serialization;

namespace Microsoft.FluentUI.AspNetCore.Components.Charts;
Expand All @@ -11,6 +12,8 @@ namespace Microsoft.FluentUI.AspNetCore.Components.Charts;
/// </summary>
[JsonSerializable(typeof(FunnelDataPoint))]
[JsonSerializable(typeof(IReadOnlyList<FunnelDataPoint>))]
[ExcludeFromCodeCoverage(Justification = "This class is used for source-generated JSON serialization and does not contain any logic to be tested.")]

internal sealed partial class FunnelChartDataJsonSerializerContext : JsonSerializerContext
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// This file is licensed to you under the MIT License.
// ------------------------------------------------------------------------

using System.Diagnostics.CodeAnalysis;
using System.Text.Json.Serialization;

namespace Microsoft.FluentUI.AspNetCore.Components.Charts;
Expand All @@ -14,6 +15,8 @@ namespace Microsoft.FluentUI.AspNetCore.Components.Charts;
[JsonSerializable(typeof(GanttChartDataPoint))]
[JsonSerializable(typeof(CalloutAccessibilityData))]
[JsonSerializable(typeof(IReadOnlyList<GanttChartDataPoint>))]
[ExcludeFromCodeCoverage(Justification = "This class is used for source-generated JSON serialization and does not contain any logic to be tested.")]

internal sealed partial class GanttChartDataJsonSerializerContext : JsonSerializerContext
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// This file is licensed to you under the MIT License.
// ------------------------------------------------------------------------

using System.Diagnostics.CodeAnalysis;
using System.Text.Json.Serialization;

namespace Microsoft.FluentUI.AspNetCore.Components.Charts;
Expand All @@ -13,6 +14,8 @@ namespace Microsoft.FluentUI.AspNetCore.Components.Charts;
[JsonSerializable(typeof(HorizontalBarChartDataPoint))]
[JsonSerializable(typeof(IReadOnlyList<HorizontalBarChartSeries>))]
[JsonSerializable(typeof(IReadOnlyList<HorizontalBarChartDataPoint>))]
[ExcludeFromCodeCoverage(Justification = "This class is used for source-generated JSON serialization and does not contain any logic to be tested.")]

internal sealed partial class HorizontalBarChartDataJsonSerializerContext : JsonSerializerContext
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// This file is licensed to you under the MIT License.
// ------------------------------------------------------------------------

using System.Diagnostics.CodeAnalysis;
using System.Text.Json.Serialization;

namespace Microsoft.FluentUI.AspNetCore.Components.Charts;
Expand All @@ -12,6 +13,8 @@ namespace Microsoft.FluentUI.AspNetCore.Components.Charts;
[JsonSerializable(typeof(CalloutAccessibilityData))]
[JsonSerializable(typeof(HorizontalBarChartWithAxisDataPoint))]
[JsonSerializable(typeof(IReadOnlyList<HorizontalBarChartWithAxisDataPoint>))]
[ExcludeFromCodeCoverage(Justification = "This class is used for source-generated JSON serialization and does not contain any logic to be tested.")]

internal sealed partial class HorizontalBarChartWithAxisDataJsonSerializerContext : JsonSerializerContext
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

<!-- Expose internals to test project -->
<ItemGroup>
<InternalsVisibleTo Include="Microsoft.FluentUI.AspNetCore.McpServer.Tests" />
<InternalsVisibleTo Include="McpServer.Tests" />
</ItemGroup>

<!-- Release -->
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<html>
<head></head>
<body>
<fluent-donut-chart id="xxx" class="fluent-donut-chart" data="[{&quot;legend&quot;:&quot;Category A&quot;,&quot;data&quot;:40,&quot;calloutData&quot;:null,&quot;xAxisCalloutData&quot;:null,&quot;yAxisCalloutData&quot;:null},{&quot;legend&quot;:&quot;Category B&quot;,&quot;data&quot;:30,&quot;calloutData&quot;:null,&quot;xAxisCalloutData&quot;:null,&quot;yAxisCalloutData&quot;:null},{&quot;legend&quot;:&quot;Category C&quot;,&quot;data&quot;:20,&quot;calloutData&quot;:null,&quot;xAxisCalloutData&quot;:null,&quot;yAxisCalloutData&quot;:null},{&quot;legend&quot;:&quot;Category D&quot;,&quot;data&quot;:10,&quot;calloutData&quot;:null,&quot;xAxisCalloutData&quot;:null,&quot;yAxisCalloutData&quot;:null}]"></fluent-donut-chart>
</body>
</html>
Loading
Loading