Skip to content

Commit

Permalink
Merge pull request #6442 from bitfoundation/develop
Browse files Browse the repository at this point in the history
Version 8.6.0 (#6411)
  • Loading branch information
msynk authored Dec 31, 2023
2 parents b92c327 + b3f88b6 commit b8c7e83
Show file tree
Hide file tree
Showing 229 changed files with 6,497 additions and 1,406 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/admin-sample.cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ jobs:
files: 'AdminPanel/src/Client/AdminPanel.Client.Core/appsettings.json'
env:
ApiServerAddress: ${{ env.API_SERVER_ADDRESS }}

- name: Set android universal link
run: sed -i 's/bp.bitplatform.dev/adminpanel.bitplatform.dev/g' AdminPanel/src/Client/AdminPanel.Client.Maui/Platforms/Android/MainActivity.cs

- name: Install maui
run: cd src && dotnet workload install maui-android
Expand Down Expand Up @@ -287,6 +290,9 @@ jobs:
files: 'AdminPanel/src/Client/AdminPanel.Client.Core/appsettings.json'
env:
ApiServerAddress: ${{ env.API_SERVER_ADDRESS }}

- name: Set iOS universal link
run: brew install gnu-sed && gsed -i 's/bp.bitplatform.dev/adminpanel.bitplatform.dev/g' AdminPanel/src/Client/AdminPanel.Client.Maui/Platforms/iOS/Entitlements.plist

- name: Install maui
run: cd src && dotnet workload install maui
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bit.full.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Release build empty sample + offline db + Win exe
run: |
dotnet new bit-bp --name EmptyBP --database other --sample none --pipeline azure --offlineDb --winExe
dotnet new bit-bp --name EmptyBP --database other --sample none --pipeline azure --offlineDb --Windows
dotnet build EmptyBP/EmptyBP.sln -c Release -p:RunAOTCompilation=false -p:EnableWindowsTargeting=true
- name: Release build admin panel sample + SqlServer database
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/todo-sample.cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ jobs:
files: 'TodoSample/src/Client/TodoSample.Client.Core/appsettings.json'
env:
ApiServerAddress: ${{ env.API_SERVER_ADDRESS }}

- name: Set android universal link
run: sed -i 's/bp.bitplatform.dev/todo.bitplatform.dev/g' TodoSample/src/Client/TodoSample.Client.Maui/Platforms/Android/MainActivity.cs

- name: Install maui
run: cd src && dotnet workload install maui-android
Expand Down Expand Up @@ -282,13 +285,16 @@ jobs:
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0
dotnet new install Bit.Boilerplate.0.0.0.nupkg
cd ../../../ && dotnet new bit-bp --name TodoSample --database SqlServer --sample Todo
- name: Update appsettings.json api server address
uses: microsoft/variable-substitution@v1
with:
files: 'TodoSample/src/Client/TodoSample.Client.Core/appsettings.json'
env:
ApiServerAddress: ${{ env.API_SERVER_ADDRESS }}

- name: Set iOS universal link
run: brew install gnu-sed && gsed -i 's/bp.bitplatform.dev/todo.bitplatform.dev/g' TodoSample/src/Client/TodoSample.Client.Maui/Platforms/iOS/Entitlements.plist

- name: Install maui
run: cd src && dotnet workload install maui
Expand Down
2 changes: 1 addition & 1 deletion src/Bit.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<PackageProjectUrl>https://github.com/bitfoundation/bitplatform</PackageProjectUrl>
<PackageIconUrl>https://avatars.githubusercontent.com/u/22663390</PackageIconUrl>

<ReleaseVersion>8.5.0</ReleaseVersion>
<ReleaseVersion>8.6.0</ReleaseVersion>

<PackageReleaseNotes>https://github.com/bitfoundation/bitplatform/releases/tag/v-$(ReleaseVersion)</PackageReleaseNotes>
<PackageVersion>$(ReleaseVersion)</PackageVersion>
Expand Down
22 changes: 11 additions & 11 deletions src/BlazorUI/Bit.BlazorUI.Tests/Buttons/BitButtonTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,15 +206,15 @@ public void BitButtonButtonStateNotOverriddenInEditContextTest()
}

[DataTestMethod,
DataRow(BitButtonColor.Info),
DataRow(BitButtonColor.Success),
DataRow(BitButtonColor.Warning),
DataRow(BitButtonColor.SevereWarning),
DataRow(BitButtonColor.Error),
DataRow(BitColor.Info),
DataRow(BitColor.Success),
DataRow(BitColor.Warning),
DataRow(BitColor.SevereWarning),
DataRow(BitColor.Error),
DataRow(null),
]
[TestMethod]
public void BitButtonColorOfButtonTest(BitButtonColor? color)
public void BitColorOfButtonTest(BitColor? color)
{
var com = RenderComponent<BitButton>(parameters =>
{
Expand All @@ -228,11 +228,11 @@ public void BitButtonColorOfButtonTest(BitButtonColor? color)

var colorClassName = color switch
{
BitButtonColor.Info => "bit-btn-inf",
BitButtonColor.Success => "bit-btn-suc",
BitButtonColor.Warning => "bit-btn-wrn",
BitButtonColor.SevereWarning => "bit-btn-swr",
BitButtonColor.Error => "bit-btn-err",
BitColor.Info => "bit-btn-inf",
BitColor.Success => "bit-btn-suc",
BitColor.Warning => "bit-btn-wrn",
BitColor.SevereWarning => "bit-btn-swr",
BitColor.Error => "bit-btn-err",
_ => String.Empty
};

Expand Down
14 changes: 7 additions & 7 deletions src/BlazorUI/Bit.BlazorUI/Components/Badge/BitBadge.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ namespace Bit.BlazorUI;

public partial class BitBadge
{
private BitColor? color;
private BitBadgeSize? size;
private BitBadgeColor? color;
private BitAppearance appearance = BitAppearance.Primary;
private BitBadgePosition badgePosition = BitBadgePosition.TopRight;

Expand Down Expand Up @@ -43,7 +43,7 @@ public BitAppearance Appearance
/// The color of the badge.
/// </summary>
[Parameter]
public BitBadgeColor? Color
public BitColor? Color
{
get => color;
set
Expand Down Expand Up @@ -212,11 +212,11 @@ private string GetBadgeClasses()

className.Append(' ').Append(Color switch
{
BitBadgeColor.Info => "bit-bdg-inf",
BitBadgeColor.Success => "bit-bdg-suc",
BitBadgeColor.Warning => "bit-bdg-wrn",
BitBadgeColor.SevereWarning => "bit-bdg-swr",
BitBadgeColor.Error => "bit-bdg-err",
BitColor.Info => "bit-bdg-inf",
BitColor.Success => "bit-bdg-suc",
BitColor.Warning => "bit-bdg-wrn",
BitColor.SevereWarning => "bit-bdg-swr",
BitColor.Error => "bit-bdg-err",
_ => string.Empty
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
namespace Bit.BlazorUI;

public enum BitBadgeColor
public enum BitColor
{
/// <summary>
/// Info style of Badge.
/// Info styled component.
/// </summary>
Info,

/// <summary>
/// Warning style of Badge.
/// Success styled component.
/// </summary>
Warning,
Success,

/// <summary>
/// Success style of Badge.
/// Warning styled component.
/// </summary>
Success,
Warning,

/// <summary>
/// Error style of Badge.
/// Severe Warning styled component.
/// </summary>
Error,
SevereWarning,

/// <summary>
/// Severe Warning style of Badge.
/// Error styled component.
/// </summary>
SevereWarning,
Error,
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ namespace Bit.BlazorUI;

public partial class BitButton
{
private BitColor? color;
private BitButtonSize? size;
private BitButtonColor? color;
private BitButtonStyle buttonStyle = BitButtonStyle.Primary;
private BitButtonIconPosition? iconPosition = BitButtonIconPosition.Start;

Expand Down Expand Up @@ -69,7 +69,7 @@ public BitButtonStyle ButtonStyle
/// The color of button
/// </summary>
[Parameter]
public BitButtonColor? Color
public BitColor? Color
{
get => color;
set
Expand Down Expand Up @@ -185,11 +185,11 @@ protected override void RegisterCssClasses()

ClassBuilder.Register(() => Color switch
{
BitButtonColor.Info => "bit-btn-inf",
BitButtonColor.Success => "bit-btn-suc",
BitButtonColor.Warning => "bit-btn-wrn",
BitButtonColor.SevereWarning => "bit-btn-swr",
BitButtonColor.Error => "bit-btn-err",
BitColor.Info => "bit-btn-inf",
BitColor.Success => "bit-btn-suc",
BitColor.Warning => "bit-btn-wrn",
BitColor.SevereWarning => "bit-btn-swr",
BitColor.Error => "bit-btn-err",
_ => string.Empty
});

Expand Down
29 changes: 0 additions & 29 deletions src/BlazorUI/Bit.BlazorUI/Components/Buttons/BitButtonColor.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ namespace Bit.BlazorUI;
public partial class BitButtonGroup<TItem> where TItem : class
{
private bool vertical;
private BitColor? color;
private BitButtonSize? size;
private BitButtonColor? color;
private BitButtonStyle buttonStyle = BitButtonStyle.Primary;

private List<TItem> _items = new();
Expand All @@ -23,7 +23,7 @@ public partial class BitButtonGroup<TItem> where TItem : class


/// <summary>
/// The style of button, Possible values: Primary | Standard
/// The style of ButtonGroup, Possible values: Primary | Standard
/// </summary>
[Parameter]
public BitButtonStyle ButtonStyle
Expand All @@ -44,10 +44,10 @@ public BitButtonStyle ButtonStyle
[Parameter] public RenderFragment? ChildContent { get; set; }

/// <summary>
/// The color of button
/// The color of ButtonGroup.
/// </summary>
[Parameter]
public BitButtonColor? Color
public BitColor? Color
{
get => color;
set
Expand Down Expand Up @@ -101,7 +101,7 @@ public bool Vertical
[Parameter] public RenderFragment? Options { get; set; }

/// <summary>
/// The size of button, Possible values: Small | Medium | Large
/// The size of ButtonGroup, Possible values: Small | Medium | Large
/// </summary>
[Parameter]
public BitButtonSize? Size
Expand Down Expand Up @@ -147,11 +147,11 @@ protected override void RegisterCssClasses()

ClassBuilder.Register(() => Color switch
{
BitButtonColor.Info => "bit-btg-inf",
BitButtonColor.Success => "bit-btg-suc",
BitButtonColor.Warning => "bit-btg-war",
BitButtonColor.SevereWarning => "bit-btg-swa",
BitButtonColor.Error => "bit-btg-err",
BitColor.Info => "bit-btg-inf",
BitColor.Success => "bit-btg-suc",
BitColor.Warning => "bit-btg-war",
BitColor.SevereWarning => "bit-btg-swa",
BitColor.Error => "bit-btg-err",
_ => string.Empty
});

Expand Down Expand Up @@ -193,11 +193,11 @@ protected override Task OnParametersSetAsync()

className.Append(Color switch
{
BitButtonColor.Info => " bit-btg-iin",
BitButtonColor.Success => " bit-btg-isu",
BitButtonColor.Warning => " bit-btg-iwa",
BitButtonColor.SevereWarning => " bit-btg-isw",
BitButtonColor.Error => " bit-btg-ier",
BitColor.Info => " bit-btg-iin",
BitColor.Success => " bit-btg-isu",
BitColor.Warning => " bit-btg-iwa",
BitColor.SevereWarning => " bit-btg-isw",
BitColor.Error => " bit-btg-ier",
_ => string.Empty
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ namespace Bit.BlazorUI;

public partial class BitCompoundButton
{
private BitColor? color;
private BitButtonSize? size;
private BitButtonColor? color;
private BitButtonStyle buttonStyle = BitButtonStyle.Primary;
private BitButtonIconPosition? iconPosition = BitButtonIconPosition.Start;

Expand Down Expand Up @@ -67,7 +67,7 @@ public BitButtonStyle ButtonStyle
/// The color of button
/// </summary>
[Parameter]
public BitButtonColor? Color
public BitColor? Color
{
get => color;
set
Expand Down Expand Up @@ -173,11 +173,11 @@ protected override void RegisterCssClasses()

ClassBuilder.Register(() => Color switch
{
BitButtonColor.Info => "bit-cmb-inf",
BitButtonColor.Success => "bit-cmb-suc",
BitButtonColor.Warning => "bit-cmb-wrn",
BitButtonColor.SevereWarning => "bit-cmb-swr",
BitButtonColor.Error => "bit-cmb-err",
BitColor.Info => "bit-cmb-inf",
BitColor.Success => "bit-cmb-suc",
BitColor.Warning => "bit-cmb-wrn",
BitColor.SevereWarning => "bit-cmb-swr",
BitColor.Error => "bit-cmb-err",
_ => string.Empty
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public bool IsOpen
{
await InvokeAsync(() =>
{
_ = _js.ToggleModalScroll(ScrollerSelector, true);
_ = _js.ToggleOverflow(ScrollerSelector, true);

Result = null;

Expand Down Expand Up @@ -253,7 +253,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender)

if (AutoToggleScroll is false) return;

_offsetTop = await _js.ToggleModalScroll(ScrollerSelector, IsOpen);
_offsetTop = await _js.ToggleOverflow(ScrollerSelector, IsOpen);

if (AbsolutePosition is false) return;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@
cursor: pointer;
font-weight: 300;
user-select: none;
padding: spacing(2);
align-items: center;
font-size: spacing(2);
height: spacing(4.375);
justify-content: center;
min-height: spacing(4.5);
border-radius: spacing(0.5);
padding: spacing(0.5) spacing(2);
color: $color-foreground-primary;
background-color: $color-background-primary;
border: $shape-border-width $shape-border-style $color-border-primary;
Expand Down
Loading

0 comments on commit b8c7e83

Please sign in to comment.