diff --git a/desktop/plugins/public/ui-debugger/components/Controls.tsx b/desktop/plugins/public/ui-debugger/components/Controls.tsx index 4d415473b..ab48b944e 100644 --- a/desktop/plugins/public/ui-debugger/components/Controls.tsx +++ b/desktop/plugins/public/ui-debugger/components/Controls.tsx @@ -28,6 +28,12 @@ import { } from '@ant-design/icons'; import {usePlugin, useValue, Layout} from 'flipper-plugin'; import {FrameworkEventType} from '../types'; +import {tracker} from '../tracker'; +import {debounce} from 'lodash'; + +const searchTermUpdated = debounce((searchTerm: string) => { + tracker.track('search-term-updated', {searchTerm}); +}, 250); export const Controls: React.FC = () => { const instance = usePlugin(plugin); @@ -42,6 +48,7 @@ export const Controls: React.FC = () => { eventType: FrameworkEventType, monitored: boolean, ) => void = (eventType: FrameworkEventType, monitored: boolean) => { + tracker.track('framework-event-monitored', {eventType, monitored}); instance.uiState.frameworkEventMonitoring.update((draft) => draft.set(eventType, monitored), ); @@ -51,14 +58,21 @@ export const Controls: React.FC = () => { instance.uiState.searchTerm.set(e.target.value)} + onChange={(e) => { + instance.uiState.searchTerm.set(e.target.value); + searchTermUpdated(e.target.value); + }} prefix={} placeholder="Search" />