Commit Graph

186 Commits

Author SHA1 Message Date
Chenlei Hu
3bf0dfd218 [Refactor] Move addNodeOnGraph to litegraphService (#2100) 2024-12-30 16:09:44 -05:00
Chenlei Hu
a48ad1cb41 Move setting impl from ComfySettingsDialog to settingStore (#2085) 2024-12-28 21:31:09 -05:00
Chenlei Hu
feabd3f11d [Refactor] Move Comfy.WidgetControlMode to coreSettings (#2078) 2024-12-27 21:06:23 -05:00
Chenlei Hu
7cb0c230df [Refactor] Move app.registerNodeDef to litegraphService (#2075) 2024-12-27 13:08:42 -05:00
Chenlei Hu
56a243f958 [Refactor] Deprecate ComfyApp.progress (#2065) 2024-12-26 15:21:58 -05:00
Chenlei Hu
66ada54587 [Refactor] Move vintageClipboard to utils/ (#2062) 2024-12-26 12:55:58 -05:00
Chenlei Hu
f69e88bf41 [Refactor] Convert dialogService to composable (#2058) 2024-12-26 00:26:01 -05:00
Chenlei Hu
4e554503c0 [Refactor] Convert workflowService to composable (#2057) 2024-12-26 00:11:27 -05:00
Chenlei Hu
cce11bb639 Move extension related functions from app to extensionService (#2055) 2024-12-25 23:19:25 -05:00
Chenlei Hu
920266e1ff [ExtensionPanel] Distinguish core and 3rd party extensions (#2020) 2024-12-22 19:41:28 -05:00
shinich39
f4c523f188 Bypass selected nodes (#2013)
Co-authored-by: filtered <176114999+webfiltered@users.noreply.github.com>
2024-12-22 16:51:28 -05:00
AustinMroz
cce5ade578 Fix memory leak in preview code (#2012)
Co-authored-by: filtered <176114999+webfiltered@users.noreply.github.com>
2024-12-22 16:18:31 -05:00
Chenlei Hu
ca9627cada Move widget link drop conversion to widgetInputs (#2001)
Co-authored-by: github-actions <github-actions@github.com>
2024-12-20 16:10:18 -08:00
filtered
cb3e4b5ed7 [Refactor] Clean up image nodes, add TS types (#1927)
* [Refactor] Clean up image nodes, add TS types

Should be no functional changes.

* Remove unused code
2024-12-17 13:09:24 -08:00
Chenlei Hu
a99f63784d Fix io slot label overwrite by i18n (#1904)
* Add test on export with different locales

* Fix node slot rename
2024-12-13 12:27:16 -08:00
Chenlei Hu
f23530afcf [i18n] Translate widget label (#1883)
* [i18n] Translate widget label

* Update locales [skip ci]

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-12-11 18:03:56 -08:00
Chenlei Hu
75c98d00fc [i18n] Fix node output label translation (#1871) 2024-12-11 09:36:44 -08:00
Chenlei Hu
20a3a95df2 Fix output label on untranslated output names (#1866)
* Fix output label on untranslated output names

* nit

* Update test expectations [skip ci]

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-12-11 08:09:37 -08:00
Chenlei Hu
ac6130a556 [i18n] Translate node input/output label and tooltip (#1860)
* [i18n] Translate node input/output labels

* nit

* Impl actual translation

* Remove outputs where name is the type

* Pick outputs key

* Translate outputs

* Properly persist label

* Translate input tooltips

* Translate single node

* Translate first node

* Translate 10 nodes

* Exclude input name translation

* Update test expectations [skip ci]

* nit

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-12-10 17:08:45 -08:00
Chenlei Hu
a76159e9a0 [i18n] Translate node categories (#1842)
* [i18n] Translate node categories

* nit

* Update locales [skip ci]

* Fix some translations

* Do translate

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-12-07 21:25:40 -05:00
Chenlei Hu
c17d44638e [i18n] Safe fallback to original string (#1838)
* [i18n] Safe fallback to original string

* nit
2024-12-07 18:48:14 -05:00
Chenlei Hu
517ae56763 Translate node title and description (#1822)
* Collect node def i18n

* Add collected en locale

* Sort by node id

* Add translations

* Show translated node def

* Update locales [skip ci]

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-12-06 16:56:54 -05:00
Chenlei Hu
ae26390776 Properly implement ComfyNodeDef interface (#1821)
* nit

* Properly implement ComfyNodeDef interface

* nit

* Mark readonly
2024-12-06 12:00:15 -05:00
Chenlei Hu
540e785424 Reland "Replace magic numbers with LGraphEventMode (#1809)" (#1811)
* Revert "Revert "Replace magic numbers with LGraphEventMode (#1809)" (#1810)"

This reverts commit 30a92d40eb.

* Update litegraph
2024-12-05 11:48:07 -05:00
Chenlei Hu
30a92d40eb Revert "Replace magic numbers with LGraphEventMode (#1809)" (#1810)
This reverts commit 679405e0a2.
2024-12-05 11:29:41 -05:00
Chenlei Hu
679405e0a2 Replace magic numbers with LGraphEventMode (#1809) 2024-12-05 11:27:43 -05:00
Chenlei Hu
73396784a8 Keep shim of several legacy components (#1796) 2024-12-04 15:45:38 -05:00
Chenlei Hu
3745d8d791 Remove logging module (#1795)
* Remove logging module

* Remove translation
2024-12-04 14:16:43 -05:00
Chenlei Hu
d2771a7a1d Always include node title metadata for API export (#1771) 2024-12-02 22:49:42 -05:00
Chenlei Hu
c1f0cfe366 Move Comfy.EnableWorkflowViewRestore to coreSettings (#1767) 2024-12-02 17:50:46 -05:00
filtered
2017b9016b Add TS types - API (#1736)
* nit

* Add TS types - API events

* Replace all API event emits with type-safe variants

* Add missing API type

* nit

* Remove test code, nit
2024-11-29 13:15:25 -05:00
Chenlei Hu
9e565154a9 Rework user selection (#1728)
* Move to new route

* Convert to tailwind

* Basic style

* Add userStore

* nit

* nit

* nit

* Remove app.#setUser

* Route to user-select view

* Mock login

* Use primevue UI components

* handle create new user

* Remove legacy user selection

* Add logout button on side toolbar

* Add username to logout button tooltip

* Add playwright tests

* hide logout button in single user server

* nit
2024-11-28 23:36:41 -05:00
Chenlei Hu
df3fff5dbb Remove migration logic (settings & templates storage location) (#1732)
* Remove isNewUserSession handling

* Remove writing of setting and templates to localStorage
2024-11-28 14:24:06 -05:00
Chenlei Hu
b0085114d7 Remove app.storageLocation handling (#1731) 2024-11-28 13:35:08 -05:00
Chenlei Hu
86fec820ac Remove app.multiUserServer flag (#1711) 2024-11-26 16:06:58 -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
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
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
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
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
Chenlei Hu
4bc79181ae Move DOMClippingEnabled to coreSettings.ts (#1516)
* Move DOMClippingEnabled to coreSettings.ts

* nit
2024-11-12 12:01:44 -05:00
Chenlei Hu
1ff6e27d9c Manage widget definitions with Pinia store (#1510)
* Fix compile

* nit

* Remove extensions.test

* nit
2024-11-11 17:23:52 -05:00
Chenlei Hu
d9a34872c3 [Electron] Add basic welcome screen (#1491)
* WIP

* Add LogTerminal

* Modify server startup view

* Add installView

* Add basic welcome screen and dev server setup

* nit

* nit

* nit

* nit

* nit
2024-11-10 09:41:32 -05:00
Chenlei Hu
f8ec87ddea Fix changeTracker modified state (#1481)
* Add jsondiffpatch

* Add logs

* Add graphDiff helper

* Fix changeTracker

* Add loglevel

* Add playwright test

* Fix jest test

* nit

* nit

* Fix test url

* nit
2024-11-08 22:24:35 -05:00
Zoltán Dócs
0161a670cf Fit view to bounds (#1474)
* fit view:
- fit view to canvas selection
- fit view to whole graph when nothing is selected
- add button to graph canvas menu
- assign default keybinding '.'

* Adjust on changed APIs

* Update litegraph

---------

Co-authored-by: huchenlei <huchenlei@proton.me>
2024-11-08 15:03:21 -05:00
Chenlei Hu
0eba49c536 Update litegraph (Animate to bounds) (#1475) 2024-11-08 14:12:58 -05:00
Chenlei Hu
073638672d Fix ('STRING',) input node (#1457)
* Fix ('STRING',) input node

* Update test expectations [skip ci]

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-11-07 13:03:54 -05:00
Chenlei Hu
c56533bb23 Workflow Management Reworked (#1406)
* Merge temp userfile

Basic migration

Remove deprecated isFavourite

Rename

nit

nit

Rework open/load

Refactor save

Refactor delete

Remove workflow dep on manager

WIP

Change map to record

Fix directory

nit

isActive

Move

nit

Add unload

Add close workflow

Remove workflowManager.closeWorkflow

nit

Remove workflowManager.storePrompt

move from commandStore

move more from commandStore

nit

Use workflowservice

nit

nit

implement setWorkflow

nit

Remove workflows.ts

Fix strict errors

nit

nit

Resolves circular dep

nit

nit

Fix workflow switching

Add openworkflowPaths

Fix store

Fix key

Serialize by default

Fix proxy

nit

Update path

Proper sync

Fix tabs

WIP

nit

Resolve merge conflict

Fix userfile store tests

Update jest test

Update tabs

patch tests

Fix changeTracker init

Move insert to service

nit

Fix insert

nit

Handle bookmark rename

Refactor tests

Add delete workflow

Add test on deleting workflow

Add closeWorkflow tests

nit

* Fix path

* Move load next/previous

* Move logic from store to service

* nit

* nit

* nit

* nit

* nit

* Add ChangeTracker.initialState

* ChangeTracker load/unload

* Remove app.changeWorkflow

* Hook to app.ts

* Changetracker restore

* nit

* nit

* nit

* Add debug logs

* Remove unnecessary checkState on graphLoad

* nit

* Fix strict

* Fix temp workflow name

* Track ismodified

* Fix reactivity

* nit

* Fix graph equal

* nit

* update test

* nit

* nit

* Fix modified state

* nit

* Fix modified state

* Sidebar force close

* tabs force close

* Fix save

* Add load remote workflow test

* Force save

* Add save test

* nit

* Correctly handle delete last opened workflow

* nit

* Fix workflow rename

* Fix save

* Fix tests

* Fix strict

* Update playwright tests

* Fix filename conflict handling

* nit

* Merge temporary and persisted ref

* Update playwright expectations

* nit

* nit

* Fix saveAs

* Add playwright test

* nit
2024-11-05 11:03:27 -05:00
filtered
56b63ebab5 Update Litegraph API: Group move / select / titlebar (#1418)
* Litegraph: Group move / select

* Update litegraph

---------

Co-authored-by: huchenlei <huchenlei@proton.me>
2024-11-03 18:45:20 -05:00
Chenlei Hu
00df7b428f Animate goto node (#1412)
* Animate goto node

* Update litegraph (animateToNode)
2024-11-03 10:57:17 -05:00