From e531c696efcbb8c7a45b0253231be7f1dc21622a Mon Sep 17 00:00:00 2001 From: Giulio Andreini Date: Thu, 16 May 2024 15:07:05 +0200 Subject: [PATCH 1/4] New NDV header tabs grouping. --- .../src/components/N8nTabs/Tabs.vue | 1 + .../src/components/NodeSettingsTabs.vue | 25 +++++++++---------- .../src/plugins/i18n/locales/en.json | 1 + 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/packages/design-system/src/components/N8nTabs/Tabs.vue b/packages/design-system/src/components/N8nTabs/Tabs.vue index 7c5ba0cfb5d5a..224c8e6fa9c40 100644 --- a/packages/design-system/src/components/N8nTabs/Tabs.vue +++ b/packages/design-system/src/components/N8nTabs/Tabs.vue @@ -181,6 +181,7 @@ const scrollRight = () => scroll(50); .external { display: none; + margin-left: var(--spacing-5xs); } .button { diff --git a/packages/editor-ui/src/components/NodeSettingsTabs.vue b/packages/editor-ui/src/components/NodeSettingsTabs.vue index 741cd43ab3f69..98ef63994bd06 100644 --- a/packages/editor-ui/src/components/NodeSettingsTabs.vue +++ b/packages/editor-ui/src/components/NodeSettingsTabs.vue @@ -94,13 +94,10 @@ export default defineComponent({ value: 'params', }, ]; - if (this.documentationUrl) { - options.push({ - label: this.$locale.baseText('nodeSettings.docs'), - value: 'docs', - href: this.documentationUrl, - }); - } + options.push({ + label: this.$locale.baseText('nodeSettings.settings'), + value: 'settings', + }); if (this.isCommunityNode) { options.push({ icon: 'cube', @@ -114,13 +111,15 @@ export default defineComponent({ }), }); } - // If both tabs have align right, both will have excessive left margin const pushCogRight = this.isCommunityNode ? false : true; - options.push({ - icon: 'cog', - value: 'settings', - align: pushCogRight ? 'right' : undefined, - }); + if (this.documentationUrl) { + options.push({ + label: this.$locale.baseText('nodeSettings.docs'), + value: 'docs', + href: this.documentationUrl, + align: pushCogRight ? 'right' : undefined, + }); + } return options; }, diff --git a/packages/editor-ui/src/plugins/i18n/locales/en.json b/packages/editor-ui/src/plugins/i18n/locales/en.json index b9d7715da8d7a..7d4cfcc768e34 100644 --- a/packages/editor-ui/src/plugins/i18n/locales/en.json +++ b/packages/editor-ui/src/plugins/i18n/locales/en.json @@ -1122,6 +1122,7 @@ "nodeSettings.notesInFlow.description": "If active, the note above will display in the flow as a subtitle", "nodeSettings.notesInFlow.displayName": "Display Note in Flow?", "nodeSettings.parameters": "Parameters", + "nodeSettings.settings": "Settings", "nodeSettings.communityNodeTooltip": "This is a community node", "nodeSettings.retryOnFail.description": "If active, the node tries to execute again when it fails", "nodeSettings.retryOnFail.displayName": "Retry On Fail", From 097f3c08d54b1b56f7b31df59d217ad31e3070c4 Mon Sep 17 00:00:00 2001 From: Elias Meire Date: Thu, 16 May 2024 17:10:37 +0200 Subject: [PATCH 2/4] Finish new NDV header tabs --- .../components/N8nInputLabel/InputLabel.vue | 8 +- .../src/components/N8nTabs/Tabs.vue | 17 +- .../editor-ui/src/components/NodeSettings.vue | 120 ++++---- .../src/components/NodeSettingsTabs.vue | 277 +++++++++--------- 4 files changed, 223 insertions(+), 199 deletions(-) diff --git a/packages/design-system/src/components/N8nInputLabel/InputLabel.vue b/packages/design-system/src/components/N8nInputLabel/InputLabel.vue index 2223ebd6cf605..a2b397aa0c7fb 100644 --- a/packages/design-system/src/components/N8nInputLabel/InputLabel.vue +++ b/packages/design-system/src/components/N8nInputLabel/InputLabel.vue @@ -22,7 +22,7 @@ v-if="tooltipText && label" :class="[$style.infoIcon, showTooltip ? $style.visible : $style.hidden]" > - +