-
Notifications
You must be signed in to change notification settings - Fork 51.8k
feat(core): Node feature flags #22950
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
E2E Tests: n8n tests passed after 9m 54s Run Details
Groups
This message was posted automatically by
currents.dev | Integration Settings
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 6 files
| isNodeFeatureEnabled(featureName: string): boolean { | ||
| return this.nodeFeatures[featureName] ?? false; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder, maybe a shorter version like isFeatureEnabled or isNodeFeatureOn would be better?
I'm just afraid that isFeatureEnabled might be too generic and some users might think it's related to global feature flags.
Summary
The
@featuredisplay condition allows you to show or hide node parameters based on feature flags defined in the node type description. This provides a declarative way to control parameter visibility based on node version and feature availability. TheisNodeFeatureEnabledmethod allows you to execute code based on the feature being enabled or disabled.Feature Definition
Feature flags are defined in the
featuresobject of a node type description and evaluated based on the node's version:Usage in Code
The
isNodeFeatureEnabledmethod is available in node execution contexts (likeIExecuteFunctions,IWebhookFunctions, etc.) to programmatically check if a feature is enabled.Usage in displayOptions
Simple String Array
The simplest form checks if a feature is enabled:
Condition Syntax with
eq(Equals)Check if a feature is enabled using the condition syntax:
Condition Syntax with
not(Not Equals)Check if a feature is disabled:
Multiple Conditions (OR Logic)
Show a parameter if any of the features match:
Combining with Other Conditions
You can combine
@featurewith other display conditions:Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/NODE-4065/node-features
Review / Merge checklist
release/backport(if the PR is an urgent fix that needs to be backported)