mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 06:33:55 +01:00
Merge pull request #31035 from overleaf/mg-context-menu-analytics
Add analytics event for context menu, comment, track changes, and jump to location GitOrigin-RevId: 8412cc3c8039cd1582ccee20b162b4bef4467dea
This commit is contained in:
@@ -23,6 +23,7 @@ import {
|
||||
deleteToVisualLineStart,
|
||||
} from './visual-line-selection'
|
||||
import { emitShortcutEvent } from '@/features/source-editor/extensions/toolbar/utils/analytics'
|
||||
import { sendMB } from '@/infrastructure/event-tracking'
|
||||
|
||||
const toggleReviewPanel = () => {
|
||||
window.dispatchEvent(new Event('ui.toggle-review-panel'))
|
||||
@@ -30,6 +31,9 @@ const toggleReviewPanel = () => {
|
||||
}
|
||||
|
||||
const addNewCommentFromKbdShortcut = () => {
|
||||
sendMB('add-comment', {
|
||||
location: 'shortcut',
|
||||
})
|
||||
window.dispatchEvent(new Event('add-new-review-comment'))
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
openSearchPanel,
|
||||
searchPanelOpen,
|
||||
} from '@codemirror/search'
|
||||
import { sendMB } from '@/infrastructure/event-tracking'
|
||||
import { toggleRanges, wrapRanges } from '../../commands/ranges'
|
||||
import {
|
||||
ancestorListType,
|
||||
@@ -163,7 +164,10 @@ export const toggleSearch: Command = view => {
|
||||
return true
|
||||
}
|
||||
|
||||
export const addComment = () => {
|
||||
export const addComment = (location: string) => {
|
||||
sendMB('add-comment', {
|
||||
location,
|
||||
})
|
||||
window.dispatchEvent(new Event('add-new-review-comment'))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user