From 0ad214f1e00a82649587002adadfe4cc1cb56ab8 Mon Sep 17 00:00:00 2001 From: Alexandru Iuga Date: Fri, 9 Feb 2024 19:20:34 +0200 Subject: [PATCH] #178 - displayed the sprint members as icons --- doc/changelog.txt | 5 + doc/readme.txt | 2 +- release/VeloCity.proj | 2 +- sources/Directory.build.props | 2 +- .../ChartBar.cs | 20 +++ .../SprintMemberBox.cs | 94 ++++++++++++ ...ity.Wpf.Presentation.CustomControls.csproj | 1 + .../CustomControls/ChartBarStyles.xaml | 95 +++++++++--- .../CustomControls/SprintMemberBoxStyles.xaml | 106 +++++++++++++ .../Icons/TeamMemberIconStyles.xaml | 12 +- .../StandardControls/ButtonStyles.xaml | 1 + .../Buttons/PaleButtonStyles.xaml | 91 ++++++++++++ .../VeloCity.Wpf.Presentation.Styles.csproj | 1 + .../SprintMembers/SprintMemberViewModel.cs | 4 - .../SprintMembers/SprintMembersView.xaml | 140 +++++------------- .../SprintsArea/Sprints/SprintsPage.xaml | 4 +- 16 files changed, 447 insertions(+), 133 deletions(-) create mode 100644 sources/VeloCity.Wpf.Presentation.CustomControls/SprintMemberBox.cs create mode 100644 sources/VeloCity.Wpf.Presentation.Styles/CustomControls/SprintMemberBoxStyles.xaml create mode 100644 sources/VeloCity.Wpf.Presentation.Styles/StandardControls/Buttons/PaleButtonStyles.xaml diff --git a/doc/changelog.txt b/doc/changelog.txt index 1f8fd781..e44226ed 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -1,6 +1,11 @@ Velo City ==================================================================================================== +v1.18.0 +---------------------------------------------------------------------------------------------------- +- [feature] Display sprint memers as icons in the "Sprint Members" tab. + + v1.17.0 ---------------------------------------------------------------------------------------------------- - [feature] [wpf] Reduces the size of the navigator buttons and some spaces. diff --git a/doc/readme.txt b/doc/readme.txt index c8431b05..60335019 100644 --- a/doc/readme.txt +++ b/doc/readme.txt @@ -1,4 +1,4 @@ -VeloCity 1.17.0 +VeloCity 1.18.0 ==================================================================================================== This is a tool that calculates the velocity of a scrum team and helps planning the sprints. diff --git a/release/VeloCity.proj b/release/VeloCity.proj index bf15e91b..dc90b846 100644 --- a/release/VeloCity.proj +++ b/release/VeloCity.proj @@ -5,7 +5,7 @@ output\ temp\ - 1.17.0 + 1.18.0 VeloCity-$(Version).zip ..\ diff --git a/sources/Directory.build.props b/sources/Directory.build.props index 9b03b522..e7533429 100644 --- a/sources/Directory.build.props +++ b/sources/Directory.build.props @@ -19,7 +19,7 @@ along with this program. If not, see . - 1.17.0.0 + 1.18.0.0 VeloCity Dust in the Wind Copyright © Dust in the Wind 2022-2023 diff --git a/sources/VeloCity.Wpf.Presentation.CustomControls/ChartBar.cs b/sources/VeloCity.Wpf.Presentation.CustomControls/ChartBar.cs index 7547b8e8..6f54207b 100644 --- a/sources/VeloCity.Wpf.Presentation.CustomControls/ChartBar.cs +++ b/sources/VeloCity.Wpf.Presentation.CustomControls/ChartBar.cs @@ -22,6 +22,8 @@ namespace DustInTheWind.VeloCity.Wpf.Presentation.CustomControls; public class ChartBar : Control { + #region Value + public static readonly DependencyProperty ValueProperty = DependencyProperty.Register( nameof(Value), typeof(IChartBarValue), @@ -34,6 +36,24 @@ public IChartBarValue Value set => SetValue(ValueProperty, value); } + #endregion + + #region Orientation + + public static readonly DependencyProperty OrientationProperty = DependencyProperty.Register( + nameof(Orientation), + typeof(Orientation), + typeof(ChartBar) + ); + + public Orientation Orientation + { + get => (Orientation)GetValue(OrientationProperty); + set => SetValue(OrientationProperty, value); + } + + #endregion + static ChartBar() { DefaultStyleKeyProperty.OverrideMetadata(typeof(ChartBar), new FrameworkPropertyMetadata(typeof(ChartBar))); diff --git a/sources/VeloCity.Wpf.Presentation.CustomControls/SprintMemberBox.cs b/sources/VeloCity.Wpf.Presentation.CustomControls/SprintMemberBox.cs new file mode 100644 index 00000000..fff50cc7 --- /dev/null +++ b/sources/VeloCity.Wpf.Presentation.CustomControls/SprintMemberBox.cs @@ -0,0 +1,94 @@ +// VeloCity +// Copyright (C) 2022-2023 Dust in the Wind +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using System.Windows; +using System.Windows.Controls; +using DustInTheWind.VeloCity.ChartTools; +using DustInTheWind.VeloCity.Domain; + +namespace DustInTheWind.VeloCity.Wpf.Presentation.CustomControls; + +public class SprintMemberBox : Control +{ + #region MemberName + + public static readonly DependencyProperty MemberNameProperty = DependencyProperty.Register( + nameof(MemberName), + typeof(string), + typeof(SprintMemberBox) + ); + + public string MemberName + { + get => (string)GetValue(MemberNameProperty); + set => SetValue(MemberNameProperty, value); + } + + #endregion + + #region ChartBarValue + + public static readonly DependencyProperty ChartBarValueProperty = DependencyProperty.Register( + nameof(ChartBarValue), + typeof(IChartBarValue), + typeof(SprintMemberBox) + ); + + public IChartBarValue ChartBarValue + { + get => (IChartBarValue)GetValue(ChartBarValueProperty); + set => SetValue(ChartBarValueProperty, value); + } + + #endregion + + #region WorkHours + + public static readonly DependencyProperty WorkHoursProperty = DependencyProperty.Register( + nameof(WorkHours), + typeof(HoursValue), + typeof(SprintMemberBox) + ); + + public HoursValue WorkHours + { + get => (HoursValue)GetValue(WorkHoursProperty); + set => SetValue(WorkHoursProperty, value); + } + + #endregion + + #region AbsenceHours + + public static readonly DependencyProperty AbsenceHoursProperty = DependencyProperty.Register( + nameof(AbsenceHours), + typeof(HoursValue), + typeof(SprintMemberBox) + ); + + public HoursValue AbsenceHours + { + get => (HoursValue)GetValue(AbsenceHoursProperty); + set => SetValue(AbsenceHoursProperty, value); + } + + #endregion + + static SprintMemberBox() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(SprintMemberBox), new FrameworkPropertyMetadata(typeof(SprintMemberBox))); + } +} \ No newline at end of file diff --git a/sources/VeloCity.Wpf.Presentation.CustomControls/VeloCity.Wpf.Presentation.CustomControls.csproj b/sources/VeloCity.Wpf.Presentation.CustomControls/VeloCity.Wpf.Presentation.CustomControls.csproj index 470d3f77..a7521938 100644 --- a/sources/VeloCity.Wpf.Presentation.CustomControls/VeloCity.Wpf.Presentation.CustomControls.csproj +++ b/sources/VeloCity.Wpf.Presentation.CustomControls/VeloCity.Wpf.Presentation.CustomControls.csproj @@ -28,6 +28,7 @@ along with this program. If not, see . + \ No newline at end of file diff --git a/sources/VeloCity.Wpf.Presentation.Styles/CustomControls/ChartBarStyles.xaml b/sources/VeloCity.Wpf.Presentation.Styles/CustomControls/ChartBarStyles.xaml index c6fa2d50..22951732 100644 --- a/sources/VeloCity.Wpf.Presentation.Styles/CustomControls/ChartBarStyles.xaml +++ b/sources/VeloCity.Wpf.Presentation.Styles/CustomControls/ChartBarStyles.xaml @@ -31,39 +31,98 @@ along with this program. If not, see . \ No newline at end of file diff --git a/sources/VeloCity.Wpf.Presentation.Styles/CustomControls/SprintMemberBoxStyles.xaml b/sources/VeloCity.Wpf.Presentation.Styles/CustomControls/SprintMemberBoxStyles.xaml new file mode 100644 index 00000000..5d3c21a6 --- /dev/null +++ b/sources/VeloCity.Wpf.Presentation.Styles/CustomControls/SprintMemberBoxStyles.xaml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sources/VeloCity.Wpf.Presentation.Styles/Icons/TeamMemberIconStyles.xaml b/sources/VeloCity.Wpf.Presentation.Styles/Icons/TeamMemberIconStyles.xaml index 33efcfff..fd66dae3 100644 --- a/sources/VeloCity.Wpf.Presentation.Styles/Icons/TeamMemberIconStyles.xaml +++ b/sources/VeloCity.Wpf.Presentation.Styles/Icons/TeamMemberIconStyles.xaml @@ -27,7 +27,17 @@ along with this program. If not, see . - m 259.03074,0.03050633 c -5.14391,-0.122793 -10.34165,0.124104 -15.55112,0.758935 C 217.00912,4.0153413 195.37241,14.74014 176.24198,33.996346 c -15.31977,15.42047 -24.91982,32.1379 -30.03859,52.56962 -14.6171,58.344914 20.96162,119.163864 79.16338,135.849294 3.48379,0.99875 7.26916,1.58795 11.32759,2.06239 -4.6621,0.33588 -9.18853,0.74894 -13.07117,1.42759 -89.5934,15.65977 -156.897445,87.15627 -166.652425,177.17877 -1.277,11.78434 -2.86955,17.73811 -0.65456,26.47807 1.1075,4.36998 3.87227,8.67728 6.46083,11.35016 2.58854,2.67289 4.88238,4.34508 7.49623,6.43543 41.579705,33.2522 93.302585,54.95598 148.364665,62.48091 30.7777,4.20621 70.19812,2.18468 103.51415,-5.05016 40.88685,-8.87885 86.01775,-30.68057 119.82703,-57.71852 a 14.446593,14.446593 0 0 0 0.003,0 l 9.3837,-7.5047 a 14.446593,14.446593 0 0 0 5.38872,-12.26992 l -0.93385,-13.58746 c -3.00874,-43.78494 -17.03827,-80.84199 -43.59219,-114.9264 -29.5371,-37.91363 -74.61578,-64.24191 -123.95743,-72.86618 -4.21955,-0.73753 -9.0842,-1.2152 -14.20533,-1.55173 10.91329,-1.34843 20.30976,-4.03963 30.66773,-9.00001 47.80718,-22.89569 73.80909,-77.65938 60.9461,-128.798814 C 353.09421,36.519666 308.73449,1.2165943 259.03074,0.03050633 Z + m 203.81874,0.03050633 + c -5.14391,-0.122793 -10.34165,0.124104 -15.55112,0.758935 + C 161.79712,4.0153413 140.16041,14.74014 121.02998,33.996346 + c -15.31977,15.42047 -24.91982,32.1379 -30.03859,52.56962 -14.6171,58.344914 20.96162,119.163864 79.16338,135.849294 3.48379,0.99875 7.26916,1.58795 11.32759,2.06239 -4.6621,0.33588 -9.18853,0.74894 -13.07117,1.42759 -89.5934,15.65977 -156.897445,87.15627 -166.6524252,177.17877 -1.27700003,11.78434 -2.86955,17.73811 -0.65456,26.47807 1.1075,4.36998 3.87227,8.67728 6.46083,11.35016 2.5885402,2.67289 4.8823802,4.34508 7.4962302,6.43543 41.579705,33.2522 93.302585,54.95598 148.364665,62.48091 30.7777,4.20621 70.19812,2.18468 103.51415,-5.05016 40.88685,-8.87885 86.01775,-30.68057 119.82703,-57.71852 + a 14.446593,14.446593 0 0 0 0.003,0 + l 9.3837,-7.5047 + a 14.446593,14.446593 0 0 0 5.38872,-12.26992 + l -0.93385,-13.58746 + c -3.00874,-43.78494 -17.03827,-80.84199 -43.59219,-114.9264 -29.5371,-37.91363 -74.61578,-64.24191 -123.95743,-72.86618 -4.21955,-0.73753 -9.0842,-1.2152 -14.20533,-1.55173 10.91329,-1.34843 20.30976,-4.03963 30.66773,-9.00001 47.80718,-22.89569 73.80909,-77.65938 60.9461,-128.798814 + C 297.88221,36.519666 253.52249,1.2165943 203.81874,0.03050633 + Z + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sources/VeloCity.Wpf.Presentation.Styles/VeloCity.Wpf.Presentation.Styles.csproj b/sources/VeloCity.Wpf.Presentation.Styles/VeloCity.Wpf.Presentation.Styles.csproj index bdcf7baa..164e736e 100644 --- a/sources/VeloCity.Wpf.Presentation.Styles/VeloCity.Wpf.Presentation.Styles.csproj +++ b/sources/VeloCity.Wpf.Presentation.Styles/VeloCity.Wpf.Presentation.Styles.csproj @@ -27,6 +27,7 @@ along with this program. If not, see . + diff --git a/sources/VeloCity.Wpf.Presentation/SprintsArea/SprintMembers/SprintMemberViewModel.cs b/sources/VeloCity.Wpf.Presentation/SprintsArea/SprintMembers/SprintMemberViewModel.cs index e5ff67af..1fda1724 100644 --- a/sources/VeloCity.Wpf.Presentation/SprintsArea/SprintMembers/SprintMemberViewModel.cs +++ b/sources/VeloCity.Wpf.Presentation/SprintsArea/SprintMembers/SprintMemberViewModel.cs @@ -29,12 +29,8 @@ public class SprintMemberViewModel : DataGridRowViewModel public HoursValue WorkHours { get; } - public bool HasWorkHours => WorkHours.Value > 0; - public HoursValue AbsenceHours { get; } - public bool HasAbsenceHours => AbsenceHours.Value > 0; - public ChartBarValue ChartBarValue { get; set; } public ShowSprintMemberCalendarCommand ShowSprintMemberCalendarCommand { get; } diff --git a/sources/VeloCity.Wpf.Presentation/SprintsArea/SprintMembers/SprintMembersView.xaml b/sources/VeloCity.Wpf.Presentation/SprintsArea/SprintMembers/SprintMembersView.xaml index 899d7602..36437e85 100644 --- a/sources/VeloCity.Wpf.Presentation/SprintsArea/SprintMembers/SprintMembersView.xaml +++ b/sources/VeloCity.Wpf.Presentation/SprintsArea/SprintMembers/SprintMembersView.xaml @@ -35,116 +35,46 @@ along with this program. If not, see . + + - - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/sources/VeloCity.Wpf.Presentation/SprintsArea/Sprints/SprintsPage.xaml b/sources/VeloCity.Wpf.Presentation/SprintsArea/Sprints/SprintsPage.xaml index bfc7b067..e8268eb3 100644 --- a/sources/VeloCity.Wpf.Presentation/SprintsArea/Sprints/SprintsPage.xaml +++ b/sources/VeloCity.Wpf.Presentation/SprintsArea/Sprints/SprintsPage.xaml @@ -193,13 +193,13 @@ along with this program. If not, see . Margin="0 20 0 0" /> - + - +