Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

telemetry: Add panel button clicked event (#36735)

Anthony Eide36069110659
diff --git a/crates/workspace/src/dock.rs b/crates/workspace/src/dock.rs
index 7a8de6e9104..149a122c0c6 100644
--- a/crates/workspace/src/dock.rs
+++ b/crates/workspace/src/dock.rs
@@ -915,6 +915,11 @@ impl Render for PanelButtons {
.on_click({
let action = action.boxed_clone();
move |_, window, cx| {
+ telemetry::event!(
+ "Panel Button Clicked",
+ name = name,
+ toggle_state = !is_open
+ );
window.focus(&focus_handle);
window.dispatch_action(action.boxed_clone(), cx)
}