ComfyUI_frontend icon indicating copy to clipboard operation
ComfyUI_frontend copied to clipboard

Add Help Menu in NodeLibrarySidebarTab

Open benceruleanlu opened this issue 7 months ago • 6 comments

This PR adds a help sidebar overlay on top of the node library sidebar tab.

This help sidebar is derived from either the node's HELP class variable in markdown format if present, or from the description + inputs/outputs.

image

image

There are two ways to open this help panel, one through the node leaf itself:

image

And the other way is through the selection toolbox:

image

This uses the Marked and DOMPurify libraries for Markdown and HTML sanitization.

If you are authoring an extension, links such as assets/image.png will be parsed to custom_nodes/<extension name>/<WEB_DIRECTORY>/assets/image.png.

Related Core PR: https://github.com/comfyanonymous/ComfyUI/pull/8179 Related Docs PR: https://github.com/Comfy-Org/docs/pull/120

┆Issue is synchronized with this Notion page by Unito

benceruleanlu avatar May 18 '25 03:05 benceruleanlu

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​types/​dompurify@​3.0.51001006977100
Addeddompurify@​3.2.51001001008990
Addedmarked@​15.0.1110010010095100

View full report

socket-security[bot] avatar May 18 '25 15:05 socket-security[bot]

I think keeping the node info in a separate repo can make it easier to maintain. The community can correct the incorrect info and contribute to the document as well.

But I don't know whether we should keep the image in the same repo. I may add some image examples when updating the node info so it may contain lots of images, or we just keep the image in another repo and just use the github image links like https://raw.githubusercontent.com/Comfy-Org/example_workflows/main/controlnet/pose_controlnet_2_pass.png

comfyui-wiki avatar May 20 '25 13:05 comfyui-wiki

Btw, I think when updating the info in docs , the image will upload to the docs repo as well, so we may not need to upload it twice if we are using github image links.

comfyui-wiki avatar May 20 '25 13:05 comfyui-wiki

If this has already been brought up internally and decided against, please let me know! I'll get some opinions async / grab some folks for a very brief chat if not.

IIRC Yoland mentioned how we should do it the same way that extension authors should so that we could serve as an example.

But the popular nodepacks could also serve as an example, so I do agree we should probably move the docs out of the core repo.

benceruleanlu avatar May 24 '25 15:05 benceruleanlu

Will check on that! My leaning atm is to use.. well, an example as an example. It should be included in the extension example / skeleton. I agree we should definitely use the same system to load the files as custom nodes, but I generally prefer any potentially-large, raw data be stored separate to the main code repo. It's just that it's a decision that impacts that repo forever.

webfiltered avatar May 24 '25 22:05 webfiltered

I have a python package setup working right now, just need to get it uploaded to PyPi under Comfy-Org and we should be good to go

benceruleanlu avatar May 24 '25 22:05 benceruleanlu

In later PR:

  • Use utils/modules added in this PR for other markdown rendering (e.g., in the info panel of the custom node manager dialog)

christian-byrne avatar May 30 '25 03:05 christian-byrne

It seems like DataTable was causing some problems - could you please jot down a vague approximation of what they were? Knowledge sharing is the only goal.

The markdown content is rendered in plain html, unstyled apart from browser and global, and I wanted to keep the consistency of the same styling from both the markdown content and the fallback content.

I didn't think we need anything special from DataTable anyway, and it came with primevue styling that didn't match our design docs, so I wanted to make it align with the markdown content without blasting it with overrides.

benceruleanlu avatar May 31 '25 15:05 benceruleanlu

FYI: I submitted a PR for the node docs today https://github.com/Comfy-Org/embedded-docs/pull/4

Migrated all the node docs from my website.

comfyui-wiki avatar May 31 '25 18:05 comfyui-wiki