Skip to content

Commit

Permalink
[Package versions] Refactoring (#2131)
Browse files Browse the repository at this point in the history
  • Loading branch information
dvoituron authored Jun 1, 2024
1 parent 91522fd commit 5a65947
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-core-lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
run: dotnet restore

- name: Build
run: dotnet build ${{ env.PROJECTS }} --configuration Release
run: dotnet build ${{ env.PROJECTS }} --configuration Release -warnaserror
working-directory: ${{ github.workspace }}

# Unit Tests
Expand Down
5 changes: 4 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
<!-- Enable code style analysis -->
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<!-- <EnableNETAnalyzers>true</EnableNETAnalyzers> -->
</PropertyGroup>

<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>

</PropertyGroup>

<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
Expand Down
27 changes: 16 additions & 11 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,37 @@
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.5.0" />
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.Emoji" Version="4.6.0" />
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.Icons" version="4.7.2" />

<!-- Build dependencies -->
<PackageVersion Include="Markdig.Signed" Version="0.34.0" />
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="$(AspNetCoreVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="$(AspNetCoreVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="$(AspNetCoreVersion)" />
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="$(RuntimeVersion)" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0-beta1.23525.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.9.2" />
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="$(EfCoreVersion)" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(EfCoreVersion)" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="$(EfCoreVersion)" />
<PackageVersion Include="Microsoft.Extensions.Configuration.CommandLine" Version="$(RuntimeVersion)" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="$(RuntimeVersion)" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="$(RuntimeVersion)" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="$(RuntimeVersion)" />
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="$(RuntimeVersion)" />
<PackageVersion Include="System.Text.Encodings.Web" Version="$(RuntimeVersion)" />

<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="$(EfCoreVersion)" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(EfCoreVersion)" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="$(EfCoreVersion)" />

<PackageVersion Include="Markdig.Signed" Version="0.34.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0-beta1.24219.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.9.2" />
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.10.48" />
<PackageVersion Include="Microsoft.VisualStudioEng.MicroBuild.Core" Version="1.0.0" />
<PackageVersion Include="System.Text.Encodings.Web" Version="$(RuntimeVersion)" />
<PackageVersion Include="System.Text.Json" Version="8.0.3" />

<!-- Test dependencies -->
<PackageVersion Include="bunit" Version="1.28.9" />
<PackageVersion Include="FluentAssertions" Version="7.0.0-tags-7-0-0-alpha-3.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageVersion Include="xunit" Version="2.8.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.0" />
<PackageVersion Include="coverlet.msbuild" Version="6.0.0" />
<PackageVersion Include="coverlet.collector" Version="6.0.2" />
<PackageVersion Include="coverlet.collector" Version="6.0.0" />

</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion eng/pipelines/build-core-lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ extends:
inputs:
command: 'build'
projects: ${{ parameters.Projects }}
arguments: '--configuration Release /p:ContinuousIntegrationBuild=true'
arguments: '--configuration Release /p:ContinuousIntegrationBuild=true -warnaserror'

# Test and generate Code Coverage
- task: DotNetCoreCLI@2
Expand Down
8 changes: 1 addition & 7 deletions examples/Demo/Shared/FluentUI.Demo.Shared.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,7 @@

<!-- Code Analysis -->
<ItemGroup>
<!--
<PackageReference Include="StyleCop.Analyzers" VersionOverride="1.2.0-beta.556">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
-->
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" VersionOverride="17.8.14">
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6296,7 +6296,7 @@
</member>
<member name="P:Microsoft.FluentUI.AspNetCore.Components.FluentNavGroup.Expanded">
<summary>
If true, expands the nav group, otherwise collapse it.
If true, expands the nav group, otherwise collapse it.
Two-way bindable
</summary>
</member>
Expand All @@ -6312,7 +6312,7 @@
</member>
<member name="P:Microsoft.FluentUI.AspNetCore.Components.FluentNavGroup.Gap">
<summary>
Defines the vertical spacing between the NavGroup and adjecent items.
Defines the vertical spacing between the NavGroup and adjecent items.
Needs to be a valid CSS value.
</summary>
</member>
Expand All @@ -6323,7 +6323,7 @@
</member>
<member name="P:Microsoft.FluentUI.AspNetCore.Components.FluentNavGroup.TitleTemplate">
<summary>
Allows for specific markup and styling to be applied for the group title
Allows for specific markup and styling to be applied for the group title
When using this, the containded <see cref="T:Microsoft.FluentUI.AspNetCore.Components.FluentNavLink"/>s and <see cref="T:Microsoft.FluentUI.AspNetCore.Components.FluentNavGroup"/>s need to be placed in a ChildContent tag.
When specifying both Title and TitleTemplate, both will be rendered.
</summary>
Expand Down
8 changes: 4 additions & 4 deletions src/Core/Components/DataGrid/Columns/SelectColumn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,21 +188,21 @@ internal async Task AddOrRemoveSelectedItemAsync(TGridItem? item)
{
_selectedItems.Remove(item);
SelectAll = false;
await CallOnSelect(item, false);
await CallOnSelectAsync(item, false);
}
else
{
if (SelectMode == DataGridSelectMode.Single)
{
foreach (var previous in _selectedItems)
{
await CallOnSelect(previous, false);
await CallOnSelectAsync(previous, false);
}
_selectedItems.Clear();
}

_selectedItems.Add(item);
await CallOnSelect(item, true);
await CallOnSelectAsync(item, true);
}

if (SelectedItemsChanged.HasDelegate)
Expand All @@ -213,7 +213,7 @@ internal async Task AddOrRemoveSelectedItemAsync(TGridItem? item)
RefreshHeaderContent();
}

Task CallOnSelect(TGridItem item, bool isSelected)
Task CallOnSelectAsync(TGridItem item, bool isSelected)
{
return OnSelect.HasDelegate
? OnSelect.InvokeAsync((item, isSelected))
Expand Down
22 changes: 11 additions & 11 deletions src/Core/Components/List/FluentAutocomplete.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ protected async Task KeyDownHandlerAsync(FluentKeyCodeEventArgs e)
switch (e.Key)
{
case KeyCode.Escape:
await KeyDown_Escape();
await KeyDown_EscapeAsync();
break;

case KeyCode.Enter:
Expand All @@ -345,11 +345,11 @@ protected async Task KeyDownHandlerAsync(FluentKeyCodeEventArgs e)
: false;
if (optionDisabled)
{
await KeyDown_Escape();
await KeyDown_EscapeAsync();
}
else
{
await KeyDown_Enter();
await KeyDown_EnterAsync();
}
}
else
Expand All @@ -359,13 +359,13 @@ protected async Task KeyDownHandlerAsync(FluentKeyCodeEventArgs e)
break;

case KeyCode.Backspace:
await KeyDown_Backspace();
await KeyDown_BackspaceAsync();
break;

case KeyCode.Down:
if (IsMultiSelectOpened)
{
await KeyDown_ArrowDown();
await KeyDown_ArrowDownAsync();
}
else
{
Expand All @@ -374,19 +374,19 @@ protected async Task KeyDownHandlerAsync(FluentKeyCodeEventArgs e)
break;

case KeyCode.Up:
await KeyDown_ArrowUp();
await KeyDown_ArrowUpAsync();
break;
}

// Escape
Task KeyDown_Escape()
Task KeyDown_EscapeAsync()
{
IsMultiSelectOpened = false;
return Task.CompletedTask;
}

// Backspace
async Task KeyDown_Backspace()
async Task KeyDown_BackspaceAsync()
{
// Remove last selected item
if (string.IsNullOrEmpty(ValueText) &&
Expand All @@ -409,7 +409,7 @@ await InputHandlerAsync(new ChangeEventArgs()
}

// ArrowUp
Task KeyDown_ArrowUp()
Task KeyDown_ArrowUpAsync()
{
if (Items != null && Items.Any())
{
Expand All @@ -433,7 +433,7 @@ Task KeyDown_ArrowUp()
}

// ArrowDown
Task KeyDown_ArrowDown()
Task KeyDown_ArrowDownAsync()
{
if (Items != null && Items.Any())
{
Expand All @@ -457,7 +457,7 @@ Task KeyDown_ArrowDown()
}

// Enter
async Task KeyDown_Enter()
async Task KeyDown_EnterAsync()
{
if (!IsMultiSelectOpened)
{
Expand Down
10 changes: 2 additions & 8 deletions src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<EmbedUntrackedSources>true</EmbedUntrackedSources>
<DebugType>embedded</DebugType>

<PackageOutputPath>$(SolutionDir)artifacts</PackageOutputPath>
</PropertyGroup>

Expand Down Expand Up @@ -51,13 +51,7 @@

<!-- Code Analysis -->
<ItemGroup>
<!--
<PackageReference Include="StyleCop.Analyzers" VersionOverride="1.2.0-beta.556">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
-->
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" VersionOverride="17.8.14">
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down

0 comments on commit 5a65947

Please sign in to comment.