chore: Delete credential docs experiment (no-changelog) (#15363)

This commit is contained in:
Shireen Missi
2025-05-14 08:12:09 +01:00
committed by GitHub
parent bb2cfc209c
commit aafb08a562
5 changed files with 1 additions and 212 deletions

View File

@@ -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 {

View File

@@ -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>

View File

@@ -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'),
};

View File

@@ -746,12 +746,6 @@ export const KEEP_AUTH_IN_NDV_FOR_NODES = [
export const MAIN_AUTH_FIELD_NAME = 'authentication';
export const NODE_RESOURCE_FIELD_NAME = 'resource';
export const CREDENTIAL_DOCS_EXPERIMENT = {
name: '024_credential_docs',
control: 'control',
variant: 'variant',
};
export const EASY_AI_WORKFLOW_EXPERIMENT = {
name: '026_easy_ai_workflow',
control: 'control',
@@ -771,7 +765,6 @@ export const WORKFLOW_BUILDER_EXPERIMENT = {
};
export const EXPERIMENTS_TO_TRACK = [
CREDENTIAL_DOCS_EXPERIMENT.name,
EASY_AI_WORKFLOW_EXPERIMENT.name,
AI_CREDITS_EXPERIMENT.name,
WORKFLOW_BUILDER_EXPERIMENT.name,

View File

@@ -611,9 +611,6 @@
"credentialEdit.credentialSharing.list.delete.confirm.confirmButtonText": "Remove",
"credentialEdit.credentialSharing.list.delete.confirm.cancelButtonText": "Cancel",
"credentialEdit.credentialSharing.role.user": "User",
"credentialEdit.docs.aws": "Configure this credential:\n\n- Select your AWS **Region**.\n- Log in to your <a href=\"https://aws.amazon.com/\" target=\"_blank\">AWS</a> account.\n- Generate your access key pair:\n - Open the AWS <a href=\"https://console.aws.amazon.com/iam\" target=\"_blank\">IAM console</a> and open your user menu.\n - Select **Security credentials**.\n - Create a new access key pair in the **Access Keys** section.\n - Reveal the **Access Key ID** and **Secret Access Key** and enter them in n8n.\n- To use a **temporary security credential**, turn this option on and add a **Session token**.\n- If you use Amazon Virtual Private Cloud <a href=\"https://aws.amazon.com/vpc/\" target=\"_blank\">VPC</a> to host n8n, you can establish a connection between your VPC and some apps. Use **Custom Endpoints** to enter relevant custom endpoint(s) for this connection.\n\nClick the docs link above for more detailed instructions.",
"credentialEdit.docs.gmailOAuth2": "Configure this credential:\n\n- Log in to your <a href=\"https://cloud.google.com/\" target=\"_blank\">Google Cloud</a> account.\n- Go to <a href=\"https://console.cloud.google.com/apis/credentials\" target=\"_blank\">Google Cloud Console / APIs and services</a> and choose the project you want to use from the select at the top left (or create a new one and select it).\n- If you haven't used OAuth in this Google Cloud project before, <a href=\"https://developers.google.com/workspace/guides/configure-oauth-consent\" target=\"_blank\">configure the OAuth consent screen</a>.\n- In Credentials, select **+ CREATE CREDENTIALS > OAuth client ID**.\n- In the **Application type** dropdown, select **Web application**.\n- Under **Authorized redirect URIs**, select **+ ADD URI**. Paste in the OAuth redirect URL from n8n.\n- Select **Create**.\n- In Enabled APIs and services, select **+ ENABLE APIS AND SERVICES**.\n- Select and enable the Gmail API.\n- Back to Credentials, click on the credential in OAuth 2.0 Client IDs, and on the credential page, you will find the Client ID and Client Secret.\n\nClick the docs link above for more detailed instructions.",
"credentialEdit.docs.openAiApi": "Configure this credential:\n\n- Log in to your <a href=\"https://platform.openai.com/login\" target=\"_blank\">OpenAI</a> account.\n- Open your OpenAI <a href=\"https://platform.openai.com/api-keys\" target=\"_blank\">API keys</a> page to create an **API key**.\n- Enter an **Organization ID** if you belong to multiple organizations; otherwise, leave blank. Open your OpenAI <a href=\"https://platform.openai.com/account/organization\" target=\"_blank\">Organization Settings</a> page to get your Organization ID.\n\nClick the docs link above for more detailed instructions.",
"credentialSelectModal.addNewCredential": "Add new credential",
"credentialSelectModal.continue": "Continue",
"credentialSelectModal.searchForApp": "Search for app...",