The floating documentation applies styling to scrollbars to make them
take up less space and better match the styling of the canvas.
This styling is improperly configured and will leak to other areas in
comryui with scrollabrs such as sidebar.
This style code is only applied if a user has installed ADE but not VHS.
ComfyUI now has native support for marking nodes as deprecated or
experimental, so the much of the code here no longer serves a purpose.
Zombie code for hiding nodes has been removed and this code now only
exists to display a text label on the node of a specific color.
This removes excessive console spam about deprecation in the reading of
setting values.
Because of a change in initialization order. ComfyUI now considers a
node's title before scaling by 1.5 to determine a nodes initial width.
This causes nodes with long titles to have correspondingly large
dead space. As a rough fix, ADE nodes are changed to have initial size
equal to the greater of the default node width or the minimum title
length.
Mouse selection of individual widgets now correctly applies for nodes
which do not contain a domWidget and therefore lack a y attribute
The collapse button has been migrated to use a monospace font for the +
and minus characters to ensure a change in state doesn't cause a change
in character alignment. The js code has been update to account for this
change
Basic styling has been applied for embedded videos. A play and pause
option are provided, but the mute and fullscreen buttons are hidden.
This functionality is tied to a class applied by documentation.py and
can easily be removed if a video embed is used for more advanced
information (a tutorial) instead of just quick demonstrations or output.
On collapse, hiding is no longer done b setting a cutoff height. This
ensures that portions of elements don't get displayed incorrectly and
that no amount of local font size configuration can cause lines to
incorrectly show.
Additional fixes (such as having the scroll bar always display) have
been introduced to prevent reflows from occuring which would move the
element from underneath the cursor
If there is a large amount of documentation and not everything
collapses, the selected element (from mouseover)) is now scrolled to
ensure it and it's children are visible
The workaround for filter being overwritten by applying to late for
refreshComboInNodes was to apply the filter with beforeRegisterNodeDef,
but that doesn't apply no js nodes inverted the issue of nodes being
hidden. A setup call has been added to ensure js nodes have the default
filter applied
Added color option to set the color of the warning text
When the warning text is an empty string, the widget has 0 height,
effectively hiding it.
Added a warn type as well as options for including nodes of type
'deprecated' or 'experimental' in search anyways. If a widget does not
have an assigned type, it defaults to deprecated.
Actually fix nodes being hidden on refresh. The last attempt was merely
nothing ever being hidden because of a syntax error preventing teh
script from loading. This implementation takes the rather more heavy
handed approach of applying at beforeRegisterNodeDef and setting up the
global filter option at init. This makes it marginally more likely to
interfere with other plugins that attempt to modify app.graph.filter, so
added safety has been included elsewhere in the code.
Added example usage to to Inject PIA as to demonstrate how it might be
used for an experimental node.