feat(editor): Unify regular and trigger node creator panels (#5315)

* WIP: Merge TriggerHelperPanel with MainPanel

* WIP: Implement switching between views

* Remove logging

* WIP: Rework search

* Fix category toggling and search results display

* Fix node item description

* Sort actions based on the root view

* Adjust personalisation modal, make trigger canvas node round

* Linting fixes

* Fix filtering of API options

* Fix types and no result state

* Cleanup

* Linting fixes

* Adjust mode prop for node creator tracking

* Fix merging of core nodes and filtering of single placeholder actions

* Lint fixes

* Implement actions override, fix node creator view item spacing and increase click radius of trigger node icon

* Fix keyboard view navigation

* WIP: E2E Tests

* Address product review

* Minor fixes & cleanup

* Fix tests

* Some more test fixes

* Add specs to check actions and panels

* Update personalisation survey snapshot
This commit is contained in:
OlegIvaniv
2023-02-17 15:08:26 +01:00
committed by GitHub
parent 561882f599
commit 9a1e7b52f7
49 changed files with 1187 additions and 1339 deletions

View File

@@ -1,12 +1,8 @@
<template>
<Modal
:name="PERSONALIZATION_MODAL_KEY"
:title="
!submitted
? $locale.baseText('personalizationModal.customizeN8n')
: $locale.baseText('personalizationModal.thanks')
"
:subtitle="!submitted ? $locale.baseText('personalizationModal.theseQuestionsHelpUs') : ''"
:title="$locale.baseText('personalizationModal.customizeN8n')"
:subtitle="$locale.baseText('personalizationModal.theseQuestionsHelpUs')"
:centerTitle="true"
:showClose="false"
:eventBus="modalBus"
@@ -17,11 +13,7 @@
@enter="onSave"
>
<template #content>
<div v-if="submitted" :class="$style.submittedContainer">
<img :class="$style.demoImage" :src="rootStore.baseUrl + 'suggestednodes.png'" />
<n8n-text>{{ $locale.baseText('personalizationModal.lookOutForThingsMarked') }}</n8n-text>
</div>
<div :class="$style.container" v-else>
<div :class="$style.container">
<n8n-form-inputs
:inputs="survey"
:columnView="true"
@@ -33,16 +25,9 @@
<template #footer>
<div>
<n8n-button
v-if="submitted"
@click="closeDialog"
:label="$locale.baseText('personalizationModal.getStarted')"
float="right"
/>
<n8n-button
v-else
@click="onSave"
:loading="isSaving"
:label="$locale.baseText('personalizationModal.continue')"
:label="$locale.baseText('personalizationModal.getStarted')"
float="right"
/>
</div>
@@ -156,7 +141,6 @@ export default mixins(showMessage, workflowHelpers).extend({
name: 'PersonalizationModal',
data() {
return {
submitted: false,
isSaving: false,
PERSONALIZATION_MODAL_KEY,
otherWorkAreaFieldVisible: false,
@@ -646,12 +630,12 @@ export default mixins(showMessage, workflowHelpers).extend({
}
await this.fetchOnboardingPrompt();
this.submitted = true;
} catch (e) {
this.$showError(e, 'Error while submitting results');
}
this.$data.isSaving = false;
this.closeDialog();
},
async fetchOnboardingPrompt() {
if (
@@ -695,17 +679,4 @@ export default mixins(showMessage, workflowHelpers).extend({
margin-bottom: var(--spacing-m);
}
}
.submittedContainer {
* {
margin-bottom: var(--spacing-2xs);
}
}
.demoImage {
border-radius: var(--border-radius-large);
border: var(--border-base);
width: 100%;
height: 140px;
}
</style>