diff --git a/packages/frontend/editor-ui/src/components/VirtualSchema.vue b/packages/frontend/editor-ui/src/components/VirtualSchema.vue
index 87e259aeb5..ea6641f8f1 100644
--- a/packages/frontend/editor-ui/src/components/VirtualSchema.vue
+++ b/packages/frontend/editor-ui/src/components/VirtualSchema.vue
@@ -314,7 +314,7 @@ const onDragEnd = (el: HTMLElement) => {
@click="toggleNodeAndScrollTop(item.id)"
/>
{
@click="toggleLeaf(item.id)"
>
+
+
+
+
@@ -347,4 +351,11 @@ const onDragEnd = (el: HTMLElement) => {
text-align: center;
padding: var(--spacing-s) var(--spacing-s) var(--spacing-xl) var(--spacing-s);
}
+
+.icon {
+ display: inline-flex;
+ margin-left: var(--spacing-xl);
+ color: var(--color-text-light);
+ margin-bottom: var(--spacing-s);
+}
diff --git a/packages/frontend/editor-ui/src/components/VirtualSchemaHeader.vue b/packages/frontend/editor-ui/src/components/VirtualSchemaHeader.vue
index 65daae051d..497e040dc7 100644
--- a/packages/frontend/editor-ui/src/components/VirtualSchemaHeader.vue
+++ b/packages/frontend/editor-ui/src/components/VirtualSchemaHeader.vue
@@ -4,8 +4,7 @@ import NodeIcon from '@/components/NodeIcon.vue';
import { type INodeTypeDescription } from 'n8n-workflow';
import { useI18n } from '@/composables/useI18n';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
-import { DATA_EDITING_DOCS_URL } from '@/constants';
-import { N8nNotice } from '@n8n/design-system';
+import { SCHEMA_PREVIEW_DOCS_URL } from '@/constants';
const props = defineProps<{
title: string;
@@ -42,24 +41,28 @@ const emit = defineEmits<{
{{ info }}
-
@@ -893,7 +835,7 @@ exports[`VirtualSchema.vue > renders schema for correct output branch 1`] = `
@@ -1447,7 +1389,7 @@ exports[`VirtualSchema.vue > renders schema with spaces and dots 1`] = `
symbol="false"
/>
diff --git a/packages/frontend/editor-ui/src/composables/useDataSchema.ts b/packages/frontend/editor-ui/src/composables/useDataSchema.ts
index ee4b617cfb..20ab524fb0 100644
--- a/packages/frontend/editor-ui/src/composables/useDataSchema.ts
+++ b/packages/frontend/editor-ui/src/composables/useDataSchema.ts
@@ -261,7 +261,14 @@ export type RenderHeader = {
preview?: boolean;
};
-type Renders = RenderHeader | RenderItem;
+export type RenderIcon = {
+ id: string;
+ type: 'icon';
+ icon: string;
+ tooltip: string;
+};
+
+type Renders = RenderHeader | RenderItem | RenderIcon;
const icons = {
object: 'cube',
@@ -285,13 +292,11 @@ const emptyItem = (): RenderItem => ({
type: 'item',
});
-const dummyItem = (): RenderItem => ({
- id: `dummy-${window.crypto.randomUUID()}`,
- icon: '',
- level: 1,
- title: '...',
- type: 'item',
- preview: true,
+const moreFieldsItem = (): RenderIcon => ({
+ id: `moreFields-${window.crypto.randomUUID()}`,
+ type: 'icon',
+ icon: 'ellipsis-h',
+ tooltip: useI18n().baseText('dataMapping.schemaView.previewExtraFields'),
});
const isDataEmpty = (schema: Schema) => {
@@ -445,7 +450,7 @@ export const useFlattenSchema = () => {
acc.push(...flattenSchema(item));
if (item.preview) {
- acc.push(dummyItem());
+ acc.push(moreFieldsItem());
}
return acc;
diff --git a/packages/frontend/editor-ui/src/constants.ts b/packages/frontend/editor-ui/src/constants.ts
index aefb6d574d..37fad8ca31 100644
--- a/packages/frontend/editor-ui/src/constants.ts
+++ b/packages/frontend/editor-ui/src/constants.ts
@@ -92,6 +92,7 @@ export const BUILTIN_NODES_DOCS_URL = `https://${DOCS_DOMAIN}/integrations/built
export const BUILTIN_CREDENTIALS_DOCS_URL = `https://${DOCS_DOMAIN}/integrations/builtin/credentials/`;
export const DATA_PINNING_DOCS_URL = `https://${DOCS_DOMAIN}/data/data-pinning/`;
export const DATA_EDITING_DOCS_URL = `https://${DOCS_DOMAIN}/data/data-editing/`;
+export const SCHEMA_PREVIEW_DOCS_URL = `https://${DOCS_DOMAIN}/data/schema-preview/`;
export const MFA_DOCS_URL = `https://${DOCS_DOMAIN}/user-management/two-factor-auth/`;
export const NPM_COMMUNITY_NODE_SEARCH_API_URL = 'https://api.npms.io/v2/';
export const NPM_PACKAGE_DOCS_BASE_URL = 'https://www.npmjs.com/package/';
diff --git a/packages/frontend/editor-ui/src/plugins/i18n/locales/en.json b/packages/frontend/editor-ui/src/plugins/i18n/locales/en.json
index 0bce1a0310..579033ebe2 100644
--- a/packages/frontend/editor-ui/src/plugins/i18n/locales/en.json
+++ b/packages/frontend/editor-ui/src/plugins/i18n/locales/en.json
@@ -661,8 +661,9 @@
"dataMapping.schemaView.emptyData": "No fields - item(s) exist, but they're empty",
"dataMapping.schemaView.disabled": "This node is disabled and will just pass data through",
"dataMapping.schemaView.noMatches": "No results for '{search}'",
- "dataMapping.schemaView.preview": "This is a preview of the schema, execute the node to see the exact schema and data. {link}",
- "dataMapping.schemaView.previewNode": "(schema preview)",
+ "dataMapping.schemaView.preview": "Usually outputs the following fields. Execute the node to see the actual ones. {link}",
+ "dataMapping.schemaView.previewExtraFields": "There may be more fields. Execute the node to be sure.",
+ "dataMapping.schemaView.previewNode": "Preview",
"displayWithChange.cancelEdit": "Cancel Edit",
"displayWithChange.clickToChange": "Click to Change",
"displayWithChange.setValue": "Set Value",