From 05d461e95b3e81b89a8fa93f6b25408f09debe83 Mon Sep 17 00:00:00 2001
From: "Aaron (Qilong)" <173288704@qq.com>
Date: Thu, 19 Nov 2020 10:46:08 -0500
Subject: [PATCH] Add coverage for docking (#11262)
---
src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs | 6 ++++++
src/NodeServices/IAnalyticsClient.cs | 10 ++++++++++
2 files changed, 16 insertions(+)
diff --git a/src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs b/src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs
index f171ae6973f..2fc20f5a794 100644
--- a/src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs
+++ b/src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs
@@ -354,6 +354,9 @@ internal void UndockExtensionTab(object sender, RoutedEventArgs e)
{
var tabName = (sender as Button).DataContext.ToString();
UndockExtension(tabName);
+ Logging.Analytics.TrackEvent(
+ Actions.Undock,
+ Categories.ViewExtensionOperations, tabName);
}
///
@@ -413,6 +416,9 @@ private void ExtensionWindow_Closed(object sender, EventArgs e)
if (ext.DockRequested)
{
AddExtensionTabItem((IViewExtension)ext.Tag, content);
+ Logging.Analytics.TrackEvent(
+ Actions.Dock,
+ Categories.ViewExtensionOperations, extName);
}
else
{
diff --git a/src/NodeServices/IAnalyticsClient.cs b/src/NodeServices/IAnalyticsClient.cs
index b0a3323c76c..1a69b8e0249 100644
--- a/src/NodeServices/IAnalyticsClient.cs
+++ b/src/NodeServices/IAnalyticsClient.cs
@@ -202,6 +202,16 @@ public enum Actions
/// Load event, such as extensions loaded
///
Load,
+
+ ///
+ /// Dock event, such as docking view extension
+ ///
+ Dock,
+
+ ///
+ /// Undock event, such as undocking view extension
+ ///
+ Undock,
}
///