Skip to content

Commit

Permalink
fix(editor): Hide data mapping tooltip in credential edit modal (#11356)
Browse files Browse the repository at this point in the history
  • Loading branch information
elsmr authored Oct 24, 2024
1 parent 656439e commit ff14dcb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<script setup lang="ts">
import { useI18n } from '@/composables/useI18n';
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 { 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 { EditorSelection, EditorState, type SelectionRange } from '@codemirror/state';
import { watchDebounced } from '@vueuse/core';
import { FIELDS_SECTION } from '@/plugins/codemirror/completions/constants';
import { isCompletionSection } from '@/plugins/codemirror/completions/utils';
import { computed, onBeforeUnmount, ref, watch } from 'vue';
type TipId = 'executePrevious' | 'drag' | 'default' | 'dotObject' | 'dotPrimitive';
Expand Down Expand Up @@ -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';
}
Expand Down
3 changes: 2 additions & 1 deletion packages/editor-ui/src/components/ParameterInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,8 @@ const showDragnDropTip = computed(
!isDropDisabled.value &&
(!ndvStore.hasInputData || !isInputDataEmpty.value) &&
!ndvStore.isMappingOnboarded &&
ndvStore.isInputParentOfActiveNode,
ndvStore.isInputParentOfActiveNode &&
!props.isForCredential,
);
const shouldCaptureForPosthog = computed(() => {
Expand Down

0 comments on commit ff14dcb

Please sign in to comment.