Commit Graph

5779 Commits

Author SHA1 Message Date
filtered
31c25b4ea1 Fixes pinned group contents moving (#316) 2024-11-18 13:17:24 -05:00
pythongosssss
1bec315427 Adds highlight to advanced widgets (#317)
* Adds highlight to advanced widgets

* Update snapshot
2024-11-18 13:16:52 -05:00
Chenlei Hu
26c3eeb942 Fix vue warning on unnecessary defineEmits import (#1588) 2024-11-18 13:15:16 -05:00
filtered
a8f869337e Fix load crash when graph or config unset (#1587)
Resolves #1585
2024-11-18 12:51:46 -05:00
filtered
7e245ba1cf Update Litegraph: Canvas Pointer (#1556)
* Litegraph: canvas.pointer

Clear @ts-expect-error

Fix exception thrown on slot double-click

Long-standing bug but has no real impact in prod - just logs an error.
Required for new connecting_link features.

Add settings: CanvasPointer options

Update litegraph 0.8.28

Fix regression in snap to grid render

Fix snap to grid marker always on

Update snap to grid to use Positionable API

Fix test clicks registering as double-click

Improve test precision

Current test proves it has changed to something smaller.
New test proves it is exactly what was specified.
Will need refinement when a limit is put on latent width.

Fix test expects collapse node to select node

Remove redundant code

Resolved by CanvasPointer

Fix flaky test - ContextMenu

Fix settings group

* Update litegraph

* Remove snapToGrid extension

* Update test expectations [skip ci]

---------

Co-authored-by: huchenlei <huchenlei@proton.me>
Co-authored-by: github-actions <github-actions@github.com>
2024-11-18 10:50:51 -05:00
filtered
2a93f873b4 Use Litegraph snap to grid (#1572)
Leaves only settings code in the extension
2024-11-18 10:27:37 -05:00
Chenlei Hu
a23da8eb17 0.8.29 (#318) 2024-11-18 10:13:05 -05:00
filtered
c0e8b33716 Snap everything to grid (#315)
* Implement snap to grid

- Moves positioning logic to LGraph
- Simplifies code
- Adds Pointer API to alt-clone node
- Removes always_round_positions, replaced by always snap to grid (default size is 1 when always snapping)

Fix refator error

* Fix group items snapped without group

* Allow snapping of all items

- Add snapToGrid to Positionable
- Impl. on all types
- Deprecated: alignToGrid is now a wrapper

* Fix test import alias, update expectations

* Prevent desync of before / after change events

Adds ability to perform late binding of finally() during drag start.

* nit - Refactor

* Fix unwanted snap on node/group add

* nit - Doc

* Add shift key state tracking for snap to grid

Private impl., no state API as yet.

* Add snap guides rendering

Nodes, reroutes

* Optimisation - reroute rendering

 Fixes exponential redraw

* Add snap guidelines for groups
2024-11-18 10:12:20 -05:00
filtered
f8e7058e19 Add jest set/has pointer capture mocks (#1581)
* Add set/has pointer capter mocks

* Add mock impl.
2024-11-17 21:41:37 -05:00
Chenlei Hu
8d4e740baa 1.4.2 (#1580) v1.4.2 2024-11-17 21:23:49 -05:00
Tristan Sommer
3273ee938b New Mask Editor (#1284)
* implmentation of new mask editor

* fixed some problems, added some new ones

* Refactor: Split implementation into classes, fix multiple bugs -> all initial features work, more testing required

* first release - fixed all known issues, tested, added color select tool and settings toggle
2024-11-17 21:23:32 -05:00
Terry Jia
94f1bc3b38 add preview 3d node and up_direction parameter (#1579) 2024-11-17 21:17:00 -05:00
Terry Jia
d5ce140eb6 add load 3d node support (#1563)
* add load 3d node support

* stl and different material display support
2024-11-17 15:13:24 -05:00
pythongosssss
b5f0c4bf73 [Electron] Terminal commands (#1531)
* Add live terminal output

* Fix scrolling

* Refactor loading

* Fallback to polling if endpoint fails

* Comment

* Move clientId to executionStore
Refactor types

* Remove polling

* wip terminal command input

* Refactor to use node-pty

* Hide tabs if not electron

* Lint fix

* ts fix

* Refactor tab components
2024-11-17 14:43:08 -05:00
Chenlei Hu
545a990365 Disable debug logic in changeTracker (#1577) 2024-11-17 14:38:14 -05:00
Chenlei Hu
71e4a42cfe Only persist workflow on workflow change/switch (#1576)
* Only persist workflow on workflow change/switch

* nit

* Add playwright test

* Add modify test

* nit

* Fix playwright tests

* Update test expectations [skip ci]

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-11-17 14:13:52 -05:00
Chenlei Hu
16b0ebf75a Remove deprecated setting Comfy.NodeSearchBoxImpl.LinkReleaseTrigger (#1574) 2024-11-17 12:10:44 -05:00
Chenlei Hu
eaeb17bdc7 Add new top level setting category 'LiteGraph' and 'Appearance' (#1573) 2024-11-17 12:06:07 -05:00
filtered
239b464957 Apply group padding in context menu commands (#1570) 2024-11-17 11:13:28 -05:00
filtered
00b6d989ec Fix Vue console warning flood on settings open (#1571) 2024-11-17 11:12:37 -05:00
Chenlei Hu
c5f05b1855 1.4.1 (#1568) v1.4.1 2024-11-16 19:08:47 -05:00
Chenlei Hu
3e50941ce3 0.8.28 (#313) 2024-11-16 18:46:08 -05:00
Chenlei Hu
8345b980f6 Add DragAndScaleState for external proxy (#311) 2024-11-16 18:34:49 -05:00
filtered
b29a32c1ae Add CanvasPointer API (#308)
* Add position rounding feature

Replaces previous impls. which only worked on some items, and were triggered when unexpected e.g. clicking a node that hadn't been moved.

Update test expectations

* Narrow TS types - readonly

* nit - Clean up, Doc

* nit - Clean up legacy accessors

Marks as deprecated

* Fix TS type - IContextMenuOptions.scale

* [Refactor] dist2 for use in pointer API

* Add CanvasPointer - API for pointer events

Add TS strict types
Add final click drag distance math
Add option to retain events

* nit - Rename

* nit

* Remove Subgraph - unused & not maintained

* Remove live_mode

Unused, not maintained.

* Update README

Remove live_mode reference

* Update delete selected - include reroutes & groups

* Bypass link menu if alt/shift pressed

* Remove old dragged_node interface

Incomplete impl. - unused.
Superceded by selectedItems

* Fix top/left edge of rectangles not in hitbox

* [Refactor] Match function names to interface names

* Add interface to find widgets by Point

LGraphNode.getWidgetOnPos

* Add widget search param - includeDisabled

* nit - Doc

* Rewrite canvas mouse handling

- Rewrites most pointer handling to use CanvasPointer callbacks
- All callbacks are declared ahead of time during the initial pointerdown event, logically grouped together
- Drastically simplifies the alteration or creation of new click / drag interactions
- Click events are all clicks, rather than some processed on mouse down, others on mouse up

- Functions return instead of setting and repeatedly checking multiple state vars
- Removes all lines that needed THIRTEEN tab indents

* Split middle click out from processMouseDown

* Use pointer API for link menus

* Narrow canvas event interfaces

* Fix canvas event types

Replaces original workarounds with final types

* Refactor - deprecated isInsideRectangle

* Add canvas hovering over state

- Centralises cursor set behaviour
- Provides simple downstream override

* nit

* [Refactor] Use measure functions

* Add double-click API to CanvasPointer

a

* nit - Doc

* Allow larger gap between double click events

* Rewrite double-click into CanvasPointer actions

* Improve double-click UX

Prefer down events over up events

* Add production defaults

* Add middle-click handling

* Remove debug code

* Remove redundant code

* Fix add reroute alt-click adds two undo steps

* Fix click on connected input disconnects

Old behaviour was to disconnect, then recreate a new link on drop.

* Add module export: CanvasPointer
2024-11-16 17:35:30 -05:00
Chenlei Hu
f26f7dbe2c Revert "Add canvas update events (#297)" (#310)
This reverts commit 0e8f02f32f.
2024-11-16 17:32:53 -05:00
oto-ciulis-tt
6fefcaad7b Show download percentage only if it's over 10% (#1539)
* Show download percentage only if it's over 10%

* PR comments

---------

Co-authored-by: Oto Ciulis <oto.ciulis@gmail.com>
2024-11-16 11:48:29 -05:00
Yoland Yan
22fdfd7f0b Minor: change adjustMenuPosition style to single side anchor and scale proportionally elsewhere (#1567) 2024-11-16 11:47:54 -05:00
oto-ciulis-tt
6842eb05de feat: Adding download count badge to sidebar (#1552)
* feat: Adding download count badge to sidebar

* Fixing lint

* Updating electronDownloadStore to handle missing DownloadManager

* PR comments

---------

Co-authored-by: Oto Ciulis <oto.ciulis@gmail.com>
2024-11-16 11:46:55 -05:00
filtered
37e7994d55 Fix husky pre-commit for winnt clients [skip ci] (#1564) 2024-11-16 09:39:27 -05:00
filtered
399893bbb2 Allow decimal places typed in settings (#1566) 2024-11-16 09:37:52 -05:00
ArtificialLab
0e8f02f32f Add canvas update events (#297)
* (add) onNodeUpdated, onPositionChanged and onZoomChanged

* (fix) onPositionChanged

* (add) onNodeWidgetChanged callback
2024-11-16 07:01:59 +04:00
Chenlei Hu
227db065f3 1.4.0 (#1562) v1.4.0 2024-11-15 21:18:29 -05:00
Chenlei Hu
b4352bcd8d Fix node search box filter test (#1561) 2024-11-15 21:18:19 -05:00
Chenlei Hu
39bab9d9e2 Disable flaky group node test (#1560) 2024-11-15 20:55:18 -05:00
Chenlei Hu
c71644f02f Use tailwind class in NodeSearchBox (#1559) 2024-11-15 20:46:04 -05:00
filtered
6aad7ee8b6 Allow remote dev to be switched on/off (#1558)
* Allow remote dev to be switched on/off

* nit - Docs
2024-11-15 19:26:41 -05:00
Chenlei Hu
2b96d831fc Fix install location path picker (#1557) 2024-11-15 18:55:58 -05:00
filtered
dde0291add Fix change tracker count desync on error (#1555)
* Add TS types

* Ensure changeTracker works after exceptions

Wraps all code between before/after change calls in try/finally blocks
2024-11-15 16:03:21 -05:00
filtered
8af016ffc1 Fix husky pre-commit for winnt clients [skip ci] (#1551) 2024-11-15 09:45:39 -05:00
Chenlei Hu
82b4547d7d Remove canvas border rendering (#1549)
* Remove canvas border rendering

* Update test expectations [skip ci]

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-11-15 09:24:51 -05:00
Chenlei Hu
791a25637f Revert "Fix husky pre-commit & type check only staged" (#1550)
* Revert "Fix husky pre-commit & type check only staged (#1361)"

This reverts commit 795e932b8f.

* Update package.json
2024-11-15 09:19:24 -05:00
filtered
b922aa5c7c Add option to disable ctrl + shift + zoom (#1545)
* Add option to disable ctrl + shift + zoom

Minor change to default behaviour: zoom no longer triggers if alt key is also down.

* Update coreSettings.ts

Next release will be 1.4.0 to leave room for patches in 1.3 stable after today's main repo sync.

---------

Co-authored-by: Chenlei Hu <huchenlei@proton.me>
2024-11-15 09:10:09 -05:00
Chenlei Hu
cbaebbc9c2 chore: update litegraph to 0.8.27 (#1542) 2024-11-15 09:06:33 -05:00
Chenlei Hu
86b2e1aa6c Add electron adapter extension (#1538) v1.3.44 2024-11-14 19:57:09 -05:00
Chenlei Hu
61c5f05126 1.3.44 (#1541) 2024-11-14 19:56:46 -05:00
Chenlei Hu
68d9e7107e 0.8.27 (#307) 2024-11-14 17:17:27 -05:00
Chenlei Hu
dde9c3dad5 Fix tree explorer y-axis padding (#1540)
* Fix tree explorer y-axis padding

* nit
2024-11-14 17:15:57 -05:00
Chenlei Hu
ee5c127146 1.3.43 (#1536) v1.3.43 2024-11-13 19:01:44 -05:00
Chenlei Hu
acba6097e0 Replace electron API mocks with actual electron API impl (#1535)
* link electron types locally

* Update electronAPI calls

* Fix source validation

* Payload to raw

* nit

* Update electron types
2024-11-13 17:20:18 -05:00
filtered
82d00a1bcf Update Template copy & paste (#1533)
* Split original clipboard functions out

* Add version check for templates

* Fix regression in use template undo steps
2024-11-13 17:04:31 -05:00