Node Details View (NDV)
Relevant source files
The following files were used as context for generating this wiki page:
- packages/frontend/editor-ui/src/components/NodeDetailsView.vue
- packages/frontend/editor-ui/src/components/ParameterInput.vue
- packages/frontend/editor-ui/src/components/NodeSettingsTabs.vue
- packages/frontend/editor-ui/src/stores/ndv.store.ts
- packages/frontend/editor-ui/src/components/VirtualSchema.test.ts
- packages/frontend/editor-ui/src/constants.ts
The Node Details View (NDV) is the primary user interface within the n8n canvas for configuring the behavior of a single node. When a user selects a node in a workflow, the NDV opens, presenting a set of tools and panels to define the node's parameters, manage its settings and credentials, and inspect its input and output data. It serves as the central hub for all node-specific interactions.
The NDV is a dynamic component that adapts its presentation based on the selected node's type, its execution state, and active experiments like the 029_ndv_ui_overhaul. It is designed to be persistent and configurable, with its dimensions and panel states saved to the browser's local storage for a consistent user experience across sessions.
Architecture and Core Components
The NDV is composed of several key Vue components that work together to provide a comprehensive node configuration experience. The main container, NodeDetailsView.vue, orchestrates the display of tabs, panels, and data schemas.
The following diagram illustrates the high-level component architecture of the Node Details View.
Key Components
| Component | Description | Source File |
|---|---|---|
NodeDetailsView.vue | The main container component for the entire view. It manages the overall layout and visibility of the NDV panel. | packages/frontend/editor-ui/src/components/NodeDetailsView.vue |
NodeSettingsTabs.vue | Renders the tabbed navigation (e.g., Parameters, Input, Output, Settings) and controls which panel is currently visible. | packages/frontend/editor-ui/src/components/NodeSettingsTabs.vue |
ParameterInput.vue | Renders the individual input fields for a node's parameters. It supports various data types and is responsible for handling data mapping via expressions. | packages/frontend/editor-ui/src/components/ParameterInput.vue |
VirtualSchema.vue | Displays the input and output data of a node in a structured, hierarchical tree view. It is used in the "Input" and "Output" tabs. | packages/frontend/editor-ui/src/components/VirtualSchema.test.ts |
State Management
The state for the Node Details View is managed by a dedicated Pinia store, defined in ndv.store.ts. This store centralizes the state related to the active node, user interactions within the NDV, and telemetry data.
ndv.store.ts
Key state properties managed by the NDV store include:
activeNodeName: The name of the currently selected node.isMapping: A boolean flag indicating if the user is currently dragging a data pill for mapping.mappingTelemetry: An object that collects data about the mapping action for telemetry purposes, such as the source view, field name, and node type.ndvNodeInputNumber: A record mapping node names to their input connection numbers.
The store includes actions to setMappingTelemetry when a drag operation starts and resetMappingTelemetry when it ends. This is crucial for tracking user behavior related to data mapping.
Sources: packages/frontend/editor-ui/src/stores/ndv.store.ts, packages/frontend/editor-ui/src/components/VirtualSchema.test.ts:403-412
Data and Schema Display
A critical function of the NDV is to display the data that flows into and out of a node. This is handled by the VirtualSchema.vue component, which provides a rich, interactive visualization of the data structure.
VirtualSchema.vue
The VirtualSchema component is highly adaptive and can render data in several states.
The following sequence diagram shows how VirtualSchema displays data, including the fallback to schema previews if no execution data is available.
The component handles various scenarios to provide the most relevant information to the user:
| Data State | Displayed Content | Source |
|---|---|---|
| Node not executed | A message prompting the user to "Execute previous nodes". | packages/frontend/editor-ui/src/components/VirtualSchema.test.ts:213-217 |
| Execution has empty items | A message stating "No fields - item(s) exist, but they're empty". | packages/frontend/editor-ui/src/components/VirtualSchema.test.ts:281-286 |
| Execution has no items | A message stating "No fields - node executed, but no items were sent on this branch". | packages/frontend/editor-ui/src/components/VirtualSchema.test.ts:289-296 |
| Binary data only | A message directing the user to the 'Binary' tab. | packages/frontend/editor-ui/src/components/VirtualSchema.test.ts:219-229 |
| Deactivated node | The node header is appended with "(Deactivated)". | packages/frontend/editor-ui/src/components/VirtualSchema.test.ts:298-307 |
| Schema Preview available | If no execution data is present, a preview of the expected data structure is shown with a warning that it is a "schema preview". | packages/frontend/editor-ui/src/components/VirtualSchema.test.ts:511-541 |
| Variables and Context | A dedicated, collapsible section displays global variables like $now, $today, $vars, $execution, and $workflow. | packages/frontend/editor-ui/src/components/VirtualSchema.test.ts:543-571 |
UI Persistence
To enhance user experience, several aspects of the NDV's state are persisted in the browser's localStorage. This ensures that the layout and user preferences are remembered between sessions.
The following constants, defined in constants.ts, are used as keys for localStorage.
| Local Storage Key | Description |
|---|---|
N8N_NDV_DIMENSIONS | Stores the dimensions (width/height) of the NDV panel. |
N8N_NDV_INPUT_PANEL_DISPLAY_MODE | Stores the display mode for the input panel (e.g., table, schema). |
N8N_NDV_OUTPUT_PANEL_DISPLAY_MODE | Stores the display mode for the output panel. |
N8N_NDV_PANEL_WIDTH | Stores the width of the NDV panel specifically. |
N8N_EXPERIMENTAL_DOCKED_NODE_SETTINGS | A flag for an experimental feature to dock the node settings. |
Sources: packages/frontend/editor-ui/src/constants.ts:466-478
Experiments
The NDV is subject to A/B testing and feature flagging to trial new UI/UX improvements. A notable experiment is the "NDV UI Overhaul".
029_ndv_ui_overhaul: This experiment introduces significant changes to the user interface of the Node Details View. Its state is checked to conditionally render different layouts or components.
Sources: packages/frontend/editor-ui/src/constants.ts:630-634