fix(editor): Hide data mapping tooltip in credential edit modal (#11356)

This commit is contained in:
Elias Meire 2024-10-24 14:22:15 +02:00 committed by GitHub
parent 656439e871
commit ff14dcb3a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 8 deletions

View file

@ -1,13 +1,13 @@
<script setup lang="ts">
import { useI18n } from '@/composables/useI18n';
import { useNDVStore } from '@/stores/ndv.store';
import { computed, onBeforeUnmount, ref, watch } from 'vue';
import { EditorSelection, EditorState, type SelectionRange } from '@codemirror/state';
import { type Completion, CompletionContext } from '@codemirror/autocomplete';
import { datatypeCompletions } from '@/plugins/codemirror/completions/datatype.completions';
import { watchDebounced } from '@vueuse/core';
import { FIELDS_SECTION } from '@/plugins/codemirror/completions/constants';
import { datatypeCompletions } from '@/plugins/codemirror/completions/datatype.completions';
import { isCompletionSection } from '@/plugins/codemirror/completions/utils';
import { useNDVStore } from '@/stores/ndv.store';
import { type Completion, CompletionContext } from '@codemirror/autocomplete';
import { EditorSelection, EditorState, type SelectionRange } from '@codemirror/state';
import { watchDebounced } from '@vueuse/core';
import { computed, onBeforeUnmount, ref, watch } from 'vue';
type TipId = 'executePrevious' | 'drag' | 'default' | 'dotObject' | 'dotPrimitive';
@ -36,7 +36,11 @@ const canDragToFocusedInput = computed(
const emptyExpression = computed(() => props.unresolvedExpression.trim().length === 0);
const tip = computed<TipId>(() => {
if (!ndvStore.hasInputData && ndvStore.isInputParentOfActiveNode) {
if (
!ndvStore.hasInputData &&
ndvStore.isInputParentOfActiveNode &&
ndvStore.focusedMappableInput
) {
return 'executePrevious';
}

View file

@ -539,7 +539,8 @@ const showDragnDropTip = computed(
!isDropDisabled.value &&
(!ndvStore.hasInputData || !isInputDataEmpty.value) &&
!ndvStore.isMappingOnboarded &&
ndvStore.isInputParentOfActiveNode,
ndvStore.isInputParentOfActiveNode &&
!props.isForCredential,
);
const shouldCaptureForPosthog = computed(() => {