test(editor): Add first frontend unit-test and update notice component design (#3166)

*  Added basic Vue 2 + Vite.js setup.

* 🚧 Improved typescript support.

*  Added N8nNotice component to design system with stories and unit tests.

*  Migrated design system build to Vite.js.

* ♻️ Updated typescript definitions. Moved some interface types to remove reliance from design system on editor-ui user and validation types.

* ♻️ Changed prop name from type to theme. Updated truncation props.

* ♻️ Moved user response types back. Added n8n-notice component to editor-ui.

* 🐛 Fixed global vitest types.

*  Added this. vue type extension to editor-ui

* ♻️ Removed circular import.

*  Fixed failing n8n-notice tests.

* feat: Added support for notice truncation via typeOptions.

*  Updated warning color variables and notice warning colors.

* 🐛 Fixed n8n-notice parameter input spacing.
This commit is contained in:
Alex Grozav
2022-04-29 16:23:41 +03:00
committed by GitHub
parent 69d6b7827f
commit 0a69a9eb9c
72 changed files with 17738 additions and 21353 deletions

View File

@@ -14,11 +14,13 @@
/>
</div>
<div v-else-if="parameter.type === 'notice'" class="parameter-item parameter-notice">
<n8n-text size="small">
<span v-html="$locale.nodeText().inputLabelDisplayName(parameter, path)"></span>
</n8n-text>
</div>
<n8n-notice
v-else-if="parameter.type === 'notice'"
class="parameter-item"
:content="$locale.nodeText().inputLabelDisplayName(parameter, path)"
:truncate="parameter.typeOptions && parameter.typeOptions.truncate"
:truncate-at="parameter.typeOptions && parameter.typeOptions.truncateAt"
/>
<div
v-else-if="['collection', 'fixedCollection'].includes(parameter.type)"