Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce node deprecation #3930

Merged
merged 1 commit into from
Aug 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import Vue from 'vue';
import { ICategoriesWithNodes, INodeCreateElement } from '@/Interface';
import { INodeTypeDescription } from 'n8n-workflow';
import SlideTransition from '../transitions/SlideTransition.vue';
import { HIDDEN_NODES } from '@/constants';

import MainPanel from './MainPanel.vue';
import { getCategoriesWithNodes, getCategorizedList } from './helpers';
Expand All @@ -53,7 +52,7 @@ export default Vue.extend({
return this.$store.getters['nodeTypes/allLatestNodeTypes'];
},
visibleNodeTypes(): INodeTypeDescription[] {
return this.allLatestNodeTypes.filter((nodeType) => !HIDDEN_NODES.includes(nodeType.name));
return this.allLatestNodeTypes.filter((nodeType) => !nodeType.hidden);
},
categoriesWithNodes(): ICategoriesWithNodes {
return getCategoriesWithNodes(this.visibleNodeTypes, this.personalizedNodeTypes as string[]);
Expand Down
1 change: 0 additions & 1 deletion packages/editor-ui/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ export const ALL_NODE_FILTER = 'All';
export const UNCATEGORIZED_CATEGORY = 'Miscellaneous';
export const UNCATEGORIZED_SUBCATEGORY = 'Helpers';
export const PERSONALIZED_CATEGORY = 'Suggested Nodes';
export const HIDDEN_NODES = [START_NODE_TYPE];

export const REQUEST_NODE_FORM_URL = 'https://n8n-community.typeform.com/to/K1fBVTZ3';

Expand Down
1 change: 1 addition & 0 deletions packages/nodes-base/nodes/Start/Start.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export class Start implements INodeType {
version: 1,
description: 'Starts the workflow execution from this node',
maxNodes: 1,
hidden: true,
defaults: {
name: 'Start',
color: '#00e000',
Expand Down
6 changes: 6 additions & 0 deletions packages/workflow/src/Interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1095,6 +1095,12 @@ export interface INodeTypeBaseDescription {
subtitle?: string;
defaultVersion?: number;
codex?: CodexData;

/**
* Whether the node must not be shown in the node creator panel,
* due to deprecation or as a special case (e.g. Start node)
*/
hidden?: true;
}

export interface INodePropertyRouting {
Expand Down