Skip to content

Commit

Permalink
add .net 8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxymGorn committed Nov 17, 2023
1 parent f8f16b5 commit ed16bb2
Show file tree
Hide file tree
Showing 101 changed files with 2,936 additions and 38 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ jobs:
# uses GitHub's checkout action to checkout code form the master branch
- uses: actions/checkout@v3

# sets up .NET Core SDK 7, 6
- name: Setup .NET 7, 6
# sets up .NET Core SDK 8, 7, 6
- name: Setup .NET 8, 7, 6
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Restore dependencies
run: dotnet restore
Expand All @@ -44,7 +45,7 @@ jobs:
- name: Coverage
uses: codecov/[email protected]
with:
files: coverage.net6.0.cobertura.xml, coverage.net7.0.cobertura.xml
files: coverage.net6.0.cobertura.xml, coverage.net7.0.cobertura.xml, coverage.net8.0.cobertura.xml
fail_ci_if_error: true
verbose: true

Expand Down Expand Up @@ -125,13 +126,13 @@ jobs:

strategy:
matrix:
dotnet-version: ['6.0.x', '7.0.x']
dotnet-version: ['6.0.x', '7.0.x', '8.0.x']

steps:
- uses: actions/checkout@v3

# sets up .NET Core SDK 7, 6
- name: Setup .NET 7, 6
# sets up .NET Core SDK 8, 7, 6
- name: Setup .NET 8, 7, 6
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet-version }}
Expand Down Expand Up @@ -164,3 +165,13 @@ jobs:
run: dotnet build --no-restore
working-directory: examples\Cropper.Blazor.MAUI.Net6
if: matrix.dotnet-version == '6.0.x'

- name: DotNet Build Blazor Server Demo Project
run: dotnet build --no-restore
working-directory: examples\Cropper.Blazor.Server.Net8
if: matrix.dotnet-version == '8.0.x'

- name: DotNet Build Blazor MAUI Demo Project
run: dotnet build --no-restore
working-directory: examples\Cropper.Blazor.MAUI.Net8
if: matrix.dotnet-version == '8.0.x'
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ jobs:
steps:
- uses: actions/checkout@v3

# sets up .NET Core SDK 7, 6
- name: Setup .NET 7, 6
# sets up .NET Core SDK 8, 7, 6
- name: Setup .NET 8, 7, 6
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Restore dependencies
run: dotnet restore
Expand All @@ -45,7 +46,7 @@ jobs:
- name: Coverage
uses: codecov/[email protected]
with:
files: coverage.net6.0.cobertura.xml, coverage.net7.0.cobertura.xml
files: coverage.net6.0.cobertura.xml, coverage.net7.0.cobertura.xml, coverage.net8.0.cobertura.xml
fail_ci_if_error: true
verbose: true

Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ jobs:
# uses GitHub's checkout action to checkout code form the master branch
- uses: actions/checkout@v3

# sets up .NET Core SDK 7, 6
- name: Setup .NET 7, 6
# sets up .NET Core SDK 8, 7, 6
- name: Setup .NET 8, 7, 6
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Restore dependencies
run: dotnet restore
Expand Down
3 changes: 2 additions & 1 deletion NuGet_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ Cropper.Blazor is an essential component for building interactive image cropping
| - | .NET 5 | Not supported |
| 1.1.x | [.NET 6](https://dotnet.microsoft.com/download/dotnet/6.0) | :heavy_check_mark: |
| 1.2.x | [.NET 6](https://dotnet.microsoft.com/download/dotnet/6.0) & [.NET 7](https://dotnet.microsoft.com/en-us/download/dotnet/7.0) | :heavy_check_mark: |
| 1.3.x | [.NET 6](https://dotnet.microsoft.com/download/dotnet/6.0) & [.NET 7](https://dotnet.microsoft.com/en-us/download/dotnet/7.0) & [.NET 8](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) | :heavy_check_mark: |

- Supported .NET 7.0, .NET 6.0 versions for these web platforms:
- Supported .NET 8.0, .NET 7.0, .NET 6.0 versions for these web platforms:
- Blazor WebAssembly
- Blazor Server
- Blazor Server Hybrid with MVC
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ Cropper.Blazor is an essential component for building interactive image cropping
| - | .NET 5 | Not supported |
| 1.1.x | [.NET 6](https://dotnet.microsoft.com/download/dotnet/6.0) | :heavy_check_mark: |
| 1.2.x | [.NET 6](https://dotnet.microsoft.com/download/dotnet/6.0) & [.NET 7](https://dotnet.microsoft.com/en-us/download/dotnet/7.0) | :heavy_check_mark: |
| 1.3.x | [.NET 6](https://dotnet.microsoft.com/download/dotnet/6.0) & [.NET 7](https://dotnet.microsoft.com/en-us/download/dotnet/7.0) & [.NET 8](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) | :heavy_check_mark: |

- Supported .NET 7.0, .NET 6.0 versions for these web platforms:
- Supported .NET 8.0, .NET 7.0, .NET 6.0 versions for these web platforms:
- Blazor WebAssembly
- Blazor Server
- Blazor Server Hybrid with MVC
Expand Down
16 changes: 16 additions & 0 deletions examples/Cropper.Blazor.Demo.sln
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cropper.Blazor", "..\src\Cr
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cropper.MVC.With.Blazor.Server.Net7", "Cropper.MVC.With.Blazor.Server.Net7\Cropper.MVC.With.Blazor.Server.Net7.csproj", "{B6352D48-8912-40CA-B099-E337F1B3CD4B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cropper.Blazor.MAUI.Net8", "Cropper.Blazor.MAUI.Net8\Cropper.Blazor.MAUI.Net8.csproj", "{0C1676CF-1503-4ECC-AD16-4FD844C0FCC0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cropper.Blazor.Server.Net8", "Cropper.Blazor.Server.Net8\Cropper.Blazor.Server.Net8.csproj", "{9A16F9F9-231A-42C8-A2E9-AE687141BC3B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -53,6 +57,16 @@ Global
{B6352D48-8912-40CA-B099-E337F1B3CD4B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B6352D48-8912-40CA-B099-E337F1B3CD4B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B6352D48-8912-40CA-B099-E337F1B3CD4B}.Release|Any CPU.Build.0 = Release|Any CPU
{0C1676CF-1503-4ECC-AD16-4FD844C0FCC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0C1676CF-1503-4ECC-AD16-4FD844C0FCC0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0C1676CF-1503-4ECC-AD16-4FD844C0FCC0}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{0C1676CF-1503-4ECC-AD16-4FD844C0FCC0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0C1676CF-1503-4ECC-AD16-4FD844C0FCC0}.Release|Any CPU.Build.0 = Release|Any CPU
{0C1676CF-1503-4ECC-AD16-4FD844C0FCC0}.Release|Any CPU.Deploy.0 = Release|Any CPU
{9A16F9F9-231A-42C8-A2E9-AE687141BC3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9A16F9F9-231A-42C8-A2E9-AE687141BC3B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9A16F9F9-231A-42C8-A2E9-AE687141BC3B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9A16F9F9-231A-42C8-A2E9-AE687141BC3B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -64,6 +78,8 @@ Global
{A607E161-5266-4B13-AB68-6DEBB8768F54} = {49B4C364-A66D-44E3-8094-35C8CEC06100}
{84AC7F07-3FB9-4147-AB61-733243686D9A} = {4F93F51C-1D65-4E5D-86F7-7BC5B8899180}
{B6352D48-8912-40CA-B099-E337F1B3CD4B} = {49B4C364-A66D-44E3-8094-35C8CEC06100}
{0C1676CF-1503-4ECC-AD16-4FD844C0FCC0} = {49B4C364-A66D-44E3-8094-35C8CEC06100}
{9A16F9F9-231A-42C8-A2E9-AE687141BC3B} = {49B4C364-A66D-44E3-8094-35C8CEC06100}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5FA0980D-10C3-4751-9432-DE20984B0A69}
Expand Down
26 changes: 26 additions & 0 deletions examples/Cropper.Blazor.MAUI.Net8/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:Cropper.Blazor.MAUI.Net8"
x:Class="Cropper.Blazor.MAUI.Net8.App">
<Application.Resources>
<ResourceDictionary>

<Color x:Key="PageBackgroundColor">#512bdf</Color>
<Color x:Key="PrimaryTextColor">White</Color>

<Style TargetType="Label">
<Setter Property="TextColor" Value="{DynamicResource PrimaryTextColor}" />
<Setter Property="FontFamily" Value="OpenSansRegular" />
</Style>

<Style TargetType="Button">
<Setter Property="TextColor" Value="{DynamicResource PrimaryTextColor}" />
<Setter Property="FontFamily" Value="OpenSansRegular" />
<Setter Property="BackgroundColor" Value="#2b0b98" />
<Setter Property="Padding" Value="14,10" />
</Style>

</ResourceDictionary>
</Application.Resources>
</Application>
12 changes: 12 additions & 0 deletions examples/Cropper.Blazor.MAUI.Net8/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace Cropper.Blazor.MAUI.Net8
{
public partial class App : Application
{
public App()
{
InitializeComponent();

MainPage = new MainPage();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@inherits LayoutComponentBase

<MudThemeProvider />
<MudDialogProvider />
<MudSnackbarProvider />

<div class="page">
<div class="sidebar">
<NavMenu />
</div>

<main>
<div class="top-row px-4">
<a href="https://learn.microsoft.com/aspnet/core/" target="_blank">About</a>
</div>

<article class="content px-4">
@Body
</article>
</main>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
.page {
position: relative;
display: flex;
flex-direction: column;
}

main {
flex: 1;
}

.sidebar {
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
}

.top-row {
background-color: #f7f7f7;
border-bottom: 1px solid #d6d5d5;
justify-content: flex-end;
height: 3.5rem;
display: flex;
align-items: center;
}

.top-row ::deep a, .top-row ::deep .btn-link {
white-space: nowrap;
margin-left: 1.5rem;
text-decoration: none;
}

.top-row ::deep a:hover, .top-row ::deep .btn-link:hover {
text-decoration: underline;
}

.top-row ::deep a:first-child {
overflow: hidden;
text-overflow: ellipsis;
}

@media (max-width: 640.98px) {
.top-row {
justify-content: space-between;
}

.top-row ::deep a, .top-row ::deep .btn-link {
margin-left: 0;
}
}

@media (min-width: 641px) {
.page {
flex-direction: row;
}

.sidebar {
width: 250px;
height: 100vh;
position: sticky;
top: 0;
}

.top-row {
position: sticky;
top: 0;
z-index: 1;
}

.top-row.auth ::deep a:first-child {
flex: 1;
text-align: right;
width: 0;
}

.top-row, article {
padding-left: 2rem !important;
padding-right: 1.5rem !important;
}
}
27 changes: 27 additions & 0 deletions examples/Cropper.Blazor.MAUI.Net8/Components/Layout/NavMenu.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<div class="top-row ps-3 navbar navbar-dark">
<div class="container-fluid">
<a class="navbar-brand" href="">Cropper.Blazor.MAUI.Net8</a>
</div>
</div>

<input type="checkbox" title="Navigation menu" class="navbar-toggler" />

<div class="nav-scrollable" onclick="document.querySelector('.navbar-toggler').click()">
<nav class="flex-column">
<div class="nav-item px-3">
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
<span class="bi bi-house-door-fill-nav-menu" aria-hidden="true"></span> Home
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="counter">
<span class="bi bi-plus-square-fill-nav-menu" aria-hidden="true"></span> Counter
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="weather">
<span class="bi bi-list-nested-nav-menu" aria-hidden="true"></span> Weather
</NavLink>
</div>
</nav>
</div>
Loading

0 comments on commit ed16bb2

Please sign in to comment.