feat(editor): Add lead enrichment suggestions to workflow list (#8042)

## Summary
We want to show lead enrichment template suggestions to cloud users that
agreed to this. This PR introduces the front-end part of this feature
- Handoff document
- Figma Hi-fi
- [How to
test](https://linear.app/n8n/issue/ADO-1549/[n8n-fe]-update-workflows-list-page-to-show-fake-door-templates#comment-b6644c99)

Tests are being worked on in a separate PR

## Related tickets and issues
Fixes ADO-1546
Fixes ADO-1549
Fixes ADO-1604

## Review / Merge checklist
- [ ] PR title and summary are descriptive. **Remember, the title
automatically goes into the changelog. Use `(no-changelog)` otherwise.**
([conventions](https://github.com/n8n-io/n8n/blob/master/.github/pull_request_title_conventions.md))
- [ ] [Docs updated](https://github.com/n8n-io/n8n-docs) or follow-up
ticket created.
- [ ] Tests included.
> A bug is not considered fixed, unless a test is added to prevent it
from happening again.
   > A feature is not complete without tests.

---------

Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
This commit is contained in:
Milorad FIlipović
2023-12-19 15:10:03 +01:00
committed by GitHub
parent c170dd1da3
commit 36a923cf7b
26 changed files with 1387 additions and 87 deletions

View File

@@ -6,46 +6,47 @@ import type {
TRIGGER_NODE_CREATOR_VIEW,
REGULAR_NODE_CREATOR_VIEW,
AI_OTHERS_NODE_CREATOR_VIEW,
VIEWS,
} from './constants';
import type { IMenuItem } from 'n8n-design-system';
import type {
GenericValue,
IConnections,
ICredentialsDecrypted,
ICredentialsEncrypted,
ICredentialType,
IDataObject,
INode,
INodeIssues,
INodeParameters,
INodeTypeDescription,
IPinData,
IRunExecutionData,
IRun,
IRunData,
ITaskData,
IWorkflowSettings as IWorkflowSettingsWorkflow,
WorkflowExecuteMode,
PublicInstalledPackage,
INodeTypeNameVersion,
ILoadOptions,
INodeCredentials,
INodeListSearchItems,
NodeParameterValueType,
IDisplayOptions,
IExecutionsSummary,
FeatureFlags,
ExecutionStatus,
ITelemetryTrackProperties,
IUserManagementSettings,
WorkflowSettings,
IUserSettings,
IN8nUISettings,
BannerName,
INodeExecutionData,
INodeProperties,
NodeConnectionType,
INodeCredentialsDetails,
import {
type GenericValue,
type IConnections,
type ICredentialsDecrypted,
type ICredentialsEncrypted,
type ICredentialType,
type IDataObject,
type INode,
type INodeIssues,
type INodeParameters,
type INodeTypeDescription,
type IPinData,
type IRunExecutionData,
type IRun,
type IRunData,
type ITaskData,
type IWorkflowSettings as IWorkflowSettingsWorkflow,
type WorkflowExecuteMode,
type PublicInstalledPackage,
type INodeTypeNameVersion,
type ILoadOptions,
type INodeCredentials,
type INodeListSearchItems,
type NodeParameterValueType,
type IDisplayOptions,
type IExecutionsSummary,
type FeatureFlags,
type ExecutionStatus,
type ITelemetryTrackProperties,
type IUserManagementSettings,
type WorkflowSettings,
type IUserSettings,
type IN8nUISettings,
type BannerName,
type INodeExecutionData,
type INodeProperties,
type NodeConnectionType,
type INodeCredentialsDetails,
} from 'n8n-workflow';
import type { BulkCommand, Undoable } from '@/models/history';
import type { PartialBy, TupleToUnion } from '@/utils/typeHelpers';
@@ -1259,6 +1260,10 @@ export interface UIState {
bannersHeight: number;
bannerStack: BannerName[];
theme: ThemeOption;
suggestedTemplates?: SuggestedTemplates;
pendingNotificationsForViews: {
[key in VIEWS]?: NotificationOptions[];
};
}
export type IFakeDoor = {
@@ -1836,3 +1841,21 @@ export type ToggleNodeCreatorOptions = {
export type AppliedThemeOption = 'light' | 'dark';
export type ThemeOption = AppliedThemeOption | 'system';
export type SuggestedTemplates = {
sections: SuggestedTemplatesSection[];
};
export type SuggestedTemplatesSection = {
name: string;
title: string;
description: string;
workflows: SuggestedTemplatesWorkflowPreview[];
};
export type SuggestedTemplatesWorkflowPreview = {
title: string;
description: string;
preview: IWorkflowData;
nodes: Array<Pick<ITemplatesNode, 'id' | 'displayName' | 'icon' | 'defaults' | 'iconData'>>;
};