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
New Menu & Workflow Management #3112
base: master
Are you sure you want to change the base?
Conversation
Move buttosn to top of lists
implement renaming
various fixes
add close unsaved warning
I gave this a quick test. Seems like an improvement.
|
Allow elements around canvas
For point 1, I discovered ComfyUI's user.css and there's a pretty easy way to put the queue button first. I can just have
in there. Though that seems to cause the dropdown to render a bit weirdly, I'm fine with doing it that way since I don't need to edit any CSS that would get overridden by updates. EDIT: Weird rendering gets worked around with
I also like the non-reordering menu much better. I don't really have to pay attention to what I'm clicking when switching workflows since I know where it'll be in the menu, and that feels better since I'm not constantly clicking the wrong workflow. |
Given a few of us have injected extra buttons for things in our repos (my node colorizer e.g.) is there an easy way to register things INTO the menu? Or will I need to hack it like the original floating window? |
The example at the bottom shows adding a simple button to the button group containing settings (the cupcake): app.menu.settingsGroup.append(new(await import("/scripts/ui/components/button.js")).ComfyButton({
icon: "cupcake",
action: () => alert("hello"),
tooltip: "Example button",
content: "Example button"
})) app.menu.saveButton.element.after(new(await import("/scripts/ui/components/button.js")).ComfyButton({
icon: "hamburger",
action: () => alert("hello"),
tooltip: "Example button",
}).element);
// This one will collapse on small screens
app.menu.saveButton.element.after(new(await import("/scripts/ui/components/button.js")).ComfyButton({
icon: "pizza",
action: () => alert("hello"),
tooltip: "Example button 2",
content: "Example button 2",
classList: "comfyui-button comfyui-menu-mobile-collapse primary"
}).element); And an example with a popup const btn = new(await import("/scripts/ui/components/button.js")).ComfyButton({
icon: "earth",
tooltip: "Example button",
});
const hello = document.createElement("span");
hello.textContent = "Hello World";
const popup = new(await import("/scripts/ui/components/popup.js")).ComfyPopup({
target: btn.element,
classList: "comfyui-popup"
}, hello);
Object.assign(popup.element.style, {
background: "var(--bg-color)",
padding: "10px"
});
btn.withPopup(popup);
app.menu.actionsGroup.element.after(btn.element); |
If it's in scope, I'd also love to have those folder-based submenus in the builtin nodes. |
On behalf of a few chrome users here (namely, @ronan36880), the menu bar seems to simply disappear when clicking onto the canvas. I'm unable to personally reproduce this issue on Firefox, however. |
Hi yes, I've managed to replicate a bug where the menu bar disappears on my chrome install. I believe I have narrowed it down to this call to chrome_2024-03-29_21-20-59.mp4Also attached here is a performance trace (with paint instrumentation enabled) I have captured earlier today which replicates the issue. I wasn't able to replicate the bug with the new menu setting disabled. |
Thank you for that, looks like it was due to the bounding rect calculating using the specified width/height of the canvas element instead of using 100% to fill the area, so I now clear those values before getting the rect |
Can UI be optimized for mobile devices? |
Prevent view changes causing history entries
what do you think about an option to put the bar at the bottom instead of the top? |
Quite a few changes in here for this update, been working on it for a while and any feedback would be greatly appreciated.
I've tried to make this as backwards compatible as possible and included the new menu as a setting for people to enable and try out, but like always its hard to know if this will conflict with any extensions so any testing people can do would also be great.
Updates:
[Beta] Use new menu and workflow management
)GET /userdata?dir=the_userdata_dir_to_list&recurse=true/false&split=true/false
- Lists files in a userdata folder (split is a bit of a weird one, but it will return the files split by the OS path separator - happy if someone has a better solution for this, needed for building the tree)DELETE /userdata/{encoded_file}
- deletes the filePOST /userdata/{encoded_file}/move/{encoded_dest}?overwrite=true/false
- Moves a file, optionally overwriting an existing fileOverview:
Save menu ("save" is now saving as user workflows, "export" is download file):
Light theme & queue:
Queue options:
Multiple open workflows & progress:
Responsive:
Send to workflow:
Workflow search with partial matching:
Comfy.UseNewMenu
to see if the top menu is enabled, example: