Skip to content

Commit

Permalink
- Update docs
Browse files Browse the repository at this point in the history
- Update template generated sites
-  Expiriment with some GH Copilot generated teests
  • Loading branch information
vnbaaij committed Feb 2, 2024
1 parent ed2a3c8 commit bbeb348
Show file tree
Hide file tree
Showing 86 changed files with 583 additions and 525 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@

<DemoSection Component="typeof(SortableListDragHandles)" Title="Drag Handles">
<Description>
Drag handles are specified by the `Handle` property which specifies which CSS class denotes the drag handle. In the example below, the items can only be sorted using the drag handle itself.
When setting the <code>Handle</code> parameter to true, the items can only be sorted using the drag handle itself. The following CSS classes can be used to split the drag functionality from the content:
<ul>
<li>sortable-grab: the grabable part of the dragable item</li>
<li>sortable-item-content: the content part of the draggable item</li>
</ul>
</Description>
</DemoSection>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@

<div class="fluent-collapsible-region-container" style="height: 0;" b-2esy53gizz="">
<b>render me</b>
</div>
<div class="fluent-collapsible-region-container" style="height: 0;" b-hk0m26j2or="">Content</div>
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@

<div class="fluent-collapsible-region-container" style="height: auto;" b-2esy53gizz="">
<b>render me</b>
</div>
<div class="fluent-collapsible-region-container" style="height: auto;" b-hk0m26j2or="">Content</div>
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@

<div class="fluent-collapsible-region-container" style="height: auto;" b-2esy53gizz="">
<b>render me</b>
</div>
<div class="fluent-collapsible-region-container" style="height: auto;" b-hk0m26j2or="">Content</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

<div class="fluent-collapsible-region-container" style="max-height: 200px; height: 0;" b-hk0m26j2or="">Content</div>
51 changes: 51 additions & 0 deletions tests/Core/CollapsibleRegion/FluentCollapsibleRegionTests.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
@using Xunit;
@inherits TestContext
@code
{
[Fact]
public void FluentCollapsibleRegion_Expanded()
{
// Arrange && Act
var cut = Render(@<FluentCollapsibleRegion Expanded="true">Content</FluentCollapsibleRegion>);

// Assert
cut.Verify();
}

[Fact]
public void FluentCollapsibleRegion_Collapsed()
{
// Arrange && Act
var cut = Render(@<FluentCollapsibleRegion Expanded="false">Content</FluentCollapsibleRegion>);

// Assert
cut.Verify();
}

[Fact]
public void FluentCollapsibleRegion_MaxHeight()
{
// Arrange
var maxHeight = "200px";

// Act
var cut = Render(@<FluentCollapsibleRegion MaxHeight="@maxHeight">Content</FluentCollapsibleRegion>);

// Assert
cut.Verify();
}

[Fact]
public void FluentCollapsibleRegion_ExpandedChanged()
{
// Arrange
var value = false;
Action<bool> expandedChanged = (e) => { value = e; };

// Act
var cut = Render(@<FluentCollapsibleRegion Expanded="true" ExpandedChanged="expandedChanged">Content</FluentCollapsibleRegion>);

// Assert
cut.Verify();
}
}

This file was deleted.

73 changes: 0 additions & 73 deletions tests/Core/_ToDo/CollapsibleRegion/FluentCollapsibleRegionTests.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ public static IEndpointConventionBuilder MapAdditionalIdentityEndpoints(this IEn
"/Account/ExternalLogin",
QueryString.Create(query));
// Temporary workaround for FluentButton returning a provider value twice
// Split the comma-separated list of strings
var providers = provider.Split(',');
// Find the value that appears twice in the list
provider = providers.GroupBy(p => p)
.Where(g => g.Count() == 2)
.Select(g => g.Key)
.First();
var properties = signInManager.ConfigureExternalAuthenticationProperties(provider, redirectUrl);
return TypedResults.Challenge(properties, [provider]);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<p>
@foreach (var provider in otherLogins)
{
<FluentButton Type="ButtonType.Submit" Appearance="Appearance.Accent" Name="Provider" Value="@provider.Name" Title="@($"Log in using your {provider.DisplayName} account")">
<FluentButton Type="ButtonType.Submit" Appearance="Appearance.Accent" Name="Provider" Value="@provider.Name" Title="@($"Log in using your {provider.DisplayName} account")">
@provider.DisplayName
</FluentButton>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ else
<p>
@foreach (var provider in externalLogins)
{
<FluentButton Type="ButtonType.Submit" Appearance="Appearance.Accent" name="provider" Value="@provider.Name" Title="@($"Log in using your {provider.DisplayName} account")">@provider.DisplayName</FluentButton>
<FluentButton Type="ButtonType.Submit" Appearance="Appearance.Accent" Name="provider" Value="@provider.Name" Title="@($"Log in using your {provider.DisplayName} account")">@provider.DisplayName</FluentButton>
<text>&nbsp;</text>
}
</p>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ else
{
<!-- This page is rendered in SSR mode, so the FluentDataGrid component does not offer any interactivity (like sorting). -->
<FluentDataGrid Id="weathergrid" Items=@forecasts GridTemplateColumns="1fr 1fr 1fr 2fr" TGridItem=WeatherForecast>
<PropertyColumn Title="Date" Property="@(c => c!.Date)" Align=Align.Start/>
<PropertyColumn Title="Temp. (C)" Property="@(c => c!.TemperatureC)" Align=Align.Center/>
<PropertyColumn Title="Temp. (F)" Property="@(c => c!.TemperatureF)" Align=Align.Center/>
<PropertyColumn Title="Summary" Property="@(c => c!.Summary)" Align=Align.End/>
<PropertyColumn Title="Date" Property="@(c => c!.Date)" Align=Align.Start"/>
<PropertyColumn Title="Temp. (C)" Property="@(c => c!.TemperatureC)" Align="Align.Center"/>
<PropertyColumn Title="Temp. (F)" Property="@(c => c!.TemperatureF)" Align="Align.Center"/>
<PropertyColumn Title="Summary" Property="@(c => c!.Summary)" Align="Align.End"/>
</FluentDataGrid>
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>aspnet-FluentUI.TemplateValidation-da823711-18da-48b3-8509-abef0515630f</UserSecretsId>
<UserSecretsId>aspnet-FluentUI.TemplateValidation-d2fb3a59-b7c2-4f16-b8fa-2fd124e6bfd1</UserSecretsId>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:16962",
"sslPort": 44395
"applicationUrl": "http://localhost:12503",
"sslPort": 44388
}
},
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:5128",
"applicationUrl": "http://localhost:5225",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
Expand All @@ -22,7 +22,7 @@
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:7127;http://localhost:5128",
"applicationUrl": "https://localhost:7287;http://localhost:5225",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ public static IEndpointConventionBuilder MapAdditionalIdentityEndpoints(this IEn
"/Account/ExternalLogin",
QueryString.Create(query));
// Temporary workaround for FluentButton returning a provider value twice
// Split the comma-separated list of strings
var providers = provider.Split(',');
// Find the value that appears twice in the list
provider = providers.GroupBy(p => p)
.Where(g => g.Count() == 2)
.Select(g => g.Key)
.First();
var properties = signInManager.ConfigureExternalAuthenticationProperties(provider, redirectUrl);
return TypedResults.Challenge(properties, [provider]);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<p>
@foreach (var provider in otherLogins)
{
<FluentButton Type="ButtonType.Submit" Appearance="Appearance.Accent" Name="Provider" Value="@provider.Name" Title="@($"Log in using your {provider.DisplayName} account")">
<FluentButton Type="ButtonType.Submit" Appearance="Appearance.Accent" Name="Provider" Value="@provider.Name" Title="@($"Log in using your {provider.DisplayName} account")">
@provider.DisplayName
</FluentButton>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ else
<p>
@foreach (var provider in externalLogins)
{
<FluentButton Type="ButtonType.Submit" Appearance="Appearance.Accent" name="provider" Value="@provider.Name" Title="@($"Log in using your {provider.DisplayName} account")">@provider.DisplayName</FluentButton>
<FluentButton Type="ButtonType.Submit" Appearance="Appearance.Accent" Name="provider" Value="@provider.Name" Title="@($"Log in using your {provider.DisplayName} account")">@provider.DisplayName</FluentButton>
<text>&nbsp;</text>
}
</p>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
else
{
<FluentDataGrid Id="weathergrid" Items=@forecasts GridTemplateColumns="1fr 1fr 1fr 2fr" TGridItem=WeatherForecast>
<PropertyColumn Title="Date" Property="@(c => c!.Date)" Sortable="true" Align=Align.Start/>
<PropertyColumn Title="Temp. (C)" Property="@(c => c!.TemperatureC)" Sortable="true" Align=Align.Center/>
<PropertyColumn Title="Temp. (F)" Property="@(c => c!.TemperatureF)" Sortable="true" Align=Align.Center/>
<PropertyColumn Title="Summary" Property="@(c => c!.Summary)" Sortable="true" Align=Align.End/>
<PropertyColumn Title="Date" Property="@(c => c!.Date)" Sortable="true" Align="Align.Start"/>
<PropertyColumn Title="Temp. (C)" Property="@(c => c!.TemperatureC)" Sortable="true" Align="Align.Center"/>
<PropertyColumn Title="Temp. (F)" Property="@(c => c!.TemperatureF)" Sortable="true" Align="Align.Center"/>
<PropertyColumn Title="Summary" Property="@(c => c!.Summary)" Sortable="true" Align="Align.End"/>
</FluentDataGrid>
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>aspnet-FluentUI.TemplateValidation-872fa7db-498e-4557-922b-9a86831b2831</UserSecretsId>
<UserSecretsId>aspnet-FluentUI.TemplateValidation-1775dc8f-f41e-4334-9c4b-5b36ba013869</UserSecretsId>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:3162",
"sslPort": 44312
"applicationUrl": "http://localhost:1887",
"sslPort": 44376
}
},
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:5208",
"applicationUrl": "http://localhost:5240",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
Expand All @@ -22,7 +22,7 @@
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:7121;http://localhost:5208",
"applicationUrl": "https://localhost:7253;http://localhost:5240",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ public static IEndpointConventionBuilder MapAdditionalIdentityEndpoints(this IEn
"/Account/ExternalLogin",
QueryString.Create(query));
// Temporary workaround for FluentButton returning a provider value twice
// Split the comma-separated list of strings
var providers = provider.Split(',');
// Find the value that appears twice in the list
provider = providers.GroupBy(p => p)
.Where(g => g.Count() == 2)
.Select(g => g.Key)
.First();
var properties = signInManager.ConfigureExternalAuthenticationProperties(provider, redirectUrl);
return TypedResults.Challenge(properties, [provider]);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<p>
@foreach (var provider in otherLogins)
{
<FluentButton Type="ButtonType.Submit" Appearance="Appearance.Accent" Name="Provider" Value="@provider.Name" Title="@($"Log in using your {provider.DisplayName} account")">
<FluentButton Type="ButtonType.Submit" Appearance="Appearance.Accent" Name="Provider" Value="@provider.Name" Title="@($"Log in using your {provider.DisplayName} account")">
@provider.DisplayName
</FluentButton>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ else
<p>
@foreach (var provider in externalLogins)
{
<FluentButton Type="ButtonType.Submit" Appearance="Appearance.Accent" name="provider" Value="@provider.Name" Title="@($"Log in using your {provider.DisplayName} account")">@provider.DisplayName</FluentButton>
<FluentButton Type="ButtonType.Submit" Appearance="Appearance.Accent" Name="provider" Value="@provider.Name" Title="@($"Log in using your {provider.DisplayName} account")">@provider.DisplayName</FluentButton>
<text>&nbsp;</text>
}
</p>
</div>
Expand Down
Loading

0 comments on commit bbeb348

Please sign in to comment.