-
Notifications
You must be signed in to change notification settings - Fork 243
Add a button to selection toolbox to open mask editor #3603
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: main
Are you sure you want to change the base?
Conversation
Hi @Yiximail! 👋 Thanks so much for taking the time to contribute—it's always awesome to see folks who use ComfyUI also helping improve it! I gave this a quick test on my phone and it works great—nice work! Just one small concern: this button would be visible to all users, including desktop users. Since they already have access to the mask editor, this might add a bit of unnecessary clutter to their toolbox. What do you think about exploring a long-press-to-open-context-menu interaction? That might be a more universal solution to this and similar issues down the line. Also, unrelated question—have you noticed any parts of the UI being cut off (like the top menu bar or the bottom edge)? Just curious, since we're tracking a related issue here: #3447 Thanks again! Looking forward to your thoughts :) |
Thank you for your feedback! I made this PR to try to avoid tackling open context menu issue — you caught me red-handed, haha. Yesterday I tried several approaches: simulating mouse click events, directly dispatching events to the canvas, but neither MouseEvent nor PointerEvent worked, which left me puzzled. However, you’re absolutely right, continuously adding buttons to the toolbox isn’t a sustainable solution. Thank you for the suggestion, I’ll try to address the context menu issue first (though it might take some time). Regarding your other question: |
Long pressing on the title of the current workflow shows a context menu there on my android phone (Samsung Galaxy Fold 6) if that can help or give some implementation ideas. I will also be very happy to have a way to use the context menu from my phone as well without a connected bluetooth mouse. |
To properly support touch interactions, they need to be added to Litegraph (via |
For what it's worth, for other people desperately looking for a workaround - if you have a wearable device, e.g. pixel watch, you can use it as a mouse/trackpad for your phone/tablet and right click from there :) |
emm, I don't get you mean, can you provide some screenshots? I fixed a bug that to support long-pressing to display the context menu again. Was there any conflict with any other functions? |
Emm... I'm sorry for causing you trouble. you can click it for a shorter period of time? |
Let me clarify - the only issue I have is not being able to open the context menu anywhere else in ComfyUI from my phone. Thus I need to use either a Bluetooth mouse or my smart watch as a mouse/touchpad to right click. I only mentioned right clicking on the tabs, because it's the only place I CAN open the context menu by long-touching. Since you mentioned you were trying to get this event to work I thought that showing you this use case can help so one can check the source code for the tabs and figure out why long pressing the tab opens the context menu whereas long pressing a node just vibrates the device and does NOT open any context menu. Sorry for the initial confusion I might have introduced. |
oh! I got you now. The 1.8.1 version updated last night. It should have fixed showing context menu when long-pressing elsewhere. Thanks for the information, If you encounter any other problems, you can also give me feedback. |
It's working!! Thank you very, very much! <3 |
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.
ComfyApp.clipspace_return_node = firstImageNode | ||
// @ts-expect-error fixme ts strict error | ||
ComfyApp.open_maskeditor() | ||
} |
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.
Maybe it makes more sense to check if the selected item useCanvasStore().selectedItems[0]
is an image node, and then use that. If an image node is not selected, we could display some warning using a toast.
I really can't figure out how to open the context menu on iPad. If there is a way, please let me know.
I add a button for open the mask editor in toolbox. I use this feature frequently and it's really great !
Let more people see it and use it, not just hide it in the context menu below.
┆Issue is synchronized with this Notion page by Unito