Commit Graph

43 Commits

Author SHA1 Message Date
Chenlei Hu
d8f074fea0 [Lint] Sort imports (#2104) 2024-12-30 17:26:37 -05: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
filtered
735153886f Confirm delete workflow (#1772)
* Add confirm delete workflow prompt

* Add confirm delete workflow setting

* Add delete workflow tests

* Change dialog to modal, set default cancel

* Fix setting version key

* Rename for clarity

* Fix tests

- Move into correct section
- Add confirm control

* Export type: ShowDialogOptions

* Replace workflow overwrite with new dialog

* Add delete workflow confirmation dialog

* Update i18n

* Add item list support to confirmation dialog

* Prevent multiple dialogs for same action

* Add confirm close file when dirty

* Add i18n for overwrite dialog

* Fix regression: confirm dialog setting ignored

* Fix delete last workflow does not open replacement

* Update tests
2024-12-04 14:11:49 -05:00
Chenlei Hu
814c4b8ef0 Remove node bookmark migration (#1733)
* Remove node bookmarks setting migration

* nit

* nit
2024-11-28 14:28:53 -05:00
Chenlei Hu
46cd522384 Fix save temporary workflow loop on overwrite (#1699) 2024-11-26 10:44:25 -05:00
Chenlei Hu
069dc67c30 Reland "Fix undo / redo filling with empty steps" (#1653)
* Revert "Revert "Fix undo / redo filling with empty steps (#1649)" (#1652)"

This reverts commit 7623810166.

* Update test expectations

* Add dirty flag if workflow is not persisted

* Add dirty flag to other UI areas for new workflows

* Remove redundant code

* Fix regression: undo / redo steps lost on refresh

The history is still be cleared, but any changes made by issuing undo / redo comands prior to refresh are not lost.

* Update test expectations

Partially reverts f8cc2c0d67 - adds dirty flags back to unsaved workflows.

---------

Co-authored-by: filtered <176114999+webfiltered@users.noreply.github.com>
2024-11-23 09:49:12 -05:00
Chenlei Hu
6352cd86ee Show confirm dialog on workflow path conflict (Save As) (#1590)
* Show confirm dialog on workflow path conflict (Save As)

* Fix closeworkflow

* nit

* Add playwright tests

* nit

* nit

* Move workflows dir cleanup
2024-11-18 23:07:24 -05:00
filtered
7e0d1d441d Flaky tests and observable state (#1526)
* Fix missing await

* Fix flaky tests - keyboard combos

Old code is causing playwright &/ changeTracker to add an undo step.  Using combo mode resolves flakiness until that can be investigated thoroughly.

* Restore skipped tests

* Fix flaky tests

* Async clean up

* Fix test always fails on retry

* Add TS types (tests)

* Fix flaky test

* Add observable busy state to workflow store

* Add workflow store busy wait to tests

* Rename test for clarity

* Fix flaky tests - use press() from locator API

Ref: https://playwright.dev/docs/api/class-keyboard#keyboard-press

* Fix flaky test - wait next frame

* Add delay between mouse events

Litegraph pointer handling is all custom coded, so a adding a delay between events for a bit of reality is actually beneficial.
2024-11-13 09:35:22 -05:00
Chenlei Hu
73bdbddf90 Fix rename open/bookmark workflow (#1507)
* Fix rename open/bookmark workflow

* nit

* Fix save as

* Add browser test
2024-11-11 11:06:41 -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
Chenlei Hu
16f2e56d8e Handle errors from top action menu commands (#1432) 2024-11-04 22:50:19 -05:00
Chenlei Hu
4f9dc830b6 Setup clean setting state before every playwright test (#1309)
* Use reload

* setting setup

* nit

* Remove setting cleanups

* Wait for frame

* nit

* nit
2024-10-25 11:25:17 -04:00
Chenlei Hu
624bcc75ab Move ComfyPage to fixtures folder (#1304) 2024-10-25 08:01:50 -04:00
bymyself
bf80340310 Add test on settings visibility on mobile (#1164)
* Add test on settings dialog visibility on mobile

* Consolidate settings-dialog tests

* Simplify zoom speed setting tests
2024-10-08 09:43:16 -04:00
Chenlei Hu
f8343d0f93 Fix flaky playwright test (#1152) 2024-10-07 17:11:20 -04:00
bymyself
a95a6f9b47 Fix saved workflow cleanup in menu tests (#1142)
* Fix saved workflow cleanup in menu tests

* Clear workflow dir before each test
2024-10-07 09:35:15 -04:00
bymyself
3c70c1e463 Show keybinding on topbar dropdown menus (#1127)
* Show keybinding on topbar dropdown menus, resolve #1092

* Add text-muted to tailwind config

* Add Playwright test

* Preserve Primevue classes in menu item template

* Extend MenuItem

* Revert adding undo/redo to core keybindings

* Change test selector

* refactor

* Extract as component

* refactor

* nit

* fix extension API

---------

Co-authored-by: huchenlei <huchenlei@proton.me>
2024-10-06 12:08:16 -04:00
Chenlei Hu
2c90735bb1 Restore top/bottom menu location setting (#1123)
* Rename floating to top

* Adjust teleport target

* Fix dropdown direction for bottom menubar

* Fix z-index
2024-10-05 18:08:48 -04:00
Chenlei Hu
39d68bcdc4 Remove new default workflow button in workflows sidebar (#1100) 2024-10-04 11:37:37 -04:00
bymyself
224c0080ee Fix topbar submenu width on mobile/tablet (#1047)
* Fix topbar submenu width on tablet

* Add Playwright test

* Use better selector

* nit

---------

Co-authored-by: Chenlei Hu <chenlei.hu@mail.utoronto.ca>
2024-09-30 15:21:09 -04:00
bymyself
04e1344676 Fix closing saved workflows (#1049)
* Fix workflow save. Resolves #996 Resolves #1048

* Add test on closing tabs

* Add test on closing open workflows in sidebar
2024-09-30 15:09:24 -04:00
Chenlei Hu
4e5bcd6a3b Migrate deprecated setting values (#954) 2024-09-25 16:01:50 +09:00
Chenlei Hu
6a8287e192 Show opened workflows as topbar tabs (#952)
* Basic tab switching

* Closing tabs

* Style buttons

* wip

* Fix scroll style

* Add setting

* Add playwright test

* Add unsaved status

* nit
2024-09-25 16:01:50 +09:00
Chenlei Hu
0d28c108d2 Add topbar dropdown menu (#937)
* Add basic menu

* Add workflows/edit to menu bar

* Add command store

* Fix z-index

* Fix beta menu setting switch

* nit

* Drop to center

* Fix command invocation
2024-09-25 16:01:50 +09:00
Chenlei Hu
2aaee5c331 Remove support of Top/Bottom in menu positions (#933)
* Remove support of Top/Bottom in menu positions

* Update menu positions in test setting

* nit
2024-09-25 16:01:50 +09:00
Chenlei Hu
f4d4cc3439 Move workflow dropdown to sidebar tab (#893)
* Initial move to sidebar

Remove broken CSS

Move action buttons

Migrate open workflows

Add basic browse

WIP

Add insert support

Remove legacy workflow manager

Remove unused CSS

Reorder

Remove legacy workflow UI

nit

* Support bookmark

Add workflow bookmark store

nit

Add back bookmark functionality

Correctly load bookmarks

nit

Fix many other issues

Fix this binding

style divider

* Extract tree leaf component

* Hide bookmark section when no bookmarks

* nit

* Fix save

* Add workflows searchbox

* Add search support

* Show total opened

* Add basic test

* Add more tests

* Fix redo/undo test

* Temporarily disable browser tab title test
2024-09-25 16:01:50 +09:00
bymyself
21c3883cc7 Improve beta menu nav accessibility (#762)
* Add ARIA labels to beta menu btns without text

* Adjust test locator
2024-09-09 09:49:43 +09:00
Chenlei Hu
d9a7537169 Fix top level bookmark migration (#706) 2024-09-01 18:55:56 -04:00
Chenlei Hu
75e91137f0 Display node display_name instead of name (#704) 2024-09-01 18:33:19 -04:00
Chenlei Hu
14da8433f7 Migrate node library sidebar to use unique name instead of display name (#702)
* Migrate node library sidebar to use unique name instead of display name

* Break word
2024-09-01 17:52:53 -04:00
Chenlei Hu
d04dbcd2c1 [Major Refactor] Use TreeExplorer on nodeLibrarySidebarTab (#699)
* Basic move

* Add back node bookmark

* Move node preview

* Fix drag node to canvas

* Restore click node to add to canvas

* Split bookmark tree and library tree

* Migrate rename and delete context menu

* Fix expanded keys

* Split components

* Support extra menu items

* Context menu only for folder

* Migrate add folder

* Handle drop

* Store color customization

* remove extra padding

* Do not show context menu if no item

* Hide divider if no bookmark

* Sort bookmarks alphabetically default

* nit

* proper edit

* Update test selectors

* Auto expand on item drop

* nit

* Fix tests

* Search also searches bookmarks tree

* Add serach playwright test
2024-09-01 14:03:15 -04:00
Chenlei Hu
0795c3041c Bookmark folder icon customization (#647)
* Add bookmark customization support

* WIP

* Fix bugs

* Fix color update

* Handle rename and delete of customization

* nit

* Add custom color picker

* Computed final color

* i18n

* Remove cancel button as dialog already has it

* Add playwright test
2024-08-26 21:30:38 -04:00
Chenlei Hu
a69858c87a Fix unbookmark node in node library (#639)
* Add unbookmark test

* Fix unbookmark
2024-08-26 11:04:08 -04:00
Chenlei Hu
090fda2f22 Node library custom bookmark folder (#631)
* Add new folder button

* Add tree util test

* nit

* Support empty folder in node library

* Drag to bookmark folder

* Use bookmark icon for bookmark folder

* Highlight on dragover

* nit

* Auto-expand on item added

* Extract bookmark system as store

* Add context menu on bookmark folder

* Add editable text

* Fix reactivity

* Plumb editable text

* refactor

* Rename node

* Fix focus

* Prevent name collision

* nit

* Add new folder

* nested folder support

* Change drag behavior

* Add basic playwright tests

* nit

* Target tree-node-content instead of tree-node
2024-08-25 21:53:58 -04:00
Chenlei Hu
b863c11e67 Fix node library bookmark preview (#626) 2024-08-25 10:01:42 -04:00
Chenlei Hu
6c557eaa58 Fix unrecognized bookmark node crash the node library sidebar (#614)
* Add playwright test

* nit
2024-08-24 11:58:14 -04:00
Chenlei Hu
7434691bed Disable flaky test (#598) 2024-08-22 19:42:38 -04:00
Chenlei Hu
2e51122778 Add browser tests for litegraph changes (#580) (#585) (#587)
* Add browser tests for litegraph changes (#580) (#585)

* Zoom speed tests

* Merge

* Prompt dialog test

* Update test expectations [skip ci]

---------

Co-authored-by: bymyself <abolkonsky.rem@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-08-21 20:39:30 -04:00
Chenlei Hu
a68f7c680b Rename SideBar to Sidebar (#422)
* Rename SideBar to Sidebar

* rename files

* rename files
2024-08-14 11:27:23 -04:00
Chenlei Hu
c0875d066a Node library side bar tab (#237)
* Basic tree

* Add node filter

* Fix key issue

* Add icons

* Node count

* nit

* Add node preview basics

* Node preview

* Make comfy node in node lib draggable

* Set drop target

* Add node on drop

* Drop on dynamic location

* nit

* nit

* Fix hover preview issue

* nit

* More visual diff between node and folder

* Add playwright test

* Add dep

* Get rid of screenshot test
2024-07-27 21:28:48 -04:00
Chenlei Hu
ee6eed1c1c Fix extension register tab with API (#229)
* Get rid of extension manager impl

* nit

* Test register tab
2024-07-26 10:29:20 -04:00
Chenlei Hu
e179f75387 Apply new code format standard (#217) 2024-07-25 10:10:18 -04:00
Chenlei Hu
5b4e96f6c5 Test theme toggle feature (#212)
* WIP

* Add test on theme toggle

* Add teardown logic

* Cleanup menu setting
2024-07-23 17:56:35 -04:00