From b786675c241f775aa308196da5f1995fcbf0e6ed Mon Sep 17 00:00:00 2001 From: Mathieu Guindon Date: Sat, 16 Mar 2024 19:16:26 -0400 Subject: [PATCH] show welcome tab on startup; settings UI tweaks. --- Client/Rubberduck.Editor/App.xaml.cs | 35 ++++++++++-------- .../Converters/WrapPanelItemWidthConverter.cs | 2 +- .../arrows-left-right-to-line-solid.png | Bin 0 -> 10015 bytes Client/Rubberduck.UI/Rubberduck.UI.csproj | 2 + .../Settings/SettingsWindowViewModel.cs | 29 ++++++++++++++- .../Shared/Settings/SettingGroupViewModel.cs | 14 +++++++ .../Shared/Settings/SettingsWindow.xaml | 14 +++++-- .../Templates/SettingGroupControl.xaml | 7 ++-- .../Templates/SettingSubGroupControl.xaml | 7 ++++ Client/Rubberduck.UI/Styles/DefaultStyle.xaml | 6 +-- Client/Rubberduck.UI/Styles/Icons.xaml | 2 + .../IsTelemetryEnabledSetting.cs | 2 +- 12 files changed, 92 insertions(+), 28 deletions(-) create mode 100644 Client/Rubberduck.UI/Resources/FontAwesome/arrows-left-right-to-line-solid.png diff --git a/Client/Rubberduck.Editor/App.xaml.cs b/Client/Rubberduck.Editor/App.xaml.cs index f9533a2e..f75cc4c7 100644 --- a/Client/Rubberduck.Editor/App.xaml.cs +++ b/Client/Rubberduck.Editor/App.xaml.cs @@ -198,21 +198,26 @@ private void ShowStartupToolwindows(EditorSettings settings) private async Task LoadWelcomeTabAsync(IShellWindowViewModel model) { - //var fileSystem = _serviceProvider.GetRequiredService(); - //var path = fileSystem.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Rubberduck", "Templates", "Welcome.md"); - //var content = await fileSystem.File.ReadAllTextAsync(path); - - //var showSettingsCommand = _serviceProvider.GetRequiredService(); - //var closeToolWindowCommand = _serviceProvider.GetRequiredService(); - //var activeDocumentStatus = _serviceProvider.GetRequiredService(); - //var welcome = new MarkdownDocumentTabViewModel(new WorkspaceFileUri(null!, new Uri(path)), "Welcome", content, isReadOnly: true, showSettingsCommand, closeToolWindowCommand, activeDocumentStatus, () => _languageClient.LanguageClient!); - - //var welcomeTabContent = new MarkdownEditorControl() { DataContext = welcome }; - //welcome.ContentControl = welcomeTabContent; - //welcome.IsSelected = true; - - //model.DocumentWindows.Add(welcome); - //model.ActiveDocumentTab = welcome; + var fileSystem = _serviceProvider.GetRequiredService(); + var folder = fileSystem.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Rubberduck", "Templates"); + var filename = "Welcome.md"; + var path = fileSystem.Path.Combine(folder, filename); + var content = await fileSystem.File.ReadAllTextAsync(path); + + var rootUri = new Uri(folder); + var fileUri = new WorkspaceFileUri(filename, rootUri); + + var showSettingsCommand = _serviceProvider.GetRequiredService(); + var closeToolWindowCommand = _serviceProvider.GetRequiredService(); + var activeDocumentStatus = _serviceProvider.GetRequiredService(); + var documentState = new DocumentState(fileUri, content, isOpened: true); + var welcome = new MarkdownDocumentTabViewModel(documentState, isReadOnly: true, showSettingsCommand, closeToolWindowCommand, activeDocumentStatus, () => _languageClient.LanguageClient!); + var welcomeTabContent = new MarkdownEditorControl() { DataContext = welcome }; + welcome.ContentControl = welcomeTabContent; + welcome.IsSelected = true; + + model.DocumentWindows.Add(welcome); + model.ActiveDocumentTab = welcome; } protected override void OnExit(ExitEventArgs e) diff --git a/Client/Rubberduck.UI/Converters/WrapPanelItemWidthConverter.cs b/Client/Rubberduck.UI/Converters/WrapPanelItemWidthConverter.cs index 42d59aa8..31881d84 100644 --- a/Client/Rubberduck.UI/Converters/WrapPanelItemWidthConverter.cs +++ b/Client/Rubberduck.UI/Converters/WrapPanelItemWidthConverter.cs @@ -14,7 +14,7 @@ namespace Rubberduck.UI.Converters public class WrapPanelItemWidthConverter : IValueConverter { public double MinItemWidth { get; set; } = 300; - public double MaxItemWidth { get; set; } = 512; + public double MaxItemWidth { get; set; } = 720; public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { diff --git a/Client/Rubberduck.UI/Resources/FontAwesome/arrows-left-right-to-line-solid.png b/Client/Rubberduck.UI/Resources/FontAwesome/arrows-left-right-to-line-solid.png new file mode 100644 index 0000000000000000000000000000000000000000..782ea54f5ea6fcaf81b8dfb59f6e632e26300906 GIT binary patch literal 10015 zcmeHNYdlnIxPNC%p>|m5qV3u!l8R8+E~9Nqxkp92VoD`3?mHT{(aoxa%B3WfhDxQ_ zM(&j8h8h(aj8KgGFbsy7^RC&y^E)5T`EtIU59h=1TkE|&@3YqXJpcdyS(lw1ZI&(h zeF*?y*`D2G7Xa{d_yaPF;hp7CokI9eHgNaB5P)k7#D2JYZJS=fn`=UMx`(<3oD2;+ z8hiqTg@tYL@%Ih!IvRLlOF*#qol*1O0nh+@$UF9hXN+`4B>nV0($5pH4kmWN>=-FxOC(_>TfvzpU;9F>T}K7q+T2yRiJj0WvPmPc(urw=?$8 zqVFDkb!yq}$A?oraC-C|`A;@0^ewmlgS#irvU)+&`qrM4S{5z+=FMXn{Zo&7 zxC_~QBT;P)B6Ji{hY(&0`qF|Z(ji)|L}Exvzlmr^kN%j<>5>8Z_D9CDzA#5V#e9Ap zCm-Wv%S}&a{iL!znCCqoUqfU3*wYI-j3MEIC@!uT0hC+yk76#ZqBkU{M$}mdIwlQa zS7kxU=!QrGV%OGf+on=WOH0jm@wWoNJaJg)-GFN|YV>loEr6D#AUyPFeEX#Wa^0OR zWdrv)l@srEt24M>ctEb35i~pE^|v`p_98qs!fU%5-xkZ(Jm%x&)$4He>eWLRw*xSB z3l)`SgTn_8o((Q&751Vtqf2MAHOGw+USV`~%pvYtP;)%}fyi_$K&q&$Y>wqoAh)b zAF-?fowwIooM8yOy}e^d#8q*B=oa)hfBZOqhKqojnTPjcnrL|c^j|v>o_3D={u(>@ zJR)op0VsQ#Dl+u~+Z{rD$dT)aYL-1mOP|=(g-r<;oUo-sT^$xCvlYi#EEhdum+H;Q zcQ)kVt7u8qd7nJv8kRzVrqua5JY~WI7^CVKWP^y<33WQJef)5IyykVFN(tUN3Qnm@xkK zx~4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0~VA=aCLW zyM!uykj%>ItqS`*Y&Ki+)TYi2sz|}M+$PrNU=|=C@J` wfbReOoAJ5DfD$ZY1?cbp|Ih!@2lFxLew_T%^=4<_$8BKGPDk>yKPl(_1MK_~)Bpeg literal 0 HcmV?d00001 diff --git a/Client/Rubberduck.UI/Rubberduck.UI.csproj b/Client/Rubberduck.UI/Rubberduck.UI.csproj index d9234181..7f900ecb 100644 --- a/Client/Rubberduck.UI/Rubberduck.UI.csproj +++ b/Client/Rubberduck.UI/Rubberduck.UI.csproj @@ -158,6 +158,7 @@ + @@ -417,6 +418,7 @@ + diff --git a/Client/Rubberduck.UI/Services/Settings/SettingsWindowViewModel.cs b/Client/Rubberduck.UI/Services/Settings/SettingsWindowViewModel.cs index e75c5c18..d5d22d09 100644 --- a/Client/Rubberduck.UI/Services/Settings/SettingsWindowViewModel.cs +++ b/Client/Rubberduck.UI/Services/Settings/SettingsWindowViewModel.cs @@ -28,6 +28,14 @@ public SettingsWindowViewModel(UIServiceHelper service, MessageActionCommand[] a ShowSettingsCommand = new DelegateCommand(service, parameter => ResetToDefaults()); service.RunOnMainThread(() => Settings = _factory.CreateViewModel(_service.Settings)); + ExpandSettingGroupCommand = new DelegateCommand(service, parameter => + { + if (parameter is ISettingGroupViewModel model) + { + ExecuteExpandSettingGroupCommand(model); + } + }); + CommandBindings = new CommandBinding[] { new(NavigationCommands.Search, DialogCommandHandlers.BrowseLocationCommandBinding_Executed, DialogCommandHandlers.BrowseLocationCommandBinding_CanExecute), @@ -38,7 +46,26 @@ public SettingsWindowViewModel(UIServiceHelper service, MessageActionCommand[] a public bool ShowPinButton => false; - public ISettingGroupViewModel Settings { get; private set; } + public ICommand ExpandSettingGroupCommand { get; } + + private void ExecuteExpandSettingGroupCommand(ISettingGroupViewModel model) + { + Selection = model; + } + + private ISettingGroupViewModel _settings; + public ISettingGroupViewModel Settings + { + get => _settings; + private set + { + if (_settings != value) + { + _settings = value; + OnPropertyChanged(); + } + } + } private ISettingViewModel _selection; public ISettingViewModel Selection diff --git a/Client/Rubberduck.UI/Shared/Settings/SettingGroupViewModel.cs b/Client/Rubberduck.UI/Shared/Settings/SettingGroupViewModel.cs index a8c69545..df00b182 100644 --- a/Client/Rubberduck.UI/Shared/Settings/SettingGroupViewModel.cs +++ b/Client/Rubberduck.UI/Shared/Settings/SettingGroupViewModel.cs @@ -57,6 +57,20 @@ public bool IsEnabled } } + private bool _isExpanded; + public bool IsExpanded + { + get => _isExpanded; + set + { + if (_isExpanded != value) + { + _isExpanded = value; + OnPropertyChanged(); + } + } + } + public RubberduckSetting ToSetting() => _settingGroup with { Value = Items.Select(e => e.ToSetting()).ToArray() }; } } diff --git a/Client/Rubberduck.UI/Shared/Settings/SettingsWindow.xaml b/Client/Rubberduck.UI/Shared/Settings/SettingsWindow.xaml index 6304a160..473153f4 100644 --- a/Client/Rubberduck.UI/Shared/Settings/SettingsWindow.xaml +++ b/Client/Rubberduck.UI/Shared/Settings/SettingsWindow.xaml @@ -34,10 +34,11 @@ - + - + + - - + diff --git a/Client/Rubberduck.UI/Shared/Settings/Templates/SettingSubGroupControl.xaml b/Client/Rubberduck.UI/Shared/Settings/Templates/SettingSubGroupControl.xaml index 06e0fbb2..b435b4c0 100644 --- a/Client/Rubberduck.UI/Shared/Settings/Templates/SettingSubGroupControl.xaml +++ b/Client/Rubberduck.UI/Shared/Settings/Templates/SettingSubGroupControl.xaml @@ -27,6 +27,13 @@ CheckedIcon="{DynamicResource UnlockedIcon}" IsChecked="{Binding IsEnabled}" Visibility="{Binding IsReadOnlyRecommended, Converter={StaticResource BoolToVisibilityConverter}}" /> + + diff --git a/Client/Rubberduck.UI/Styles/DefaultStyle.xaml b/Client/Rubberduck.UI/Styles/DefaultStyle.xaml index 66c72d45..a8cd5b30 100644 --- a/Client/Rubberduck.UI/Styles/DefaultStyle.xaml +++ b/Client/Rubberduck.UI/Styles/DefaultStyle.xaml @@ -502,9 +502,9 @@