20 Commits
Author SHA1 Message Date
Austin Mroz 68254c0590 Fix documentation scrollbar style leakage
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.
2025-03-12 17:46:10 -05:00
Austin Mroz af63cca7bc Remove old deprecation code.
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.
2025-03-12 17:46:07 -05:00
Austin Mroz 38a513f09f Shrink width of long title nodes by default
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.
2024-10-25 03:39:59 -05:00
Austin Mroz 891a55db6d widget selection, collapse allignment, video style
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.
2024-09-22 04:06:20 -05:00
Austin Mroz 15f9dd5b34 Allow for autosize to be specified as hidden input 2024-09-22 04:03:19 -05:00
Austin Mroz 71516bc4e8 Update hiding logic, reduce reflows.
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
2024-08-11 16:57:01 -05:00
Austin Mroz 8131b8d598 Update documentation with fixes from VHS 2024-08-09 16:31:21 -05:00
Austin Mroz a3f1e38dc8 Add js code to add documentation to nodes
Update autosize code to ensure it applies after node sizing is updated
to respect the added question mark
2024-08-04 03:57:27 -05:00
Austin Mroz 7a8415b560 Enable autosize by widget instead of namespace.
Also adds a padding option which, if supplied is summed with the
calculated width when auto-sizing is applied.
2024-07-10 22:05:50 -05:00
Austin Mroz 8b86f64908 Add js to auto-size nodes 2024-07-10 13:46:20 -05:00
Austin Mroz 92d0845f32 Fix js nodes not having filter applied.
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
2024-07-03 00:02:46 -05:00
Jedrzej Kosinski de6a56f1db Made use of deprecated/experimental .js features, made settings menu names consistent 2024-07-02 01:10:08 -05:00
Austin Mroz 275e95147f Feature batch, refresh fix take 2
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.
2024-07-01 20:25:39 -05:00
Austin Mroz 05fa069814 Fix nodes being hidden on "Refresh" button 2024-06-25 02:02:24 -05:00
Austin Mroz b215cf1f8f Disable serialization of ADEWARN 2024-06-22 14:00:48 -05:00
Austin Mroz 8f01cedddb Implement JS to hide nodes from search
Implements a new ADEWARN widget which displays red warning text on a
node. Nodes which have an ADEWARN widget are hidden from the searchbox
2024-06-21 15:46:40 -05:00
kijai ff5fd3a9e4 Added changes made on top of this on the original main repo
This fixes the node scaling and combines everything to one node with format options.
2023-09-18 13:55:14 +03:00
kijai fc6c05323d Add webm node preview
added video preview to the node, with pingpong loop option
2023-09-16 19:46:49 +03:00
kijai 5a58d819c7 Update gif_preview.js
Fix node/widget removal
2023-09-15 21:40:15 +03:00
kijai e21cb5987b First working gif preview
javascript code is pretty much directly from mtb node's "save gif" widget extension code
2023-09-15 21:19:05 +03:00