telemetry: Add panel button clicked event (#36735)
The event has two fields 1. name: The name of the panel being clicked 2. toggle_state: true if clicking to open, otherwise false cc @katie-z-geer Release Notes: - N/A
This commit is contained in:
parent
b349a8f34c
commit
e360691106
1 changed files with 5 additions and 0 deletions
|
@ -915,6 +915,11 @@ impl Render for PanelButtons {
|
||||||
.on_click({
|
.on_click({
|
||||||
let action = action.boxed_clone();
|
let action = action.boxed_clone();
|
||||||
move |_, window, cx| {
|
move |_, window, cx| {
|
||||||
|
telemetry::event!(
|
||||||
|
"Panel Button Clicked",
|
||||||
|
name = name,
|
||||||
|
toggle_state = !is_open
|
||||||
|
);
|
||||||
window.focus(&focus_handle);
|
window.focus(&focus_handle);
|
||||||
window.dispatch_action(action.boxed_clone(), cx)
|
window.dispatch_action(action.boxed_clone(), cx)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue