mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-06 11:59:51 +08:00
chore(editor): add tracking events to attachments (#12317)
Closes: [BS-3483](https://linear.app/affine-design/issue/BS-3483/event-tracking-loading-block)
This commit is contained in:
@@ -6,6 +6,9 @@ import type { LinkToolbarEvents } from './link.js';
|
||||
import type { NoteEvents } from './note.js';
|
||||
import type { SlashMenuEvents } from './slash-menu.js';
|
||||
import type {
|
||||
AttachmentReloadedEvent,
|
||||
AttachmentReloadedEventInToolbar,
|
||||
AttachmentUpgradedEvent,
|
||||
AttachmentUploadedEvent,
|
||||
BlockCreationEvent,
|
||||
DocCreatedEvent,
|
||||
@@ -31,6 +34,10 @@ export type TelemetryEventMap = OutDatabaseAllEvents &
|
||||
CanvasElementUpdated: ElementUpdatedEvent;
|
||||
EdgelessElementLocked: ElementLockEvent;
|
||||
ExpandedAndCollapsed: MindMapCollapseEvent;
|
||||
AttachmentReloadedEvent:
|
||||
| AttachmentReloadedEvent
|
||||
| AttachmentReloadedEventInToolbar;
|
||||
AttachmentUpgradedEvent: AttachmentUpgradedEvent;
|
||||
AttachmentUploadedEvent: AttachmentUploadedEvent;
|
||||
BlockCreated: BlockCreationEvent;
|
||||
EdgelessToolPicked: EdgelessToolPickedEvent;
|
||||
|
||||
@@ -61,9 +61,36 @@ export interface MindMapCollapseEvent extends TelemetryEvent {
|
||||
type: 'expand' | 'collapse';
|
||||
}
|
||||
|
||||
export interface AttachmentReloadedEvent extends TelemetryEvent {
|
||||
page: 'doc editor' | 'whiteboard editor';
|
||||
segment: 'doc' | 'whiteboard';
|
||||
module: 'attachment';
|
||||
control: 'reload';
|
||||
category: 'card' | 'embed';
|
||||
type: string; // file type
|
||||
}
|
||||
|
||||
export interface AttachmentReloadedEventInToolbar extends TelemetryEvent {
|
||||
page: 'doc editor' | 'whiteboard editor';
|
||||
segment: 'doc' | 'whiteboard';
|
||||
module: 'toolbar';
|
||||
control: 'reload';
|
||||
category: 'attachment';
|
||||
type: string; // file type
|
||||
}
|
||||
|
||||
export interface AttachmentUpgradedEvent extends TelemetryEvent {
|
||||
page: 'doc editor' | 'whiteboard editor';
|
||||
segment: 'doc' | 'whiteboard';
|
||||
module: 'attachment';
|
||||
control: 'upgrade';
|
||||
category: 'card' | 'embed';
|
||||
type: string; // file type
|
||||
}
|
||||
|
||||
export interface AttachmentUploadedEvent extends TelemetryEvent {
|
||||
page: 'doc editor' | 'whiteboard editor';
|
||||
segment: 'attachment';
|
||||
segment: 'doc' | 'whiteboard';
|
||||
module: 'attachment';
|
||||
control: 'uploader';
|
||||
type: string; // file type
|
||||
|
||||
Reference in New Issue
Block a user