mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-10 10:00:08 +00:00
feat: support dev-only nodes (#8359)
## Summary Support `dev_only` property to node definitions that hides nodes from search and menus unless dev mode is enabled. Dev-only nodes display a "DEV" badge when visible. This functionality is primarily intended to support unit-testing nodes on Comfy Cloud, but also has other uses. ## Changes - **What**: Nodes flagged as dev_only in the node schema will only appear in search and menus if Dev Mode is on. ## Screenshots (if applicable) With Dev Mode off: <img width="2189" height="1003" alt="image" src="https://github.com/user-attachments/assets/a08e1fd7-dca9-4ce1-9964-5f4f3b7b95ac" /> With Dev Mode on: <img width="2201" height="1066" alt="image" src="https://github.com/user-attachments/assets/7fe6cd1f-f774-4f48-b604-a528e286b584" /> ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8359-feat-support-dev-only-nodes-2f66d73d36508102839ee7cd66a26129) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -11,7 +11,7 @@ describe('nodeFilterUtil', () => {
|
||||
): LGraphNode => {
|
||||
// Create a custom class with the nodeData static property
|
||||
class MockNode extends LGraphNode {
|
||||
static nodeData = isOutputNode ? { output_node: true } : {}
|
||||
static override nodeData = isOutputNode ? { output_node: true } : {}
|
||||
}
|
||||
|
||||
const node = new MockNode('')
|
||||
@@ -71,11 +71,11 @@ describe('nodeFilterUtil', () => {
|
||||
})
|
||||
|
||||
it('should handle nodes with undefined output_node', () => {
|
||||
class MockNodeWithOtherData extends LGraphNode {
|
||||
static nodeData = { someOtherProperty: true }
|
||||
class MockNodeWithEmptyData extends LGraphNode {
|
||||
static override nodeData = {}
|
||||
}
|
||||
|
||||
const node = new MockNodeWithOtherData('')
|
||||
const node = new MockNodeWithEmptyData('')
|
||||
node.id = 1
|
||||
|
||||
const result = filterOutputNodes([node])
|
||||
|
||||
Reference in New Issue
Block a user