Commit Graph
11 Commits
Author SHA1 Message Date
Mehdi Chaid 482c8cfdee fix: Into Flake Data (Select) hidden widgets catching pointer events (#214)
The previous approach (`hideIntoWidgets`) flagged optional widgets as
hidden and zeroed their compute size, but left them in node.widgets.
Canvas-drawn LiteGraph widgets that remain attached to the node still
have a hit-test region — they intercepted clicks meant for the new
custom dropdown / + button, changing the cursor and opening the
hidden widget's editor instead of the dropdown.

Rename to `removeIntoWidgets` and actually splice these widgets out of
node.widgets so there is no hit region left. Add an idempotency guard
on setupIntoFlakeDataSelect so the second call (from onConfigure) is a
no-op rather than re-adding the DOM widget twice.

Closes #214
2026-05-20 18:37:01 -04:00
Mehdi Chaid 6000be89c0 fix: Flake Data Split (Select) cannot be added to workflow (#215)
syncSplitOutputs() called `node.disconnectOutputs(i)` (plural), which
does not exist on LiteGraph nodes — the correct API is
`node.disconnectOutput(slot)`. The throw happened during initial setup
because the default state hides 12 of the 13 declared outputs, and
each hide attempt invoked the missing method. The node failed to
register on every add.

Replace the broken call with proper link removal via
`node.graph.removeLink(linkId)` over each output's existing links, so
hiding an output cleanly disconnects any downstream consumers without
relying on a method that doesn't exist. Setting `out.hidden` is left
intact (the modern ComfyUI frontend honors it).

Closes #215
2026-05-20 18:36:54 -04:00
Mehdi Chaid 907385c2d3 fix: Flake Data Split nodes broken - hidden widgets catching clicks and missing outputs (#208) 2026-05-20 10:14:30 -04:00
Mehdi Chaid f0d6205ce7 fix: hide optional field widgets in IntoFlakeDataSelect and improve dropdown style (closes #172)
Auto-created ComfyUI widgets for optional numeric/string fields
(filename_prefix, width, height, steps, cfg, sampler_name, scheduler)
are now hidden on setup — they only appear as input pins when the user
explicitly adds them via the [+] button.

Dropdown appearance updated to use appearance:auto for closer match
to native ComfyUI COMBO widget style.
2026-05-14 18:21:44 -04:00
Mehdi Chaid 0bc7720214 fix: rewrite FlakeDataSplitSelect and IntoFlakeDataSelect nodes (closes #164, closes #165)
FlakeDataSplitSelect (#164):
- Remove 'selected_pins' STRING from Python INPUT_TYPES (was causing node load failure)
- Store pin selection purely in node.properties._split_pins
- Rewrite JS widget with attached-button dropdown style

IntoFlakeDataSelect (#165):
- Remove all optional fields from Python INPUT_TYPES; use None-sentinel pattern
  so only connected inputs override the original flake_data
- JS now uses node.addInput/removeInput for dynamic pins — no default pins,
  no hidden widget fields interfering with click events
- Dropdown styled as select + attached button (matching Load Image node)
- Chips show active pins with x to remove
2026-05-14 15:58:31 -04:00
Mehdi Chaid ad2929a80c fix: redesign FlakeDataSplitSelect and IntoFlakeDataSelect pin management
FlakeDataSplitSelect could not be added to workflow because removeInitialPins
called node.removeOutput/addOutput which could fail during node creation.
Switch to applyPinVisibility (hide/show existing pin slots) instead of
dynamically removing/adding pins, which is safer and avoids the crash.

IntoFlakeDataSelect: hide widget-type fields (filename_prefex, width, height,
steps, cfg, sampler_name, scheduler) by default; show them as label + widget
rows only when added via dropdown. Redesign [+] button with neutral Load Image
style styling and add hover effect. Remove dedicated [-] button since chips
have individual delete (x) buttons. For widget-type pins, display inline
label + input widget instead of a square input pin.

Fixes #152, Fixes #153
2026-05-14 14:17:52 -04:00
Mehdi Chaid 8fb97a3626 fix: export DEFAULT_SPLIT_PINS and DEFAULT_INTO_PINS constants
These were declared with const but imported as named exports by
flake_stack.js, causing a module load error that prevented the entire
extension from registering. All custom DOM widgets (FlakeStack grid,
FlakeModelPreset cover image, FlakeCombo, etc.) were silently disabled.
2026-05-14 10:32:22 -04:00
Mehdi Chaid cba2916cfa fix(ui): dynamic pin add/remove for Flake Data Split/Into Select nodes
- Replace hide/show visibility approach with dynamic addOutput/removeOutput
  and addInput/removeInput for proper pin management
- On node creation, remove all default pins and add only selected ones
- On workflow load (onConfigure), clear all dynamic pins and rebuild from
  saved properties
- Remove OUTPUT_NODE from FlakeDataSplitSelect (not an output node)
- Add pin selector UI with +/- buttons that dynamically adds/removes pins
- Export DEFAULT_SPLIT_PINS and DEFAULT_INTO_PINS for use in onConfigure

Closes #139
2026-05-13 21:16:22 -04:00
Mehdi Chaid 122c50d174 fix: implement Preview Flake Data with 2x2 grid and click-to-view overlays 2026-05-13 21:13:51 -04:00
Mehdi Chaid b727ce401f feat: dynamic pin add/remove for Flake Data Split/Into Select nodes 2026-05-13 16:48:30 -04:00
Mehdi Chaid 3d15d895f2 feat: redesign Flake Data Split/Into Select nodes with dynamic pin selector
Replace yes/no group toggles on FlakeDataSplitSelect with a dropdown + +/- button
UI for individually adding/removing output pins. Similarly, redesign
IntoFlakeDataSelect to use dynamic input pins instead of FLAKES_MODEL/COND/SAMPLER
bundle types, allowing override of individual fields from an incoming FLAKE_DATA.

- Python: Add selected_pins/active_pins hidden STRING widgets for state tracking
- Python: IntoFlakeDataSelect now takes individual optional inputs (MODEL, CLIP,
  VAE, etc.) and overrides only activated pins from the incoming FLAKE_DATA
- JS: Add flake-data-select.js with pin selector dropdown + button widgets
- JS: Register handlers for FlakeDataSplitSelect and IntoFlakeDataSelect nodes
- JS: Show/hide outputs and inputs based on selected pin state

Closes #119
2026-05-13 12:32:11 -04:00