Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

938 B
Raw Blame
import { createPostHogWidgetNode } from 'scenes/notebooks/Nodes/NodeWrapper'
import { getNotebookWidgetDefaultView } from 'scenes/notebooks/notebookWidgetCatalog'
import { urls } from 'scenes/urls'

import {
    ACTION_NOTEBOOK_WIDGET_VIEWS,
    ActionDetail,
    ActionNotebookWidgetAttributes,
} from 'products/actions/frontend/actionNotebookWidgetViews'

import { NotebookNodeType } from '../types'

export const NotebookNodeAction = createPostHogWidgetNode<ActionNotebookWidgetAttributes>({
    nodeType: NotebookNodeType.Action,
    titlePlaceholder: 'Action',
    editableTitle: false,
    Component: ActionDetail,
    heightEstimate: 320,
    minHeight: 160,
    href: (attributes) => urls.action(attributes.id),
    resizeable: true,
    attributes: {
        id: {},
        view: {},
    },
    defaultView: getNotebookWidgetDefaultView('Action'),
    views: ACTION_NOTEBOOK_WIDGET_VIEWS,
    serializedText: () => 'Action',
})