From 171f5a458cce96923f5fb4b46ab19d262cf60478 Mon Sep 17 00:00:00 2001 From: Mutasem Aldmour <4711238+mutdmour@users.noreply.github.com> Date: Wed, 27 Oct 2021 21:55:37 +0200 Subject: [PATCH 1/3] :zap: Update parameter inputs to be multi-line (#2299) * introduce analytics * add user survey backend * add user survey backend * set answers on survey submit Co-authored-by: Mutasem Aldmour <4711238+mutdmour@users.noreply.github.com> * change name to personalization * lint Co-authored-by: Mutasem Aldmour <4711238+mutdmour@users.noreply.github.com> * N8n 2495 add personalization modal (#2280) * update modals * add onboarding modal * implement questions * introduce analytics * simplify impl * implement survey handling * add personalized cateogry * update modal behavior * add thank you view * handle empty cases * rename modal * standarize modal names * update image, add tags to headings * remove unused file * remove unused interfaces * clean up footer spacing * introduce analytics * refactor to fix bug * update endpoint * set min height * update stories * update naming from questions to survey * remove spacing after core categories * fix bug in logic * sort nodes * rename types * merge with be * rename userSurvey * clean up rest api * use constants for keys * use survey keys * clean up types * move personalization to its own file Co-authored-by: ahsan-virani * update parameter inputs to be multiline * update spacing * Survey new options (#2300) * split up options * fix quotes * remove unused import * refactor node credentials * add user created workflow event (#2301) * update multi params * simplify env vars * fix versionCli on FE * update personalization env * clean up node detail settings * fix event User opened Credentials panel * fix font sizes across modals * clean up input spacing * fix select modal spacing * increase spacing * fix input copy * fix webhook, tab spacing, retry button * fix button sizes * fix button size * add mini xlarge sizes * fix webhook spacing * fix nodes panel event * fix workflow id in workflow execute event * improve telemetry error logging * fix config and stop process events * add flush call on n8n stop * ready for release * fix input error highlighting * revert change * update toggle spacing * fix delete positioning * keep tooltip while focused * set strict size * increase left spacing * fix sort icons * remove unnessary margin * clean unused functionality * remove unnessary css * remove duplicate tracking * only show tooltip when hovering over label * update credentials section * use includes Co-authored-by: ahsan-virani Co-authored-by: Jan Oberhauser --- .../components/N8nButton/Button.stories.js | 8 +- .../src/components/N8nButton/Button.vue | 9 +- .../src/components/N8nButton/index.d.ts | 3 - .../src/components/N8nIcon/Icon.vue | 44 ++--- .../components/N8nIconButton/IconButton.vue | 11 +- .../src/components/N8nIconButton/index.d.ts | 3 - .../components/N8nInputLabel/InputLabel.vue | 96 +++++++++-- .../src/components/N8nText/Text.vue | 27 ++- .../src/components/component.d.ts | 2 +- packages/design-system/theme/src/button.scss | 22 +++ packages/design-system/theme/src/dialog.scss | 2 - packages/design-system/theme/src/tabs.scss | 2 +- packages/editor-ui/src/components/About.vue | 1 + .../editor-ui/src/components/CodeEdit.vue | 20 +-- .../src/components/CollectionParameter.vue | 10 +- .../editor-ui/src/components/CopyInput.vue | 1 + .../CredentialEdit/CredentialEdit.vue | 2 +- .../CredentialEdit/CredentialInfo.vue | 14 +- .../src/components/CredentialsList.vue | 4 +- .../editor-ui/src/components/DataDisplay.vue | 2 +- .../src/components/ExecutionsList.vue | 12 +- .../src/components/ExpressionEdit.vue | 1 + .../components/FixedCollectionParameter.vue | 68 ++++---- .../src/components/MultipleParameter.vue | 74 ++++----- .../src/components/NodeCredentials.vue | 156 +++++++----------- .../editor-ui/src/components/NodeSettings.vue | 26 ++- .../editor-ui/src/components/NodeWebhooks.vue | 20 +-- .../src/components/ParameterInput.vue | 17 +- .../src/components/ParameterInputExpanded.vue | 14 +- .../src/components/ParameterInputFull.vue | 94 +++-------- .../src/components/ParameterInputList.vue | 87 +++++----- packages/editor-ui/src/components/RunData.vue | 23 +-- .../editor-ui/src/components/TextEdit.vue | 20 +-- .../src/components/WorkflowSettings.vue | 1 + packages/editor-ui/src/components/helpers.ts | 6 - 35 files changed, 443 insertions(+), 459 deletions(-) diff --git a/packages/design-system/src/components/N8nButton/Button.stories.js b/packages/design-system/src/components/N8nButton/Button.stories.js index 504ea1af38..4958f85de5 100644 --- a/packages/design-system/src/components/N8nButton/Button.stories.js +++ b/packages/design-system/src/components/N8nButton/Button.stories.js @@ -18,7 +18,7 @@ export default { size: { control: { type: 'select', - options: ['small', 'medium', 'large'], + options: ['mini', 'small', 'medium', 'large', 'xlarge'], }, }, loading: { @@ -31,12 +31,6 @@ export default { type: 'text', }, }, - iconSize: { - control: { - type: 'select', - options: ['small', 'medium', 'large'], - }, - }, circle: { control: { type: 'boolean', diff --git a/packages/design-system/src/components/N8nButton/Button.vue b/packages/design-system/src/components/N8nButton/Button.vue index 2827b8f8b7..ff8d78b407 100644 --- a/packages/design-system/src/components/N8nButton/Button.vue +++ b/packages/design-system/src/components/N8nButton/Button.vue @@ -16,13 +16,13 @@ {{ props.label }} @@ -58,7 +58,7 @@ export default { type: String, default: 'medium', validator: (value: string): boolean => - ['small', 'medium', 'large'].indexOf(value) !== -1, + ['mini', 'small', 'medium', 'large', 'xlarge'].indexOf(value) !== -1, }, loading: { type: Boolean, @@ -71,9 +71,6 @@ export default { icon: { type: String, }, - iconSize: { - type: String, - }, round: { type: Boolean, default: true, diff --git a/packages/design-system/src/components/N8nButton/index.d.ts b/packages/design-system/src/components/N8nButton/index.d.ts index b70b0b8418..ad6c9e62b9 100644 --- a/packages/design-system/src/components/N8nButton/index.d.ts +++ b/packages/design-system/src/components/N8nButton/index.d.ts @@ -35,9 +35,6 @@ export declare class N8nButton extends N8nComponent { /** Button icon, accepts an icon name of font awesome icon component */ icon: string; - /** Size of icon */ - iconSize: N8nComponentSize; - /** Full width */ fullWidth: boolean; diff --git a/packages/design-system/src/components/N8nIcon/Icon.vue b/packages/design-system/src/components/N8nIcon/Icon.vue index 52457db0ac..8ffe65edec 100644 --- a/packages/design-system/src/components/N8nIcon/Icon.vue +++ b/packages/design-system/src/components/N8nIcon/Icon.vue @@ -1,19 +1,27 @@ + diff --git a/packages/design-system/src/components/N8nIconButton/IconButton.vue b/packages/design-system/src/components/N8nIconButton/IconButton.vue index 6064ca4a53..513c829f00 100644 --- a/packages/design-system/src/components/N8nIconButton/IconButton.vue +++ b/packages/design-system/src/components/N8nIconButton/IconButton.vue @@ -2,11 +2,10 @@ import N8nButton from '../N8nButton'; -const iconSizeMap = { - large: 'medium', - xlarge: 'large', -}; - export default { name: 'n8n-icon-button', components: { @@ -36,8 +30,6 @@ export default { size: { type: String, default: 'medium', - validator: (value: string): boolean => - ['small', 'medium', 'large', 'xlarge'].indexOf(value) !== -1, }, loading: { type: Boolean, @@ -55,6 +47,5 @@ export default { type: String, }, }, - iconSizeMap, }; diff --git a/packages/design-system/src/components/N8nIconButton/index.d.ts b/packages/design-system/src/components/N8nIconButton/index.d.ts index d939a7e040..46ab70c572 100644 --- a/packages/design-system/src/components/N8nIconButton/index.d.ts +++ b/packages/design-system/src/components/N8nIconButton/index.d.ts @@ -12,9 +12,6 @@ export declare class N8nIconButton extends N8nComponent { /** Button size */ size: N8nComponentSize | 'xlarge'; - /** icon size */ - iconSize: N8nComponentSize; - /** Determine whether it's loading */ loading: boolean; diff --git a/packages/design-system/src/components/N8nInputLabel/InputLabel.vue b/packages/design-system/src/components/N8nInputLabel/InputLabel.vue index a5213ca1aa..a3bc71899a 100644 --- a/packages/design-system/src/components/N8nInputLabel/InputLabel.vue +++ b/packages/design-system/src/components/N8nInputLabel/InputLabel.vue @@ -1,13 +1,13 @@