Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

11.2.1 trial #484

Closed
wants to merge 36 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
474eb93
Merge pull request #453 from irihitech/11.2-beta
JusterZhu Oct 31, 2024
1ca4a5a
fix: fix breadcrumb insertion issue.
rabbitism Nov 1, 2024
6297258
feat: add more tests.
rabbitism Nov 1, 2024
571e1fe
Merge pull request #456 from irihitech/issue-455
rabbitism Nov 1, 2024
ee707cd
feat: add styleClass as an option to Dialogs.
rabbitism Nov 2, 2024
bad4c90
test: add failing test case for issue 460.
rabbitism Nov 3, 2024
0b0db32
UrsaWindow Only trigger OnClosing event once when click Close Button
dameng324 Nov 3, 2024
90a05c1
Merge pull request #463 from dameng324/issue-460
rabbitism Nov 3, 2024
9d39475
feat: 1. Update dependency.
rabbitism Nov 3, 2024
946571e
misc: revert dependency.
rabbitism Nov 3, 2024
b4cc0f8
Merge pull request #464 from irihitech/hotfix
rabbitism Nov 3, 2024
bd9c5b5
feat: apply this change to messagebox.
rabbitism Nov 3, 2024
0167310
feat: apply this change to drawer.
rabbitism Nov 3, 2024
74e190b
feat: add headless test.
rabbitism Nov 3, 2024
d58d9e9
Accessibility suppport for MultiComboItem
NeverMorewd Nov 5, 2024
462634e
Merge pull request #467 from NeverMorewd/main
rabbitism Nov 5, 2024
6ef0cf9
feat: support paste.
rabbitism Nov 6, 2024
186424b
fix: fix warnings in test related code.
rabbitism Nov 6, 2024
ff103b1
Merge pull request #469 from irihitech/pincode
rabbitism Nov 6, 2024
c57bf10
feat: support multiple classes, improve unit tests.
rabbitism Nov 6, 2024
2a638c8
feat: add test to github actions.
rabbitism Nov 6, 2024
cb0e2f4
test: add headless test for ubuntu.
rabbitism Nov 6, 2024
b066a7d
Merge pull request #465 from irihitech/issue-422
rabbitism Nov 11, 2024
b2e9105
feat: polish day button foreground when in range.
rabbitism Nov 11, 2024
59378c4
Merge pull request #476 from irihitech/issue-474
zdpcdt Nov 11, 2024
1151639
Add a new control AspectRatioLayout
WCKYWCKF Nov 12, 2024
9b3be2d
feat: add DialogFocusHint attached property.
rabbitism Nov 12, 2024
27a3e5f
feat: revert mask animation for dialog.
rabbitism Nov 12, 2024
05cc27e
feat: add headless tests.
rabbitism Nov 12, 2024
9835fe0
feat: add drawer and dialog headless test.
rabbitism Nov 12, 2024
60ba488
fix:Go to AspectRatioLayout demo and go to another and go back, the d…
WCKYWCKF Nov 12, 2024
a530a3e
Merge pull request #481 from irihitech/issue-479
rabbitism Nov 13, 2024
4bfaab3
Feature: Added a Range selection mode by aspect ratio value.
WCKYWCKF Nov 13, 2024
06ba9af
1.rename AspectRatioChangeAmbiguity to AspectRatioTolerance
WCKYWCKF Nov 13, 2024
8fe15b2
Merge pull request #480 from WCKYWCKF/new-control
rabbitism Nov 14, 2024
ab9168e
feat: 1. add bold font.
rabbitism Nov 15, 2024
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: 3 additions & 0 deletions .github/workflows/pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
- name: Nuget ReactiveUI Extension
run: dotnet pack ./src/Ursa.ReactiveUIExtension -o ./nugets

- name: Publish NuGet package
run: dotnet nuget push "./nugets/*.nupkg" --api-key ${{ secrets.NUGET_ORG_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate

- name: Upload a Build Artifact
uses: actions/[email protected]
with:
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Test

on:
push:
branches: [ "action/publish" ]
pull_request:
branches: [ "main" ]

jobs:
windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Ursa Headless Test
run: dotnet test ./tests/HeadlessTest.Ursa
ubuntu:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Ursa Headless Test
run: dotnet test ./tests/HeadlessTest.Ursa
2 changes: 1 addition & 1 deletion demo/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Nullable>enable</Nullable>
<AvaloniaVersion>11.2.0</AvaloniaVersion>
<AvaloniaVersion>11.2.1</AvaloniaVersion>
</PropertyGroup>
</Project>
Binary file not shown.
22 changes: 21 additions & 1 deletion demo/Ursa.Demo/App.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,29 @@
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:semi="https://irihi.tech/semi"
xmlns:u-semi="https://irihi.tech/ursa/themes/semi">
xmlns:u-semi="https://irihi.tech/ursa/themes/semi"
xmlns:u="https://irihi.tech/ursa"
xmlns:helpers="clr-namespace:Irihi.Avalonia.Shared.Helpers;assembly=Irihi.Avalonia.Shared">
<Application.Styles>
<semi:SemiTheme Locale="zh-CN" />
<u-semi:SemiTheme Locale="zh-CN" />
<!--This style is created to demonstrate Dialog StyleClass feature. This style is applied to Dialog Window-->
<Style Selector="u|DefaultDialogWindow.Custom">
<Style Selector="^ /template/ Button#PART_OKButton">
<Setter Property="Content" Value="CUSTOM"/>
<Setter Property="helpers:ClassHelper.Classes" Value="Warning"></Setter>
</Style>
</Style>
</Application.Styles>
<Application.Resources>
<FontWeight x:Key="ButtonDefaultFontWeight">700</FontWeight>
<FontWeight x:Key="CalendarItemCalendarButtonSelectedFontWeight">700</FontWeight>
<FontWeight x:Key="ExpanderHeaderFontWeight">700</FontWeight>
<FontWeight x:Key="ListBoxItemRadioGroupButtonFontWeight">700</FontWeight>
<FontWeight x:Key="ProgressBarTextFontWeight">700</FontWeight>
<FontWeight x:Key="RadioButtonButtonFontWeight">700</FontWeight>
<FontWeight x:Key="TabItemSelectedFontWeight">700</FontWeight>
<FontWeight x:Key="TextBlockTitleFontWeight">700</FontWeight>
<FontWeight x:Key="ToggleButtonDefaultFontWeight">700</FontWeight>
</Application.Resources>
</Application>
29 changes: 23 additions & 6 deletions demo/Ursa.Demo/Dialogs/CustomDemoDialog.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
<GradientStop Offset="0.9" Color="{DynamicResource SemiLightBlue1Color}" />
</LinearGradientBrush>
</UserControl.Background>
<Grid Margin="24" RowDefinitions="Auto, *, Auto" MinWidth="400">
<Grid
MinWidth="400"
Margin="24"
RowDefinitions="Auto, *, Auto">
<TextBlock
Grid.Row="0"
Margin="8"
Expand Down Expand Up @@ -45,7 +48,10 @@
Grid.Column="1"
Margin="32,8,0,8"
Label="Owner">
<TextBox u:FormItem.Label="Owner" Text="{Binding Owner}" />
<TextBox
u:FocusHelper.DialogFocusHint="True"
u:FormItem.Label="Owner"
Text="{Binding Owner}" />
</u:FormItem>
<u:FormItem
Grid.Row="1"
Expand All @@ -69,15 +75,26 @@
HorizontalAlignment="Right"
Orientation="Horizontal"
Spacing="8">
<Button Command="{Binding DialogCommand}" Content="Dialog" Theme="{DynamicResource SolidButton}" />
<Button Command="{Binding OKCommand}" Content="OK" Theme="{DynamicResource SolidButton}" Classes="Tertiary"/>
<Button Command="{Binding CancelCommand}" Content="Cancel" Theme="{DynamicResource SolidButton}" Classes="Tertiary"/>
<Button
Command="{Binding DialogCommand}"
Content="Dialog"
Theme="{DynamicResource SolidButton}" />
<Button
Classes="Tertiary"
Command="{Binding OKCommand}"
Content="OK"
Theme="{DynamicResource SolidButton}" />
<Button
Classes="Tertiary"
Command="{Binding CancelCommand}"
Content="Cancel"
Theme="{DynamicResource SolidButton}" />
<ComboBox>
<ComboBoxItem>A</ComboBoxItem>
<ComboBoxItem>B</ComboBoxItem>
<ComboBoxItem>C</ComboBoxItem>
</ComboBox>
</StackPanel>
</Grid>

</UserControl>
79 changes: 79 additions & 0 deletions demo/Ursa.Demo/Pages/AspectRatioLayoutDemo.axaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:u="https://irihi.tech/ursa"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Ursa.Demo.Pages.AspectRatioLayoutDemo">
<Grid
RowDefinitions="Auto,*">
<StackPanel
Grid.Row="0">
<u:NumericDoubleUpDown InnerLeftContent="AspectRatioTolerance"
Value="{Binding #AspectRatioLayout.AspectRatioTolerance}">
</u:NumericDoubleUpDown>
<TextBlock Text="{Binding #AspectRatioLayout.AspectRatioValue,StringFormat='AspectRatioValue: {0}'}"></TextBlock>
</StackPanel>

<u:AspectRatioLayout Name="AspectRatioLayout" Grid.Row="1"
BorderThickness="1"
BorderBrush="Red"
Margin="2"
CornerRadius="10">
<u:AspectRatioLayoutItem AcceptAspectRatioMode="HorizontalRectangle">
<Button>HorizontalRectangle ControlLayout</Button>
</u:AspectRatioLayoutItem>
<u:AspectRatioLayoutItem AcceptAspectRatioMode="VerticalRectangle">
<Button>VerticalRectangle ControlLayout</Button>
</u:AspectRatioLayoutItem>
<u:AspectRatioLayoutItem AcceptAspectRatioMode="Square">
<Button>Square ControlLayout</Button>
</u:AspectRatioLayoutItem>
<u:AspectRatioLayoutItem StartAspectRatioValue="2" EndAspectRatioValue="2.2">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center">
<Run Text="{Binding $parent[u:AspectRatioLayoutItem].StartAspectRatioValue,StringFormat='StartAspectRatioValue {0}'}"></Run>
<LineBreak></LineBreak>
<Run Text="{Binding $parent[u:AspectRatioLayoutItem].EndAspectRatioValue,StringFormat='EndAspectRatioValue {0}'}"></Run>
</TextBlock>
</u:AspectRatioLayoutItem>
<u:AspectRatioLayoutItem StartAspectRatioValue="2" EndAspectRatioValue="2.4">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center">
<Run Text="{Binding $parent[u:AspectRatioLayoutItem].StartAspectRatioValue,StringFormat='StartAspectRatioValue {0}'}"></Run>
<LineBreak></LineBreak>
<Run Text="{Binding $parent[u:AspectRatioLayoutItem].EndAspectRatioValue,StringFormat='EndAspectRatioValue {0}'}"></Run>
</TextBlock>
</u:AspectRatioLayoutItem>
<u:AspectRatioLayoutItem StartAspectRatioValue="2" EndAspectRatioValue="2.6">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center">
<Run Text="{Binding $parent[u:AspectRatioLayoutItem].StartAspectRatioValue,StringFormat='StartAspectRatioValue {0}'}"></Run>
<LineBreak></LineBreak>
<Run Text="{Binding $parent[u:AspectRatioLayoutItem].EndAspectRatioValue,StringFormat='EndAspectRatioValue {0}'}"></Run>
</TextBlock>
</u:AspectRatioLayoutItem>
<u:AspectRatioLayoutItem StartAspectRatioValue="2" EndAspectRatioValue="2.8">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center">
<Run Text="{Binding $parent[u:AspectRatioLayoutItem].StartAspectRatioValue,StringFormat='StartAspectRatioValue {0}'}"></Run>
<LineBreak></LineBreak>
<Run Text="{Binding $parent[u:AspectRatioLayoutItem].EndAspectRatioValue,StringFormat='EndAspectRatioValue {0}'}"></Run>
</TextBlock>
</u:AspectRatioLayoutItem>
<u:AspectRatioLayoutItem StartAspectRatioValue="1.3" EndAspectRatioValue="1.5">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center">
<Run Text="{Binding $parent[u:AspectRatioLayoutItem].StartAspectRatioValue,StringFormat='StartAspectRatioValue {0}'}"></Run>
<LineBreak></LineBreak>
<Run Text="{Binding $parent[u:AspectRatioLayoutItem].EndAspectRatioValue,StringFormat='EndAspectRatioValue {0}'}"></Run>
</TextBlock>
</u:AspectRatioLayoutItem>
</u:AspectRatioLayout>
</Grid>
</UserControl>
13 changes: 13 additions & 0 deletions demo/Ursa.Demo/Pages/AspectRatioLayoutDemo.axaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;

namespace Ursa.Demo.Pages;

public partial class AspectRatioLayoutDemo : UserControl
{
public AspectRatioLayoutDemo()
{
InitializeComponent();
}
}
30 changes: 30 additions & 0 deletions demo/Ursa.Demo/Pages/DialogDemo.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,21 @@
IsThreeState="True" />
<CheckBox u:FormItem.Label="CanDragMove" IsChecked="{Binding CanDragMove}" />
<CheckBox u:FormItem.Label="CanResize" IsChecked="{Binding CanResize}" />
<u:FormItem>
<u:FormItem.Label>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Style Class" />
<PathIcon
Width="12"
Height="12"
VerticalAlignment="Center"
TextElement.FontWeight="Normal"
Data="{DynamicResource DialogQuestionIconGlyph}"
ToolTip.Tip="Pass a Style Class to the created Dialog. In this example, if you set StyleClass as 'Custom', You will get Special Style for OK Button. These styles usually are defined in the root of your App/Window" />
</StackPanel>
</u:FormItem.Label>
<TextBox HorizontalAlignment="Stretch" Text="{Binding StyleClass}" />
</u:FormItem>
<Button
HorizontalAlignment="Left"
u:FormItem.NoLabel="True"
Expand Down Expand Up @@ -128,6 +143,21 @@
IsChecked="{Binding IsLocal}"
OffContent="Global"
OnContent="Local" />
<u:FormItem>
<u:FormItem.Label>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Style Class" />
<PathIcon
Width="12"
Height="12"
VerticalAlignment="Center"
TextElement.FontWeight="Normal"
Data="{DynamicResource DialogQuestionIconGlyph}"
ToolTip.Tip="Pass a Style Class to the created Dialog. In this example, if you set StyleClass as 'Custom', You will get Special Style for OK Button. These styles usually are defined in the root of your App/Window" />
</StackPanel>
</u:FormItem.Label>
<TextBox HorizontalAlignment="Stretch" Text="{Binding StyleClass}" />
</u:FormItem>
<Button
HorizontalAlignment="Left"
u:FormItem.NoLabel="True"
Expand Down
5 changes: 5 additions & 0 deletions demo/Ursa.Demo/ViewModels/AspectRatioLayoutDemoViewModel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace Ursa.Demo.ViewModels;

public class AspectRatioLayoutDemoViewModel : ViewModelBase
{
}
4 changes: 4 additions & 0 deletions demo/Ursa.Demo/ViewModels/DialogDemoViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public partial class DefaultWindowDialogDemoViewModel: ObservableObject
[ObservableProperty] private bool? _isCloseButtonVisible;
[ObservableProperty] private bool _canDragMove;
[ObservableProperty] private bool _canResize;
[ObservableProperty] private string? _styleClass;

public ICommand ShowDialogCommand { get; }

Expand All @@ -57,6 +58,7 @@ private async Task ShowDialog()
StartupLocation = Location,
CanDragMove = CanDragMove,
CanResize = CanResize,
StyleClass = StyleClass,
};
if (X.HasValue && Y.HasValue)
{
Expand Down Expand Up @@ -133,6 +135,7 @@ public partial class DefaultOverlayDialogDemoViewModel : ObservableObject
[ObservableProperty] private bool _isModal;
[ObservableProperty] private bool _isLocal;
[ObservableProperty] private bool _canResize;
[ObservableProperty] private string? _styleClass;

public ICommand ShowDialogCommand { get; }

Expand Down Expand Up @@ -163,6 +166,7 @@ private async Task ShowDialog()
CanDragMove = CanDragMove,
IsCloseButtonVisible = IsCloseButtonVisible,
CanResize = CanResize,
StyleClass = StyleClass,
};
string? dialogHostId = IsLocal ? DialogDemoViewModel.LocalHost : null;
if (IsModal)
Expand Down
1 change: 1 addition & 0 deletions demo/Ursa.Demo/ViewModels/MainViewViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ private void OnNavigation(MainViewViewModel vm, string s)
MenuKeys.MenuKeyToolBar => new ToolBarDemoViewModel(),
MenuKeys.MenuKeyTreeComboBox => new TreeComboBoxDemoViewModel(),
MenuKeys.MenuKeyTwoTonePathIcon => new TwoTonePathIconDemoViewModel(),
MenuKeys.AspectRatioLayout => new AspectRatioLayoutDemoViewModel(),
_ => throw new ArgumentOutOfRangeException(nameof(s), s, null)
};
}
Expand Down
2 changes: 2 additions & 0 deletions demo/Ursa.Demo/ViewModels/MenuViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public MenuViewModel()
new() { MenuHeader = "ToolBar", Key = MenuKeys.MenuKeyToolBar },
new() { MenuHeader = "TreeComboBox", Key = MenuKeys.MenuKeyTreeComboBox },
new() { MenuHeader = "TwoTonePathIcon", Key = MenuKeys.MenuKeyTwoTonePathIcon },
new() { MenuHeader = "AspectRatioLayout", Key = MenuKeys.AspectRatioLayout ,Status = "WIP"},
};
}
}
Expand Down Expand Up @@ -111,4 +112,5 @@ public static class MenuKeys
public const string MenuKeyToolBar = "ToolBar";
public const string MenuKeyTreeComboBox = "TreeComboBox";
public const string MenuKeyTwoTonePathIcon = "TwoTonePathIcon";
public const string AspectRatioLayout = "AspectRatioLayout";
}
18 changes: 14 additions & 4 deletions demo/Ursa.Demo/Views/MainWindow.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,31 @@
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:helpers="clr-namespace:Irihi.Avalonia.Shared.Helpers;assembly=Irihi.Avalonia.Shared"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:views="clr-namespace:Ursa.Demo.Views"
xmlns:u="https://irihi.tech/ursa"
xmlns:viewModels="clr-namespace:Ursa.Demo.ViewModels"
xmlns:views="clr-namespace:Ursa.Demo.Views"
Title="Ursa.Demo"
d:DesignHeight="450"
d:DesignWidth="800"
x:CompileBindings="True"
IsFullScreenButtonVisible="{OnPlatform True, macOS=False}"
IsManagedResizerVisible="{OnPlatform False, Linux=True}"
x:DataType="viewModels:MainWindowViewModel"
Icon="/Assets/Ursa.ico"
IsFullScreenButtonVisible="{OnPlatform True, macOS=False}"
IsManagedResizerVisible="{OnPlatform False, Linux=True}"
mc:Ignorable="d">
<u:UrsaWindow.RightContent>
<views:TitleBarRightContent/>
<views:TitleBarRightContent />
</u:UrsaWindow.RightContent>
<u:UrsaWindow.Styles>
<!--This style is created to demonstrate Dialog StyleClass feature. This style is applied to dialogs in MainWindow OverlayDialogHost -->
<Style Selector="u|DefaultDialogControl.Custom">
<Style Selector="^ /template/ Button#PART_OKButton">
<Setter Property="Content" Value="CUSTOM" />
<Setter Property="helpers:ClassHelper.Classes" Value="Warning" />
</Style>
</Style>
</u:UrsaWindow.Styles>
<views:MainView />
</u:UrsaWindow>
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"sdk": {
"version": "8.0.0",
"rollForward": "latestMajor",
"allowPrerelease": false
"allowPrerelease": true
}
}
4 changes: 2 additions & 2 deletions src/Package.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<Version>1.5.0</Version>
<AvaloniaVersion>11.1.4</AvaloniaVersion>
<Version>1.5.0.1</Version>
<AvaloniaVersion>11.1.1</AvaloniaVersion>
<Authors>IRIHI Technology Co., Ltd.</Authors>
<RepositoryUrl>https://github.com/irihitech/Ursa.Avalonia</RepositoryUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
Loading
Loading