feat(editor): Show expression infobox on hover and cursor position (#9507)

Co-authored-by: Giulio Andreini <andreini@netseven.it>
This commit is contained in:
Elias Meire
2024-05-28 16:58:44 +02:00
committed by GitHub
parent ac4e0fbb47
commit ec0373f666
14 changed files with 658 additions and 137 deletions

View File

@@ -20,6 +20,7 @@ import { removeExpressionPrefix } from '@/utils/expressions';
import { createEventBus, type EventBus } from 'n8n-design-system/utils';
import type { IDataObject } from 'n8n-workflow';
import { inputTheme } from './theme';
import { infoBoxTooltips } from '@/plugins/codemirror/tooltips/InfoBoxTooltip';
type Props = {
modelValue: string;
@@ -56,6 +57,7 @@ const extensions = computed(() => [
history(),
expressionInputHandler(),
EditorView.lineWrapping,
infoBoxTooltips(),
]);
const editorValue = ref<string>(removeExpressionPrefix(props.modelValue));
const {
@@ -138,7 +140,12 @@ onBeforeUnmount(() => {
</script>
<template>
<div ref="root" :class="$style.editor" data-test-id="inline-expression-editor-input"></div>
<div
ref="root"
title=""
:class="$style.editor"
data-test-id="inline-expression-editor-input"
></div>
</template>
<style lang="scss" module>