From e8710a5f343de7569eeb299c8f24328595e6320c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Mon, 20 Dec 2021 18:06:17 +0100 Subject: [PATCH 1/4] :zap: Make subcategory render keys consistent --- .../src/components/NodeCreator/SubcategoryItem.vue | 4 ++-- packages/editor-ui/src/plugins/i18n/locales/en.json | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/editor-ui/src/components/NodeCreator/SubcategoryItem.vue b/packages/editor-ui/src/components/NodeCreator/SubcategoryItem.vue index 547de84dea14e..0a5f22267e9e2 100644 --- a/packages/editor-ui/src/components/NodeCreator/SubcategoryItem.vue +++ b/packages/editor-ui/src/components/NodeCreator/SubcategoryItem.vue @@ -25,8 +25,8 @@ export default Vue.extend({ return camelcase(this.item.properties.subcategory); }, subcategoryDescription() { - const firstWord = this.item.properties.description.split(' ').shift() || ''; - return firstWord.toLowerCase().replace(/,/g, ''); + const subcategory = this.item.key.split('_').pop(); + return camelcase(subcategory); }, }, }); diff --git a/packages/editor-ui/src/plugins/i18n/locales/en.json b/packages/editor-ui/src/plugins/i18n/locales/en.json index dd979ce8e9339..0efb191067857 100644 --- a/packages/editor-ui/src/plugins/i18n/locales/en.json +++ b/packages/editor-ui/src/plugins/i18n/locales/en.json @@ -422,10 +422,10 @@ "searchNodes": "Search nodes..." }, "subcategoryDescriptions": { - "branches": "Branches, core triggers, merge data", - "http": "HTTP Requests (API calls), date and time, scrape HTML", - "manipulate": "Manipulate data fields, run code", - "work": "Work with CSV, XML, text, images etc." + "dataTransformation": "Manipulate data fields, run code", + "files": "Work with CSV, XML, text, images etc.", + "flow": "Branches, core triggers, merge data", + "helpers": "HTTP Requests (API calls), date and time, scrape HTML" }, "subcategoryNames": { "dataTransformation": "Data Transformation", From b49d87199eab66b56f8d4c32480dba628e95b173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Mon, 20 Dec 2021 18:08:15 +0100 Subject: [PATCH 2/4] :zap: Add missing or key --- packages/editor-ui/src/components/NodeCreator/NoResults.vue | 2 +- packages/editor-ui/src/plugins/i18n/locales/en.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/editor-ui/src/components/NodeCreator/NoResults.vue b/packages/editor-ui/src/components/NodeCreator/NoResults.vue index 42b156e5e36d6..3616a58ff73bf 100644 --- a/packages/editor-ui/src/components/NodeCreator/NoResults.vue +++ b/packages/editor-ui/src/components/NodeCreator/NoResults.vue @@ -9,7 +9,7 @@
{{ $locale.baseText('nodeCreator.noResults.dontWorryYouCanProbablyDoItWithThe') }} - {{ $locale.baseText('nodeCreator.noResults.httpRequest') }} or + {{ $locale.baseText('nodeCreator.noResults.httpRequest') }} {{ $locale.baseText('nodeCreator.noResults.or') }} {{ $locale.baseText('nodeCreator.noResults.webhook') }} {{ $locale.baseText('nodeCreator.noResults.node') }}
diff --git a/packages/editor-ui/src/plugins/i18n/locales/en.json b/packages/editor-ui/src/plugins/i18n/locales/en.json index 0efb191067857..11e03c0a9470d 100644 --- a/packages/editor-ui/src/plugins/i18n/locales/en.json +++ b/packages/editor-ui/src/plugins/i18n/locales/en.json @@ -413,6 +413,7 @@ "dontWorryYouCanProbablyDoItWithThe": "Don’t worry, you can probably do it with the", "httpRequest": "HTTP Request", "node": "node", + "or": "or", "requestTheNode": "Request the node", "wantUsToMakeItFaster": "Want us to make it faster?", "weDidntMakeThatYet": "We didn't make that... yet", From 86ed958ddd1bb27c843cbd5e6b75e2344d17c943 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Mon, 20 Dec 2021 18:36:24 +0100 Subject: [PATCH 3/4] :zap: Fix default text for multiple value button --- packages/editor-ui/src/components/MultipleParameter.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/editor-ui/src/components/MultipleParameter.vue b/packages/editor-ui/src/components/MultipleParameter.vue index a3b0ea4b3340e..f06e17df603e7 100644 --- a/packages/editor-ui/src/components/MultipleParameter.vue +++ b/packages/editor-ui/src/components/MultipleParameter.vue @@ -65,8 +65,8 @@ export default mixins(genericHelpers) computed: { addButtonText (): string { if ( - !this.parameter.typeOptions && - !this.parameter.typeOptions.multipleValueButtonText + !this.parameter.typeOptions || + (this.parameter.typeOptions && !this.parameter.typeOptions.multipleValueButtonText) ) { return this.$locale.baseText('multipleParameter.addItem'); } From ab2e03118b975b12fc6c26342dc6b38fbfcf0e6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Tue, 21 Dec 2021 09:42:36 +0100 Subject: [PATCH 4/4] :zap: Simplify subcategory extraction --- .../src/components/NodeCreator/SubcategoryItem.vue | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/editor-ui/src/components/NodeCreator/SubcategoryItem.vue b/packages/editor-ui/src/components/NodeCreator/SubcategoryItem.vue index 0a5f22267e9e2..024ec2434a34e 100644 --- a/packages/editor-ui/src/components/NodeCreator/SubcategoryItem.vue +++ b/packages/editor-ui/src/components/NodeCreator/SubcategoryItem.vue @@ -5,7 +5,7 @@ {{ $locale.baseText(`nodeCreator.subcategoryNames.${subcategoryName}`) }}
- {{ $locale.baseText(`nodeCreator.subcategoryDescriptions.${subcategoryDescription}`) }} + {{ $locale.baseText(`nodeCreator.subcategoryDescriptions.${subcategoryName}`) }}
@@ -24,10 +24,6 @@ export default Vue.extend({ subcategoryName() { return camelcase(this.item.properties.subcategory); }, - subcategoryDescription() { - const subcategory = this.item.key.split('_').pop(); - return camelcase(subcategory); - }, }, });