ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

How to invoke pop-up windows tips and hide an option in node

Open yaosheng216 opened this issue 1 year ago • 3 comments

Your question

Hello, author. Thanks for your works, when developing custom node, i met some problems. How to invoke ComfyUI pop-up windows to tip of user and hide an option in custom node. Wish your answer. Thanks

Logs

No response

Other

No response

yaosheng216 avatar Aug 30 '24 05:08 yaosheng216

Add pop-up windows to tip of user:

app.extensionManager.toast.add({
    severity: 'info', // element of ['success', 'info', 'warn', 'error', 'secondary', 'contrast']
    summary: 'Loaded!',
    detail: 'Extension loaded!',
    life: 3000
})

Source:

  • https://github.com/Comfy-Org/ComfyUI_frontend/pull/491

christian-byrne avatar Sep 02 '24 18:09 christian-byrne

Ok, thanks for you solution.

yaosheng216 avatar Sep 03 '24 01:09 yaosheng216

@christian-byrne Hi, how to invoke this code in python project. Thanks

yaosheng216 avatar Sep 03 '24 08:09 yaosheng216

This issue is being marked stale because it has not had any activity for 30 days. Reply below within 7 days if your issue still isn't solved, and it will be left open. Otherwise, the issue will be closed automatically.

github-actions[bot] avatar Feb 12 '25 11:02 github-actions[bot]

@christian-byrne Hi, how to invoke this code in python project. Thanks

By default, ComfyUI's Python code does not provide such a method.

As an extension feature, Python needs to send an event to the front end, and the event listener in the front-end JavaScript code should execute the toast code.

ltdrdata avatar Feb 12 '25 22:02 ltdrdata