From 56ba10186069f41191debf6b89ad2e92c91cc99f Mon Sep 17 00:00:00 2001 From: Ashish Aggarwal Date: Fri, 11 Aug 2023 10:14:43 -0400 Subject: [PATCH 1/5] Fix PostDiff job --- .github/workflows/clear_cache.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clear_cache.yml b/.github/workflows/clear_cache.yml index 37ef5949bd8..0f2e0ab5dd5 100644 --- a/.github/workflows/clear_cache.yml +++ b/.github/workflows/clear_cache.yml @@ -77,8 +77,8 @@ jobs: echo "Deleting caches..." echo "Deleting: $WNNUM-cache-net60Win-current" gh actions-cache delete $WNNUM-cache-net60Win-current -R $REPO --confirm - echo "Deleting: $WNNUM-cache-current" - gh actions-cache delete $WNNUM-cache-current -R $REPO --confirm + echo "Deleting: $WNNUM-cache-net60Win-master" + gh actions-cache delete $WNNUM-cache-master -R $REPO --confirm env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 0a671b23efea6dcdf120bde6a145e2be18a5bc15 Mon Sep 17 00:00:00 2001 From: Ashish Aggarwal Date: Tue, 16 Jan 2024 14:00:08 -0500 Subject: [PATCH 2/5] Update ShortcutToolbar.xaml.cs --- src/DynamoCoreWpf/Controls/ShortcutToolbar.xaml.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/DynamoCoreWpf/Controls/ShortcutToolbar.xaml.cs b/src/DynamoCoreWpf/Controls/ShortcutToolbar.xaml.cs index 39cd666fd9e..7bdad583b1d 100644 --- a/src/DynamoCoreWpf/Controls/ShortcutToolbar.xaml.cs +++ b/src/DynamoCoreWpf/Controls/ShortcutToolbar.xaml.cs @@ -59,9 +59,12 @@ public ShortcutToolbar(DynamoViewModel dynamoViewModel) if (authManager != null) { authManager.LoginStateChanged += AuthChangeHandler; - if (authManager.LoginState == LoginState.LoggedIn && loginMenu.Items.Count == 0) + if (authManager.LoginState == LoginState.LoggedIn) { - loginMenu.Items.Add(logoutOption); + if(loginMenu.Items.Count == 0) + { + loginMenu.Items.Add(logoutOption); + } } else { From 457a084e8e220d11991e3d9f740036b07cca2f7a Mon Sep 17 00:00:00 2001 From: Ashish Aggarwal Date: Tue, 16 Jan 2024 16:16:57 -0500 Subject: [PATCH 3/5] update --- src/DynamoCoreWpf/Properties/Resources.Designer.cs | 9 +++++++++ src/DynamoCoreWpf/Properties/Resources.en-US.resx | 3 +++ src/DynamoCoreWpf/Properties/Resources.resx | 3 +++ .../Controls/PackageManagerPublishControl.xaml.cs | 4 ++-- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/DynamoCoreWpf/Properties/Resources.Designer.cs b/src/DynamoCoreWpf/Properties/Resources.Designer.cs index 69d90d507e1..0ec0563eba3 100644 --- a/src/DynamoCoreWpf/Properties/Resources.Designer.cs +++ b/src/DynamoCoreWpf/Properties/Resources.Designer.cs @@ -8769,6 +8769,15 @@ public static string RerunButtonToolTip { } } + /// + /// Looks up a localized string similar to Your changes will be lost if you proceed.. + /// + public static string ResetChangesWarningPopupMessage { + get { + return ResourceManager.GetString("ResetChangesWarningPopupMessage", resourceCulture); + } + } + /// /// Looks up a localized string similar to Reset CPython. /// diff --git a/src/DynamoCoreWpf/Properties/Resources.en-US.resx b/src/DynamoCoreWpf/Properties/Resources.en-US.resx index eca56492e8e..c9ed9b24703 100644 --- a/src/DynamoCoreWpf/Properties/Resources.en-US.resx +++ b/src/DynamoCoreWpf/Properties/Resources.en-US.resx @@ -3885,4 +3885,7 @@ In certain complex graphs or host program scenarios, Automatic mode may cause in Sign out of Dynamo + + Your changes will be lost if you proceed. + \ No newline at end of file diff --git a/src/DynamoCoreWpf/Properties/Resources.resx b/src/DynamoCoreWpf/Properties/Resources.resx index a3df5d76d3e..d334e8ef816 100644 --- a/src/DynamoCoreWpf/Properties/Resources.resx +++ b/src/DynamoCoreWpf/Properties/Resources.resx @@ -3872,4 +3872,7 @@ In certain complex graphs or host program scenarios, Automatic mode may cause in Sign out of Dynamo + + Your changes will be lost if you proceed. + \ No newline at end of file diff --git a/src/DynamoCoreWpf/Views/PackageManager/Controls/PackageManagerPublishControl.xaml.cs b/src/DynamoCoreWpf/Views/PackageManager/Controls/PackageManagerPublishControl.xaml.cs index 555ac3a8bf2..49870e7b6d5 100644 --- a/src/DynamoCoreWpf/Views/PackageManager/Controls/PackageManagerPublishControl.xaml.cs +++ b/src/DynamoCoreWpf/Views/PackageManager/Controls/PackageManagerPublishControl.xaml.cs @@ -347,8 +347,8 @@ private void CancelButton_Click(object sender, RoutedEventArgs e) MessageBoxResult response = DynamoModel.IsTestMode ? MessageBoxResult.OK : MessageBoxService.Show( Owner, - Dynamo.Wpf.Properties.Resources.DiscardChangesWarningPopupMessage, - Dynamo.Wpf.Properties.Resources.DiscardChangesWarningPopupCaption, + Wpf.Properties.Resources.ResetChangesWarningPopupMessage, + Wpf.Properties.Resources.DiscardChangesWarningPopupCaption, MessageBoxButton.OKCancel, MessageBoxImage.Warning); From 3491a0a41e26c5311a02f415b18352e01299b672 Mon Sep 17 00:00:00 2001 From: Ashish Aggarwal Date: Wed, 17 Jan 2024 11:57:24 -0500 Subject: [PATCH 4/5] Update ShortcutToolbar.xaml --- src/DynamoCoreWpf/Controls/ShortcutToolbar.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DynamoCoreWpf/Controls/ShortcutToolbar.xaml b/src/DynamoCoreWpf/Controls/ShortcutToolbar.xaml index 46a4439fc81..6f8e0bd51a4 100644 --- a/src/DynamoCoreWpf/Controls/ShortcutToolbar.xaml +++ b/src/DynamoCoreWpf/Controls/ShortcutToolbar.xaml @@ -219,7 +219,7 @@ Click="LogoutOption_Click" Name="logoutOption"> - + From cd841d87bfb2c43629bbef2427a5ba84f26c82df Mon Sep 17 00:00:00 2001 From: Roberto T <61755417+RobertGlobant20@users.noreply.github.com> Date: Wed, 17 Jan 2024 08:43:09 -0800 Subject: [PATCH 5/5] DYN-5656-PackagesGuide-BugFix (#14849) When opening the Packages tour and later opening the PackageManager (during the tour) at closing was removing the wrong dark background, then I added some code for searching for the specific overlay added (not the one added by the guided tour). Also deleted the code for using the EnableEnvironment function due that is not used any more. --- src/DynamoCoreWpf/UI/GuidedTour/GuidesManager.cs | 10 ---------- .../UI/GuidedTour/GuidesValidationMethods.cs | 7 ------- src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs | 10 +++------- 3 files changed, 3 insertions(+), 24 deletions(-) diff --git a/src/DynamoCoreWpf/UI/GuidedTour/GuidesManager.cs b/src/DynamoCoreWpf/UI/GuidedTour/GuidesManager.cs index 0f80c6e546d..c313d01b0a1 100644 --- a/src/DynamoCoreWpf/UI/GuidedTour/GuidesManager.cs +++ b/src/DynamoCoreWpf/UI/GuidedTour/GuidesManager.cs @@ -262,8 +262,6 @@ internal void ExitTour() dynamoViewModel.OnEnableShortcutBarItems(true); - EnableDynamoUI(); - //Hide guide background overlay guideBackgroundElement.Visibility = Visibility.Hidden; GuidesValidationMethods.CurrentExecutingGuide = null; @@ -271,13 +269,6 @@ internal void ExitTour() } } - private void EnableDynamoUI() - { - var dynamoView = mainRootElement as DynamoView; - if (dynamoView != null) - dynamoView.EnableEnvironment(true); - } - /// /// Creates the exit modal when close button is pressed /// @@ -306,7 +297,6 @@ private void ContinueTourButton_Click(object sender, RoutedEventArgs e) private void ExitTourButton_Click(object sender, RoutedEventArgs e) { exitGuideWindow.IsOpen = false; - EnableDynamoUI(); GuideFlowEvents.OnGuidedTourExited(currentGuide.Name); ExitTour(); } diff --git a/src/DynamoCoreWpf/UI/GuidedTour/GuidesValidationMethods.cs b/src/DynamoCoreWpf/UI/GuidedTour/GuidesValidationMethods.cs index 398b65c4254..9e4fde446a3 100644 --- a/src/DynamoCoreWpf/UI/GuidedTour/GuidesValidationMethods.cs +++ b/src/DynamoCoreWpf/UI/GuidedTour/GuidesValidationMethods.cs @@ -392,13 +392,6 @@ private static void ClosePackageManager(PackageManagerView packageManager) packageManager.PackageManagerViewModel.Width = PMDefaultWidth; packageManager.PackageManagerViewModel.Height = PMDefaultHeight; packageManagerViewModel.PropertyChanged -= searchPackagesPropertyChanged.Invoke; - - //Enable the DynamoView.mainGrid so the user will be able to interact with Dynamo - var dynamoView = packageManager.Owner as DynamoView; - if (dynamoView != null) - { - dynamoView.EnableEnvironment(true); - } packageManager.Close(); } diff --git a/src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs b/src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs index 6feec071c99..a6af27805cc 100644 --- a/src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs +++ b/src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs @@ -2316,11 +2316,6 @@ private void HandlePackageManagerWindowClosed(object sender, EventArgs e) cmd.Dispose(); } - internal void EnableEnvironment(bool isEnabled) - { - this.mainGrid.IsEnabled = isEnabled; - } - /// /// Adds/Removes an overlay so the user won't be able to interact with the background (this behavior was implemented for Dynamo and for Library) /// @@ -2329,6 +2324,7 @@ internal void EnableOverlayBlocker(bool isEnabled) { object[] parametersInvokeScript = new object[] { "fullOverlayVisible", new object[] { isEnabled } }; ResourceUtilities.ExecuteJSFunction(this, parametersInvokeScript); + var backgroundName = "BackgroundBlocker"; if (isEnabled) { @@ -2336,7 +2332,7 @@ internal void EnableOverlayBlocker(bool isEnabled) Panel.SetZIndex(shortcutsBarGrid, 0); var backgroundElement = new GuideBackground(this) { - Name = "BackgroundBlocker", + Name = backgroundName, HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Top, Visibility = Visibility.Visible @@ -2351,7 +2347,7 @@ internal void EnableOverlayBlocker(bool isEnabled) { //Restoring the ZIndex value to the default one. Panel.SetZIndex(shortcutsBarGrid, 1); - var backgroundElement = mainGrid.Children.OfType().FirstOrDefault(); + var backgroundElement = mainGrid.Children.OfType().Where(element => element.Name == backgroundName).FirstOrDefault(); if (backgroundElement != null) { mainGrid.Children.Remove(backgroundElement);