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

DYN-6874 Logging Packages Tour #15203

Merged
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
4 changes: 3 additions & 1 deletion src/DynamoCoreWpf/UI/GuidedTour/Guide.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@ internal void Play()
/// </summary>
internal void Initialize()
{
TotalSteps = GuideSteps.Count;
//There are guided tours containing repeated Sequences due that we can have different Steps flow (conditional flows)
var differentSteps = GuideSteps.Select(step => step.Sequence).Distinct().ToList();
TotalSteps = differentSteps.Count;
QilongTang marked this conversation as resolved.
Show resolved Hide resolved

SetLibraryViewVisible(false);

Expand Down
6 changes: 5 additions & 1 deletion src/DynamoCoreWpf/UI/GuidedTour/GuidesManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,11 @@ internal void ExitTour()
}

string guidName = Resources.ResourceManager.GetString(currentGuide.GuideNameResource, System.Globalization.CultureInfo.InvariantCulture).Replace("_", "");
if (currentGuide.TotalSteps - 1 == currentGuide.CurrentStep.Sequence)
int offSet = 1;
//Due that the Packages guide doesn't have a Welcome popup (like the other guides) then the Guide.Sequence starts at 1 (instead of 0) when we need to use a offSet = 0
if (currentGuide.Name == PackagesGuideName)
offSet = 0;
if (currentGuide.TotalSteps - offSet == currentGuide.CurrentStep.Sequence)
{
Logging.Analytics.TrackEvent(Logging.Actions.Completed, Logging.Categories.GuidedTourOperations, guidName, currentGuide.CurrentStep.Sequence);
}
Expand Down
Loading