Skip to content

Commit

Permalink
Merge pull request #282 from AuroraZiling/main
Browse files Browse the repository at this point in the history
Docs Update
  • Loading branch information
kikipoulet authored Aug 27, 2024
2 parents e482f51 + 51fc325 commit 5a4ab52
Show file tree
Hide file tree
Showing 15 changed files with 161 additions and 7 deletions.
2 changes: 1 addition & 1 deletion SukiUI.Demo/Features/ControlsLibrary/InfoBarView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<suki:GroupBox Header="InfoBar">
<StackPanel Classes="HeaderContent" Spacing="15">
<TextBlock>
InfoBar is a control that displays a message to the user. It can be used to show specific severity message to the user.
InfoBar is a control that displays a message and can be used to show specific severity message to the user.
</TextBlock>
<StackPanel Orientation="Horizontal">
<TextBlock Margin="0,0,0,0"
Expand Down
2 changes: 1 addition & 1 deletion docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ cache
temp
dist
pnpm-lock.yaml
helper
tools
31 changes: 31 additions & 0 deletions docs/docs/documentation/controls/data/expander.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Expander

`Expander` is a content area which can be collapsed and expanded. It has styles for all `ExpandDirections`, using custom animation behaviour and controls internally to correctly animate showing/hiding any size content.

## Show

<img src="/controls/data/expander.gif" />

## Example

```xml
<Expander ExpandDirection="Down" Header="Down Expander">
<TextBlock>Some Down Content</TextBlock>
</Expander>

<Expander ExpandDirection="Up" Header="Up Expander">
<TextBlock>Some Up Content</TextBlock>
</Expander>

<Expander ExpandDirection="Right" Header="Right Expander">
<TextBlock>Some Right Content</TextBlock>
</Expander>

<Expander ExpandDirection="Left" Header="Left Expander">
<TextBlock>Some Left Content</TextBlock>
</Expander>
```

## See Also

[Demo: SukiUI.Demo/Features/ControlsLibrary/ExpanderView.axaml](https://github.com/kikipoulet/SukiUI/blob/main/SukiUI.Demo/Features/ControlsLibrary/ExpanderView.axaml)
1 change: 0 additions & 1 deletion docs/docs/documentation/controls/navigation/sidemenu.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,4 @@

[Demo: SukiUI.Demo/SukiUIDemoView.axaml](https://github.com/kikipoulet/SukiUI/blob/main/SukiUI.Demo/SukiUIDemoView.axaml)


[API: Controls/SukiSideMenu.axaml.cs](https://github.com/kikipoulet/SukiUI/blob/main/SukiUI/Controls/SukiSideMenu.axaml.cs)
31 changes: 31 additions & 0 deletions docs/docs/documentation/controls/notification/infobar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# InfoBar

`InfoBar` is a control that displays a message and can be used to show specific severity message to the user.

## Show

<img src="/controls/notification/infobar.gif" width="300px" />

## Example

```xml
<suki:InfoBar
Title="Info"
IsOpaque="{Binding IsOpaque}"
IsClosable="{Binding IsClosable}"
IsOpen="{Binding IsOpen, Mode=TwoWay}"
Severity="Warning"
Message="Hello World!" />
```

`Severity` property allows:
- Information
- Success
- Warning
- Error

## See Also

[Demo: SukiUI.Demo/Features/ControlsLibrary/InfoBarView.axaml](https://github.com/kikipoulet/SukiUI/blob/main/SukiUI.Demo/Features/ControlsLibrary/InfoBarView.axaml)

[API: Controls/InfoBar.axaml.cs](https://github.com/kikipoulet/SukiUI/blob/main/SukiUI/Controls/InfoBar.axaml.cs)
6 changes: 5 additions & 1 deletion docs/docs/documentation/getting-started/installation.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Installation

::: info
When this page was written, the latest Avalonia version was `11.1.0-beta2` with SukiUI version `6.0.0-beta6`
When this page was written, the latest Avalonia version was `11.2.0-beta1` with SukiUI version `6.0.0-beta8`
:::

SukiUI can be installed in two ways:
Expand Down Expand Up @@ -48,8 +48,12 @@ Visit [SukiUI on Nuget](https://www.nuget.org/packages/SukiUI) for more informat

5. Select `SukiUI.dll` you downloaded

6. Add a Nuget package `System.Reactive`

::: tip
The package list should be:

![](/getting-started/introduction-final-package-list.webp "package list")

If installed by referencing `.dll`, there should be a `System.Reactive` here.
:::
14 changes: 13 additions & 1 deletion docs/docs/documentation/getting-started/launch.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,16 @@ public partial class MainWindow : SukiWindow // [!code highlight]

## Done

You're now ready to use SukiUI !
You're now ready to use SukiUI !

::: warning
If you encounter the following exception:
- `SukiWindow` not found [Issue#265](https://github.com/kikipoulet/SukiUI/issues/265)
- System.MissingMethodException: Method not found: System.Collections.Generic.IReadOnlyList`1<System.Object> Avalonia.Markup.Xaml.XamlIl.Runtime.IAvaloniaXamlIlEagerParentStackProvider.get_DirectParents() [Issue#276](https://github.com/kikipoulet/SukiUI/issues/276)
- Unable to resolve type `SukiTheme` from namespace clr-namespace:SukiUI;assembly=SukiUI [Discussion#276](https://github.com/kikipoulet/SukiUI/discussions/278)
- and other similar exceptions

There are two possible solutions to try:
- Upgrade or downgrade the version of `Avalonia` and `SukiUI` until the exception is resolved
- While ensuring that `Avalonia` is up to date (beta), reference the build `.dll` from [Github Action](https://github.com/kikipoulet/SukiUI/actions/workflows/build.yml) and proceed with the [following steps](/documentation/getting-started/installation#via-github-action)
:::
Binary file added docs/docs/public/controls/data/expander.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
31 changes: 31 additions & 0 deletions docs/docs/zh/documentation/controls/data/expander.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Expander

`Expander` 是一个可以折叠/展开的内容容器,支持四种方向(上下左右)。

## 展示

<img src="/controls/data/expander.gif" />

## 示例

```xml
<Expander ExpandDirection="Down" Header="Down Expander">
<TextBlock>Some Down Content</TextBlock>
</Expander>

<Expander ExpandDirection="Up" Header="Up Expander">
<TextBlock>Some Up Content</TextBlock>
</Expander>

<Expander ExpandDirection="Right" Header="Right Expander">
<TextBlock>Some Right Content</TextBlock>
</Expander>

<Expander ExpandDirection="Left" Header="Left Expander">
<TextBlock>Some Left Content</TextBlock>
</Expander>
```

## 参阅

[Demo: SukiUI.Demo/Features/ControlsLibrary/ExpanderView.axaml](https://github.com/kikipoulet/SukiUI/blob/main/SukiUI.Demo/Features/ControlsLibrary/ExpanderView.axaml)
31 changes: 31 additions & 0 deletions docs/docs/zh/documentation/controls/notification/infobar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# InfoBar

`InfoBar` 是一个提醒控件,用于向用户传达特定严重程度的信息

## 展示

<img src="/controls/notification/infobar.gif" width="300px" />

## 示例

```xml
<suki:InfoBar
Title="Info"
IsOpaque="{Binding IsOpaque}"
IsClosable="{Binding IsClosable}"
IsOpen="{Binding IsOpen, Mode=TwoWay}"
Severity="Warning"
Message="Hello World!" />
```

`Severity` 的值:
- Information
- Success
- Warning
- Error

## 参阅

[Demo: SukiUI.Demo/Features/ControlsLibrary/InfoBarView.axaml](https://github.com/kikipoulet/SukiUI/blob/main/SukiUI.Demo/Features/ControlsLibrary/InfoBarView.axaml)

[API: Controls/InfoBar.axaml.cs](https://github.com/kikipoulet/SukiUI/blob/main/SukiUI/Controls/InfoBar.axaml.cs)
6 changes: 5 additions & 1 deletion docs/docs/zh/documentation/getting-started/installation.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 安装

::: info
写完本篇时,Avalonia 的版本是 `11.1.0-beta2` ,SukiUI 的版本是 `6.0.0-beta6`
写完本篇时,Avalonia 的版本是 `11.2.0-beta1` ,SukiUI 的版本是 `6.0.0-beta8`
:::

SukiUI 可以通过以下两种方式安装:
Expand Down Expand Up @@ -48,8 +48,12 @@ dotnet add package SukiUI --version 6.0.0

5. 选择刚刚下载的 `SukiUI.dll` 并添加

6. 添加 Nuget 包 `System.Reactive`

::: tip
最终,你的包列表应为:

![](/getting-started/introduction-final-package-list.webp "package list")

如果你是以引用`dll`的方式安装的,此处应有 `System.Reactive`
:::
13 changes: 12 additions & 1 deletion docs/docs/zh/documentation/getting-started/launch.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,15 @@ public partial class MainWindow : SukiWindow // [!code highlight]

## 完成

至此,SukiUI 安装完成
至此,SukiUI 安装完成

::: warning
如果你遇到了包括但不限于以下异常:
- `SukiWindow` not found [Issue#265](https://github.com/kikipoulet/SukiUI/issues/265)
- System.MissingMethodException: Method not found: System.Collections.Generic.IReadOnlyList`1<System.Object> Avalonia.Markup.Xaml.XamlIl.Runtime.IAvaloniaXamlIlEagerParentStackProvider.get_DirectParents() [Issue#276](https://github.com/kikipoulet/SukiUI/issues/276)
- Unable to resolve type `SukiTheme` from namespace clr-namespace:SukiUI;assembly=SukiUI [Discussion#276](https://github.com/kikipoulet/SukiUI/discussions/278)

有两种可能的解决方案:
- 调整 `Avalonia``SukiUI` 的版本直到异常消失
- 在保证 `Avalonia` 是最新版本(包括 beta)的情况下,引用来自 [Github Action](https://github.com/kikipoulet/SukiUI/actions/workflows/build.yml)`.dll` 构建,然后执行[以下步骤](/zh/documentation/getting-started/installation#通过-github-action-安装)
:::

0 comments on commit 5a4ab52

Please sign in to comment.