-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Notebook playlist comments (#17671)
- Loading branch information
1 parent
03407f3
commit 6e3ce74
Showing
10 changed files
with
159 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
frontend/src/scenes/notebooks/Nodes/messaging/notebook-node-messages.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* NotebookNode messaging | ||
* | ||
* To help communication between nodes, you can register a message handler from any of the defined list. | ||
* Typing wise it is tricky to scope so all events handlers are typed as possibly undefined. | ||
*/ | ||
|
||
export type NotebookNodeMessages = { | ||
'play-replay': { | ||
sessionRecordingId: string | ||
time: number | ||
} | ||
// Not used yet but as a future idea - you could "ping" a node to have it highlight or something. | ||
ping: { | ||
message: string | ||
} | ||
} | ||
|
||
export type NotebookNodeMessagesNames = keyof NotebookNodeMessages | ||
|
||
export type NotebookNodeMessagesListener<MessageName extends NotebookNodeMessagesNames> = ( | ||
e: NotebookNodeMessages[MessageName] | ||
) => void | ||
|
||
export type NotebookNodeMessagesListeners = { | ||
[MessageName in NotebookNodeMessagesNames]?: NotebookNodeMessagesListener<MessageName> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.