Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tours buttons behavior #13808

Merged
merged 2 commits into from
Mar 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/DynamoCoreWpf/UI/GuidedTour/GuidesManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ internal void LaunchTour(string tourName)
{
Initialize();
GuideFlowEvents.OnGuidedTourStart(tourName);
dynamoViewModel.OnEnableShortcutBarItems(false);
Logging.Analytics.TrackScreenView("InteractiveGuidedTours");
Logging.Analytics.TrackEvent(Logging.Actions.Start, Logging.Categories.GuidedTourOperations, Resources.ResourceManager.GetString(currentGuide.GuideNameResource, System.Globalization.CultureInfo.InvariantCulture).Replace("_", ""), currentGuide.SequenceOrder);
}
Expand Down Expand Up @@ -230,7 +231,6 @@ private void TourFinished(GuidedTourStateEventArgs args)
/// </summary>
internal void ExitTour()
{

if (currentGuide != null)
{
foreach (Step tmpStep in currentGuide.GuideSteps)
Expand Down Expand Up @@ -259,12 +259,13 @@ internal void ExitTour()
exitGuideWindow.ContinueTourButton.Click -= ContinueTourButton_Click;
}

dynamoViewModel.OnEnableShortcutBarItems(true);

//Hide guide background overlay
guideBackgroundElement.Visibility = Visibility.Hidden;
GuidesValidationMethods.CurrentExecutingGuide = null;
tourStarted = false;
}

}

/// <summary>
Expand Down Expand Up @@ -523,8 +524,7 @@ internal Guide GetNextGuide()


private void Popup_StepClosed(string name, Step.StepTypes stepType)
{
dynamoViewModel.OnEnableShortcutBarItems(true);
{
GuideFlowEvents.OnGuidedTourFinish(currentGuide.Name);

//The exit tour popup will be shown only when a popup (doesn't apply for survey) is closed or when the tour is closed.
Expand Down
3 changes: 1 addition & 2 deletions src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2510,7 +2510,6 @@ private void ShowGetStartedGuidedTour()
try
{
dynamoViewModel.MainGuideManager.LaunchTour(GuidesManager.GetStartedGuideName);
dynamoViewModel.OnEnableShortcutBarItems(false);
}
catch (Exception)
{
Expand All @@ -2528,7 +2527,7 @@ private void PackagesMenuGuide_Click(object sender, RoutedEventArgs e)
{
try
{
dynamoViewModel.MainGuideManager.LaunchTour(GuidesManager.PackagesGuideName);
dynamoViewModel.MainGuideManager.LaunchTour(GuidesManager.PackagesGuideName);
}
catch (Exception)
{
Expand Down