Skip to content

Commit

Permalink
fix(editor): Resolve vue 3 related console-warnings (#6779)
Browse files Browse the repository at this point in the history
* fix(editor): Resolve vue 3 related console-warnings

Signed-off-by: Oleg Ivaniv <[email protected]>

* Use span as component wrapper instead of div

Signed-off-by: Oleg Ivaniv <[email protected]>

* Wrap popover component in span

Signed-off-by: Oleg Ivaniv <[email protected]>

---------

Signed-off-by: Oleg Ivaniv <[email protected]>
  • Loading branch information
OlegIvaniv committed Aug 3, 2023
1 parent 5140bcd commit 5b81126
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 30 deletions.
14 changes: 8 additions & 6 deletions packages/design-system/src/components/N8nPopover/Popover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ export default defineComponent({
</script>

<template>
<el-popover v-bind="{ ...$props, ...$attrs }">
<template #reference>
<slot name="reference" />
</template>
<slot />
</el-popover>
<span>
<el-popover v-bind="{ ...$props, ...$attrs }">
<template #reference>
<slot name="reference" />
</template>
<slot />
</el-popover>
</span>
</template>
36 changes: 19 additions & 17 deletions packages/editor-ui/src/components/NodeExecuteButton.vue
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
<template>
<n8n-tooltip placement="bottom" :disabled="!disabledHint">
<template #content>
<div>{{ disabledHint }}</div>
</template>
<div>
<n8n-button
v-bind="$attrs"
:loading="nodeRunning && !isListeningForEvents && !isListeningForWorkflowEvents"
:disabled="disabled || !!disabledHint"
:label="buttonLabel"
:type="type"
:size="size"
:transparentBackground="transparent"
@click="onClick"
/>
</div>
</n8n-tooltip>
<span>
<n8n-tooltip placement="bottom" :disabled="!disabledHint">
<template #content>
<div>{{ disabledHint }}</div>
</template>
<div>
<n8n-button
v-bind="$attrs"
:loading="nodeRunning && !isListeningForEvents && !isListeningForWorkflowEvents"
:disabled="disabled || !!disabledHint"
:label="buttonLabel"
:type="type"
:size="size"
:transparentBackground="transparent"
@click="onClick"
/>
</div>
</n8n-tooltip>
</span>
</template>

<script lang="ts">
Expand Down
14 changes: 8 additions & 6 deletions packages/editor-ui/src/components/WarningTooltip.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<template>
<n8n-tooltip content=" " placement="top">
<template #content>
<slot />
</template>
<font-awesome-icon :class="$style['icon']" icon="exclamation-triangle"></font-awesome-icon>
</n8n-tooltip>
<span>
<n8n-tooltip content=" " placement="top">
<template #content>
<slot />
</template>
<font-awesome-icon :class="$style['icon']" icon="exclamation-triangle"></font-awesome-icon>
</n8n-tooltip>
</span>
</template>

<style lang="scss" module>
Expand Down
2 changes: 1 addition & 1 deletion packages/editor-ui/src/plugins/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@
"node.waitingForYouToCreateAnEventIn": "Waiting for you to create an event in {nodeType}",
"node.discovery.pinData.canvas": "You can pin this output instead of waiting for a test event. Open node to do so.",
"node.discovery.pinData.ndv": "You can pin this output instead of waiting for a test event.",
"nodeBase.clickToAddNodeOrDragToConnect": "Click to add node<br />or drag to connect",
"nodeBase.clickToAddNodeOrDragToConnect": "Click to add node \n or drag to connect",
"nodeCreator.actionsPlaceholderNode.scheduleTrigger": "On a Schedule",
"nodeCreator.actionsPlaceholderNode.webhook": "On a Webhook call",
"nodeCreator.actionsCategory.actions": "Actions",
Expand Down

0 comments on commit 5b81126

Please sign in to comment.