Skip to content

Commit

Permalink
DYN-6073 civil3 d packages tour crashing (#14338)
Browse files Browse the repository at this point in the history
* DYN-6073 Civil3D Packages Guide Crashing

It was crashing due that the user tried to close the Step 4 clicking the PackageSearch window and the Popup is not closed but seems that is already disposed.

* DYN-6073 Civil3D Package Tour Crashing

This change is disabling the close button in the PackageManagerSearch window when running the Packages tour, when passing to the next Step the button is enabled again (unless the next step also requires to disable the button). I've added a new icon image that will be shown when the close button is disabled.
In this way we will be preventing the crash when the user try to close the Packages tour by closing the PackageManagerSearch window

* DYN-6073 Civil3D Package Tour Crashing

This fix will solve the problem of the packages guide crashing when clicking the Library (package installed) for passing from Step8 to Step9.
  • Loading branch information
RobertGlobant20 authored Aug 29, 2023
1 parent 584bc48 commit 0c9eeb7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/DynamoCoreWpf/DynamoCoreWpf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
<None Remove="UI\Images\Canvas\canvas-button-geometry-scaling.png" />
<None Remove="UI\Images\NodeStates\package-64px.png" />
<None Remove="UI\Images\PackageManager\empty-state-first-use-light-gray.png" />
<None Remove="UI\Images\TitleBarButtons\close-darktheme-disabled-16px.png" />
<None Remove="UI\Prompts\PortPropertiesEditPrompt.xaml" />
<None Remove="Views\Core\CustomColorPicker.xaml" />
<None Remove="Views\Core\GeometryScalingPopup.xaml" />
Expand Down Expand Up @@ -147,7 +148,7 @@
<HintPath>..\..\extern\Microsoft.Xaml.Behaviors\$(TargetFramework)\Dynamo.Microsoft.Xaml.Behaviors.dll</HintPath>
</Reference>

<PackageReference Include="Prism.Core" Version="8.1.97"/>
<PackageReference Include="Prism.Core" Version="8.1.97" />
<PackageReference Include="DotNetProjects.Extended.Wpf.Toolkit" Version="5.0.103" />
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -922,6 +923,7 @@
<Resource Include="UI\Images\PackageManager\empty-state-first-use-light-gray.png" />
<Resource Include="UI\Images\question-hover-blue-16px.png" />
<Resource Include="UI\Images\TitleBarButtons\close-darktheme-default-16px.png" />
<Resource Include="UI\Images\TitleBarButtons\close-darktheme-disabled-16px.png" />
<Resource Include="UI\Images\TitleBarButtons\close-lighttheme-default-16px.png" />
<Resource Include="UI\Images\TitleBarButtons\close-lighttheme-hover-16px.png" />
<Resource Include="UI\Images\TitleBarButtons\max-darktheme-default-16px.png" />
Expand Down
5 changes: 5 additions & 0 deletions src/DynamoCoreWpf/UI/GuidedTour/GuidesValidationMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,18 @@ internal static void ExecuteClosePackagesSearch(Step stepInfo, StepUIAutomation
{
CloseButtonSearchPackages = GuideUtilities.FindChild(ownedWindow, handler.HandlerElement) as Button;
CloseButtonSearchPackages.Click += CloseButton_Click;
CloseButtonSearchPackages.IsEnabled = false;
}
}
}
else
{
if (CloseButtonSearchPackages != null)
{
CloseButtonSearchPackages.IsEnabled = true;
CloseButtonSearchPackages.Click -= CloseButton_Click;
CloseButtonSearchPackages = null;
}
}
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/DynamoCoreWpf/UI/Themes/Modern/DynamoModern.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3026,6 +3026,9 @@
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="closeIcon" Property="Source" Value="pack://application:,,,/DynamoCoreWpf;component/UI/Images/TitleBarButtons/close-lighttheme-hover-16px.png" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="closeIcon" Property="Source" Value="pack://application:,,,/DynamoCoreWpf;component/UI/Images/TitleBarButtons/close-darktheme-disabled-16px.png" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
Expand Down
4 changes: 0 additions & 4 deletions src/LibraryViewExtensionWebView2/web/library/library.html
Original file line number Diff line number Diff line change
Expand Up @@ -286,13 +286,9 @@
return;
}
if (enable) {
found_div.addEventListener('click', nextStepInGuide);
found_div.parentNode.addEventListener('click', nextStepInGuide);
found_div.parentNode.parentNode.addEventListener('click', nextStepInGuide);
}
else {
found_div.removeEventListener('click', nextStepInGuide);
found_div.parentNode.removeEventListener('click', nextStepInGuide);
found_div.parentNode.parentNode.removeEventListener('click', nextStepInGuide);
}
}
Expand Down

0 comments on commit 0c9eeb7

Please sign in to comment.