chore(editor): add telemetry track to display mode of note (#10192)

Close [BS-2468](https://linear.app/affine-design/issue/BS-2468/analytics-for-page-block-polish)
This commit is contained in:
L-Sun
2025-02-17 03:23:55 +00:00
parent 1476ca922b
commit 85e413f8c8
3 changed files with 26 additions and 1 deletions

View File

@@ -0,0 +1,10 @@
import type { TelemetryEvent } from './types.js';
export type NoteEventType = 'NoteDisplayModeChanged';
export type NoteEvents = {
NoteDisplayModeChanged: TelemetryEvent & {
control: 'display mode';
type: 'note';
};
};

View File

@@ -2,6 +2,7 @@ import { createIdentifier } from '@blocksuite/global/di';
import type { OutDatabaseAllEvents } from './database.js';
import type { LinkToolbarEvents } from './link.js';
import type { NoteEvents } from './note.js';
import type {
AttachmentUploadedEvent,
DocCreatedEvent,
@@ -13,7 +14,8 @@ import type {
} from './types.js';
export type TelemetryEventMap = OutDatabaseAllEvents &
LinkToolbarEvents & {
LinkToolbarEvents &
NoteEvents & {
DocCreated: DocCreatedEvent;
Link: TelemetryEvent;
LinkedDocCreated: LinkedDocCreatedEvent;