Commit Graph

20 Commits

Author SHA1 Message Date
filtered
df6e4debb5 Fix widget snap to work with input sockets (#1017) 2025-05-07 02:02:49 +10:00
filtered
d70260615b [Refactor] Split NodeSlot out to separate files (#960)
Split files only; no code changes.  New files moved to `/node`.
2025-04-23 14:43:55 +00:00
Chenlei Hu
bdffdc9f10 [Bug] Fix configure of non-serializable widget (#921)
Follow up on https://github.com/Comfy-Org/litegraph.js/pull/915

Filter out non-serializable widgets during node configuration. Current
usage in frontend should not be affected as preview media widgets are
mostly dynamically added at the end of widget list.
2025-04-12 21:01:31 -04:00
Chenlei Hu
bf5e3f3c77 [Bug] Fix layout issue caused by absolute positioned slots (#908)
Before:

![image](https://github.com/user-attachments/assets/00bbbf14-a153-4301-b4c4-0c30cb2ebcc7)

After:

![image](https://github.com/user-attachments/assets/2247a0a5-2757-478c-b701-9ceab7a133cc)

Workflow:

[dynamically_added_input.json](https://github.com/user-attachments/files/19640371/dynamically_added_input.json)

This PR also fixes the issue that output slot's `pos` property is not
relative to node pos.
2025-04-07 19:52:58 -04:00
filtered
39a9799db7 [Test] Add unit tests - complex floating links & nodes (#796) 2025-03-17 13:25:57 +11:00
filtered
6224d2dc06 [Cleanup] Update ESLint rules with stricter auto-fixes (#614)
Stylistic plugin falls short in a few areas when it comes to consistent
lists and chaining. Replaced some key rules with antfu's personal
variants.

`eslint` can now be run repo-wide without params.
2025-02-26 11:12:03 +00:00
filtered
f3b51a534e [Test] Standardise unit test infrastructure (#572)
* [Test] Revert custom name for test context

- Removes "lgTest", replaces with default "test"

* nit - Rename test extensions file

* Split test graphs out to separate file
2025-02-24 01:56:22 +00:00
Chenlei Hu
7813e5207a Revert "Revert "Convert i/o slot to class in LGraphNode.configure"" (#518)
* Revert "Revert "Convert i/o slot to class in LGraphNode.configure (#506)" (#511)"

This reverts commit d029bd8924.

* nit
2025-02-12 11:06:35 -05:00
Chenlei Hu
d029bd8924 Revert "Convert i/o slot to class in LGraphNode.configure (#506)" (#511)
This reverts commit c75157e86e.
2025-02-09 23:35:40 -05:00
Chenlei Hu
c75157e86e Convert i/o slot to class in LGraphNode.configure (#506) 2025-02-09 15:23:38 -05:00
filtered
7e21b00cc7 Replace test framework: jest -> vitest (#281)
* Replace test framework: jest -> vitest

* nit - remove deprecated npm scripts

* Add vitest config

* Add a few basic tests

* Update actions with vitest params

* Add correct expectations

* Remove jest config
2024-11-06 17:27:32 -05:00
Chenlei Hu
b663f86c9e Serialize to node pos/size to plain array (#273) 2024-11-04 14:08:09 -05:00
Chenlei Hu
7c0240857c Revert branch to cb6e80a645 (#257) 2024-11-03 09:12:47 -05:00
dmx
79c53e0095 (prettier formatting) 2024-11-03 09:20:57 +04:00
filtered
94f1ca4279 Remove future test (#249) 2024-11-01 19:00:02 -04:00
filtered
edfa5e70f2 ES2022 Output & whitespace-only minification (#201)
* Change vite output to ES2022

* Add whitespace-only minify using default esbuild

Does not work for .es.js output - limitation of vite.
Workaround for .es.js involves adding terser & a plugin.

* Remove @ts-expect-error from tests

* Update vite.config.mts

---------

Co-authored-by: Chenlei Hu <huchenlei@proton.me>
2024-10-10 21:00:45 -04:00
filtered
5d510cd674 Revert "Format all code with prettier (#197)" (#198)
This reverts commit 28382b7e45.
2024-10-08 13:14:36 -04:00
Chenlei Hu
28382b7e45 Format all code with prettier (#197)
* Add formatter support

* Format all code

* Fix moved @ts-expect-error
2024-10-07 14:06:44 -04:00
filtered
6ee95f1201 TypeScript conversion groundwork (#163)
* ContextMenu ES6 class conversion

* Fix compat with extensions

* CurveEditor ES6 class conversion

* Split most of the LiteGraph global out to a class

* Move remainder of LiteGraph global to class file

* Remove IIFE wrapper

* Fix jest tests throwing due to type narrowing
2024-09-27 08:20:30 +09:00
Chenlei Hu
e25c21026c Fix LGraphNode.pos serialization (#107) 2024-09-02 14:31:05 -04:00