mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-21 07:14:11 +00:00
Support node deprecated/experimental flag (#563)
* Add deprecated field * Hide deprecated nodes * Add experimental node show/hide * Add setting tooltips * nit * nit * nit
This commit is contained in:
@@ -194,6 +194,52 @@ describe('ComfyNodeDefImpl', () => {
|
||||
is_list: false
|
||||
}
|
||||
])
|
||||
expect(result.deprecated).toBe(false)
|
||||
})
|
||||
|
||||
it('should transform a deprecated basic node definition', () => {
|
||||
const plainObject = {
|
||||
name: 'TestNode',
|
||||
display_name: 'Test Node',
|
||||
category: 'Testing',
|
||||
python_module: 'test_module',
|
||||
description: 'A test node',
|
||||
input: {
|
||||
required: {
|
||||
intInput: ['INT', { min: 0, max: 100, default: 50 }]
|
||||
}
|
||||
},
|
||||
output: ['INT'],
|
||||
output_is_list: [false],
|
||||
output_name: ['intOutput'],
|
||||
deprecated: true
|
||||
}
|
||||
|
||||
const result = plainToClass(ComfyNodeDefImpl, plainObject)
|
||||
expect(result.deprecated).toBe(true)
|
||||
})
|
||||
|
||||
// Legacy way of marking a node as deprecated
|
||||
it('should mark deprecated with empty category', () => {
|
||||
const plainObject = {
|
||||
name: 'TestNode',
|
||||
display_name: 'Test Node',
|
||||
// Empty category should be treated as deprecated
|
||||
category: '',
|
||||
python_module: 'test_module',
|
||||
description: 'A test node',
|
||||
input: {
|
||||
required: {
|
||||
intInput: ['INT', { min: 0, max: 100, default: 50 }]
|
||||
}
|
||||
},
|
||||
output: ['INT'],
|
||||
output_is_list: [false],
|
||||
output_name: ['intOutput']
|
||||
}
|
||||
|
||||
const result = plainToClass(ComfyNodeDefImpl, plainObject)
|
||||
expect(result.deprecated).toBe(true)
|
||||
})
|
||||
|
||||
it('should handle multiple outputs including COMBO type', () => {
|
||||
|
||||
Reference in New Issue
Block a user