chore: tracking events for app tabs header (#7778)

fix AF-1194
This commit is contained in:
pengx17
2024-08-08 09:14:46 +00:00
parent 6ef5675be1
commit b71945c29f
4 changed files with 137 additions and 3 deletions
@@ -18,6 +18,7 @@ type NavigationEvents =
| 'openInSplitView'
| 'switchTab'
| 'switchSplitView'
| 'tabAction'
| 'navigate'
| 'goBack'
| 'goForward'
@@ -229,6 +230,9 @@ const PageEvents = {
storage: ['viewPlans'],
aiAction: ['viewPlans'],
},
appTabsHeader: {
$: ['tabAction'],
},
header: {
actions: [
'createDoc',
@@ -319,6 +323,24 @@ type PaymentEventArgs = {
recurring: string;
};
type TabActionControlType =
| 'click'
| 'dnd'
| 'midClick'
| 'xButton'
| 'contextMenu';
type TabActionType =
| 'pin'
| 'unpin'
| 'close'
| 'refresh'
| 'moveTab'
| 'openInSplitView'
| 'openInNewTab'
| 'switchSplitView'
| 'switchTab'
| 'separateTabs';
export type EventArgs = {
createWorkspace: { flavour: string };
oauth: { provider: string };
@@ -342,6 +364,11 @@ export type EventArgs = {
orderOrganizeItem: OrganizeItemArgs;
openInNewTab: { type: OrganizeItemType };
openInSplitView: { type: OrganizeItemType };
tabAction: {
type?: OrganizeItemType;
control: TabActionControlType;
action: TabActionType;
};
toggleFavorite: OrganizeItemArgs & { on: boolean };
createDoc: { mode?: 'edgeless' | 'page' };
switchPageMode: { mode: 'edgeless' | 'page' };