mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
chore: Delete credential docs experiment (no-changelog) (#15363)
This commit is contained in:
@@ -15,7 +15,6 @@ import { useI18n } from '@/composables/useI18n';
|
||||
import { useTelemetry } from '@/composables/useTelemetry';
|
||||
import {
|
||||
BUILTIN_CREDENTIALS_DOCS_URL,
|
||||
CREDENTIAL_DOCS_EXPERIMENT,
|
||||
DOCS_DOMAIN,
|
||||
EnterpriseEditionFeature,
|
||||
NEW_ASSISTANT_SESSION_MODAL,
|
||||
@@ -32,9 +31,6 @@ import CopyInput from '../CopyInput.vue';
|
||||
import CredentialInputs from './CredentialInputs.vue';
|
||||
import GoogleAuthButton from './GoogleAuthButton.vue';
|
||||
import OauthButton from './OauthButton.vue';
|
||||
import CredentialDocs from './CredentialDocs.vue';
|
||||
import { CREDENTIAL_MARKDOWN_DOCS } from './docs';
|
||||
import { usePostHog } from '@/stores/posthog.store';
|
||||
import { useAssistantStore } from '@/stores/assistant.store';
|
||||
import InlineAskAssistantButton from '@n8n/design-system/components/InlineAskAssistantButton/InlineAskAssistantButton.vue';
|
||||
|
||||
@@ -186,13 +182,6 @@ const assistantAlreadyAsked = computed<boolean>(() => {
|
||||
return assistantStore.isCredTypeActive(props.credentialType);
|
||||
});
|
||||
|
||||
const docs = computed(() => CREDENTIAL_MARKDOWN_DOCS[props.credentialType.name]);
|
||||
const showCredentialDocs = computed(
|
||||
() =>
|
||||
usePostHog().getVariant(CREDENTIAL_DOCS_EXPERIMENT.name) ===
|
||||
CREDENTIAL_DOCS_EXPERIMENT.variant && docs.value,
|
||||
);
|
||||
|
||||
function onDataChange(event: IUpdateInformation): void {
|
||||
emit('update', event);
|
||||
}
|
||||
@@ -304,10 +293,7 @@ watch(showOAuthSuccessBanner, (newValue, oldValue) => {
|
||||
/>
|
||||
|
||||
<template v-if="credentialPermissions.update">
|
||||
<n8n-notice
|
||||
v-if="documentationUrl && credentialProperties.length && !showCredentialDocs"
|
||||
theme="warning"
|
||||
>
|
||||
<n8n-notice v-if="documentationUrl && credentialProperties.length" theme="warning">
|
||||
{{ i18n.baseText('credentialEdit.credentialConfig.needHelpFillingOutTheseFields') }}
|
||||
<span class="ml-4xs">
|
||||
<n8n-link :to="documentationUrl" size="small" bold @click="onDocumentationUrlClick">
|
||||
@@ -395,14 +381,6 @@ watch(showOAuthSuccessBanner, (newValue, oldValue) => {
|
||||
</template>
|
||||
</EnterpriseEdition>
|
||||
</div>
|
||||
<CredentialDocs
|
||||
v-if="showCredentialDocs"
|
||||
:credential-type="credentialType"
|
||||
:documentation-url="documentationUrl"
|
||||
:docs="docs"
|
||||
:class="$style.docs"
|
||||
>
|
||||
</CredentialDocs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -414,18 +392,6 @@ watch(showOAuthSuccessBanner, (newValue, oldValue) => {
|
||||
> * {
|
||||
margin-bottom: var(--spacing-l);
|
||||
}
|
||||
|
||||
&:has(+ .docs) {
|
||||
padding-right: 320px;
|
||||
}
|
||||
}
|
||||
|
||||
.docs {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
top: 0;
|
||||
max-width: 320px;
|
||||
}
|
||||
|
||||
.googleReconnectLabel {
|
||||
|
||||
@@ -1,160 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import Feedback from '@/components/Feedback.vue';
|
||||
import { useI18n } from '@/composables/useI18n';
|
||||
import { useTelemetry } from '@/composables/useTelemetry';
|
||||
import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
import type { ICredentialType } from 'n8n-workflow';
|
||||
import { ref } from 'vue';
|
||||
import VueMarkdown from 'vue-markdown-render';
|
||||
|
||||
type Props = {
|
||||
credentialType: ICredentialType;
|
||||
docs: string;
|
||||
documentationUrl: string;
|
||||
};
|
||||
|
||||
const props = defineProps<Props>();
|
||||
|
||||
const workflowsStore = useWorkflowsStore();
|
||||
|
||||
const i18n = useI18n();
|
||||
const telemetry = useTelemetry();
|
||||
|
||||
const submittedFeedback = ref<'positive' | 'negative'>();
|
||||
|
||||
function onFeedback(feedback: 'positive' | 'negative') {
|
||||
submittedFeedback.value = feedback;
|
||||
telemetry.track('User gave feedback on credential docs', {
|
||||
feedback,
|
||||
docs_link: props.documentationUrl,
|
||||
credential_type: props.credentialType.name,
|
||||
workflow_id: workflowsStore.workflowId,
|
||||
});
|
||||
}
|
||||
|
||||
function onDocumentationUrlClick(): void {
|
||||
telemetry.track('User clicked credential modal docs link', {
|
||||
docs_link: props.documentationUrl,
|
||||
credential_type: props.credentialType.name,
|
||||
source: 'modal-docs-sidebar',
|
||||
workflow_id: workflowsStore.workflowId,
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div :class="$style.docs">
|
||||
<div :class="$style.header">
|
||||
<p :class="$style.title">{{ i18n.baseText('credentialEdit.credentialEdit.setupGuide') }}</p>
|
||||
<n8n-link
|
||||
:class="$style.docsLink"
|
||||
theme="text"
|
||||
new-window
|
||||
:to="documentationUrl"
|
||||
@click="onDocumentationUrlClick"
|
||||
>
|
||||
{{ i18n.baseText('credentialEdit.credentialEdit.docs') }}
|
||||
<n8n-icon icon="external-link-alt" size="small" :class="$style.externalIcon" />
|
||||
</n8n-link>
|
||||
</div>
|
||||
<VueMarkdown :source="docs" :options="{ html: true }" :class="$style.markdown" />
|
||||
<Feedback
|
||||
:class="$style.feedback"
|
||||
:model-value="submittedFeedback"
|
||||
@update:model-value="onFeedback"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" module>
|
||||
.docs {
|
||||
background-color: var(--color-background-light);
|
||||
border-left: var(--border-base);
|
||||
padding: var(--spacing-s);
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: var(--font-size-m);
|
||||
font-weight: var(--font-weight-bold);
|
||||
}
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
gap: var(--spacing-2xs);
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: var(--border-base);
|
||||
padding-bottom: var(--spacing-s);
|
||||
margin-bottom: var(--spacing-s);
|
||||
}
|
||||
|
||||
.docsLink {
|
||||
color: var(--color-text-light);
|
||||
|
||||
&:hover .externalIcon {
|
||||
color: var(--color-primary);
|
||||
}
|
||||
}
|
||||
|
||||
.externalIcon {
|
||||
color: var(--color-text-light);
|
||||
padding-left: var(--spacing-4xs);
|
||||
}
|
||||
|
||||
.feedback {
|
||||
border-top: var(--border-base);
|
||||
padding-top: var(--spacing-s);
|
||||
margin-top: var(--spacing-s);
|
||||
}
|
||||
|
||||
.markdown {
|
||||
color: var(--color-text-base);
|
||||
font-size: var(--font-size-xs);
|
||||
line-height: var(--font-line-height-xloose);
|
||||
|
||||
h2 {
|
||||
font-size: var(--font-size-s);
|
||||
color: var(--color-text-base);
|
||||
font-weight: var(--font-weight-bold);
|
||||
margin-top: var(--spacing-s);
|
||||
margin-bottom: var(--spacing-2xs);
|
||||
}
|
||||
|
||||
ul,
|
||||
ol {
|
||||
margin: var(--spacing-2xs) 0;
|
||||
margin-left: var(--spacing-m);
|
||||
}
|
||||
|
||||
ol ol {
|
||||
list-style-type: lower-alpha;
|
||||
}
|
||||
|
||||
li > ul,
|
||||
li > ol {
|
||||
margin: var(--spacing-4xs) 0;
|
||||
margin-left: var(--spacing-xs);
|
||||
}
|
||||
|
||||
li + li {
|
||||
margin-top: var(--spacing-4xs);
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--color-text-base);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
p {
|
||||
line-height: var(--font-line-height-xloose);
|
||||
margin-bottom: var(--spacing-2xs);
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
padding: var(--spacing-4xs) 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +0,0 @@
|
||||
import { i18n } from '../../plugins/i18n';
|
||||
|
||||
export const CREDENTIAL_MARKDOWN_DOCS: Record<string, string> = {
|
||||
aws: i18n.baseText('credentialEdit.docs.aws'),
|
||||
gmailOAuth2: i18n.baseText('credentialEdit.docs.gmailOAuth2'),
|
||||
openAiApi: i18n.baseText('credentialEdit.docs.openAiApi'),
|
||||
};
|
||||
Reference in New Issue
Block a user