Skip to content

Commit b30fe71

Browse files
committed
ux: add a tooltip for top authors
Signed-off-by: leo <longshuang@msn.cn>
1 parent dbf2837 commit b30fe71

3 files changed

Lines changed: 15 additions & 7 deletions

File tree

‎src/Resources/Locales/en_US.axaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -958,6 +958,7 @@
958958
<x:String x:Key="Text.Statistics.TopAuthors" xml:space="preserve">TOP AUTHORS</x:String>
959959
<x:String x:Key="Text.Statistics.TopAuthors.Count" xml:space="preserve">COMMITS</x:String>
960960
<x:String x:Key="Text.Statistics.TopAuthors.Percentage" xml:space="preserve">PERCENTAGE</x:String>
961+
<x:String x:Key="Text.Statistics.TopAuthors.Tip" xml:space="preserve">Authors with less than 1% commits will be grouped under Others.</x:String>
961962
<x:String x:Key="Text.Statistics.TotalAuthors" xml:space="preserve">AUTHORS: </x:String>
962963
<x:String x:Key="Text.Statistics.TotalCommits" xml:space="preserve">COMMITS: </x:String>
963964
<x:String x:Key="Text.Submodule" xml:space="preserve">SUBMODULES</x:String>

‎src/Resources/Locales/zh_CN.axaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -962,6 +962,7 @@
962962
<x:String x:Key="Text.Statistics.TopAuthors" xml:space="preserve">主要贡献者</x:String>
963963
<x:String x:Key="Text.Statistics.TopAuthors.Count" xml:space="preserve">提交数量</x:String>
964964
<x:String x:Key="Text.Statistics.TopAuthors.Percentage" xml:space="preserve">百分比</x:String>
965+
<x:String x:Key="Text.Statistics.TopAuthors.Tip" xml:space="preserve">提交占比小于1%的作者会被统计入Others分组</x:String>
965966
<x:String x:Key="Text.Statistics.TotalAuthors" xml:space="preserve">贡献者人数: </x:String>
966967
<x:String x:Key="Text.Statistics.TotalCommits" xml:space="preserve">提交次数: </x:String>
967968
<x:String x:Key="Text.Submodule" xml:space="preserve">子模块</x:String>

‎src/Views/Statistics.axaml‎

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,19 @@
211211

212212
<!-- Right -->
213213
<Grid Grid.Column="1" RowDefinitions="32,*,32,*">
214-
<TextBlock Grid.Row="0"
215-
Margin="16,0,0,0"
216-
Text="{DynamicResource Text.Statistics.TopAuthors}"
217-
FontSize="14"
218-
FontWeight="Bold"
219-
Foreground="{DynamicResource Brush.FG2}"/>
220-
214+
<StackPanel Grid.Row="0" Margin="16,0,0,0" Orientation="Horizontal">
215+
<TextBlock Text="{DynamicResource Text.Statistics.TopAuthors}"
216+
FontSize="14"
217+
FontWeight="Bold"
218+
Foreground="{DynamicResource Brush.FG2}"/>
219+
<Border Background="Transparent"
220+
Width="24" Height="24"
221+
Margin="4,2,0,0"
222+
ToolTip.Tip="{DynamicResource Text.Statistics.TopAuthors.Tip}">
223+
<Path Width="14" Height="14" Data="{DynamicResource Icons.Info}"/>
224+
</Border>
225+
</StackPanel>
226+
221227
<v:PieChart Grid.Row="1"
222228
x:Name="Pie"
223229
Margin="8,0"

0 commit comments

Comments
 (0)