feat(editor): Show expression infobox on hover and cursor position (#9507)
Co-authored-by: Giulio Andreini <andreini@netseven.it>
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import {
|
||||
computed,
|
||||
type MaybeRefOrGetter,
|
||||
onBeforeUnmount,
|
||||
onMounted,
|
||||
ref,
|
||||
watchEffect,
|
||||
type Ref,
|
||||
toValue,
|
||||
watch,
|
||||
onMounted,
|
||||
watchEffect,
|
||||
type MaybeRefOrGetter,
|
||||
type Ref,
|
||||
} from 'vue';
|
||||
|
||||
import { ensureSyntaxTree } from '@codemirror/language';
|
||||
@@ -19,6 +19,8 @@ import { useNDVStore } from '@/stores/ndv.store';
|
||||
|
||||
import type { TargetItem } from '@/Interface';
|
||||
import { useWorkflowHelpers } from '@/composables/useWorkflowHelpers';
|
||||
import { highlighter } from '@/plugins/codemirror/resolvableHighlighter';
|
||||
import { closeCursorInfoBox } from '@/plugins/codemirror/tooltips/InfoBoxTooltip';
|
||||
import type { Html, Plaintext, RawSegment, Resolvable, Segment } from '@/types/expressions';
|
||||
import {
|
||||
getExpressionErrorMessage,
|
||||
@@ -28,16 +30,15 @@ import {
|
||||
import { closeCompletion, completionStatus } from '@codemirror/autocomplete';
|
||||
import {
|
||||
Compartment,
|
||||
EditorState,
|
||||
type SelectionRange,
|
||||
type Extension,
|
||||
EditorSelection,
|
||||
EditorState,
|
||||
type Extension,
|
||||
type SelectionRange,
|
||||
} from '@codemirror/state';
|
||||
import { EditorView, type ViewUpdate } from '@codemirror/view';
|
||||
import { debounce, isEqual } from 'lodash-es';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useI18n } from '../composables/useI18n';
|
||||
import { highlighter } from '../plugins/codemirror/resolvableHighlighter';
|
||||
import { useWorkflowsStore } from '../stores/workflows.store';
|
||||
import { useAutocompleteTelemetry } from './useAutocompleteTelemetry';
|
||||
|
||||
@@ -163,6 +164,7 @@ export const useExpressionEditor = ({
|
||||
if (editor.value) {
|
||||
editor.value.contentDOM.blur();
|
||||
closeCompletion(editor.value);
|
||||
closeCursorInfoBox(editor.value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user