Commit Graph

5147 Commits

Author SHA1 Message Date
Austin Mroz
de399e2e6c Add right click widget -> promote inside subgraph 2025-09-24 14:49:14 -05:00
Austin Mroz
768ffb2c9f For "Show Recommended" keep existing promotions 2025-09-24 10:59:14 -05:00
Austin Mroz
91a6f9d762 Fix hiding of non-proxied widgets 2025-09-23 13:40:24 -05:00
Austin Mroz
4ba1e5e485 Remove test for reading proxyWidgets 2025-09-22 16:41:46 -05:00
Austin Mroz
31a40e9769 Move from wrapping an interal method to onConfigure 2025-09-22 15:44:48 -05:00
Austin Mroz
dd58b272b8 Conditionally display show recommended
Also use a slightly nicer button as placeholder
2025-09-22 14:45:05 -05:00
Austin Mroz
e67bd12168 Reimplement disconnect/reconnect logic, add test 2025-09-22 13:32:58 -05:00
Austin Mroz
ebe92ed884 Add widget positioning test 2025-09-22 12:44:57 -05:00
Austin Mroz
e902afc828 Update comments 2025-09-22 09:43:49 -05:00
Austin Mroz
3d279716a3 Split handler into individual functions 2025-09-21 16:24:48 -05:00
Austin Mroz
b00855be3e Use computedHeight for preview display 2025-09-19 18:08:11 -05:00
Austin Mroz
915870d47c Fix accidental style breakage 2025-09-19 15:07:40 -05:00
Austin Mroz
0e8679798b Guard node proxying by widgetName so both function 2025-09-19 14:53:46 -05:00
Austin Mroz
f63a76e41a Repurpose existing graph traversal util 2025-09-19 10:52:21 -05:00
Austin Mroz
3e677e3dbe Add show recommended button, preview work
Adds the framework for a system to automate display of a curated list of
recommended widgets to the node.

As part of this, a return to display of "image previews" was made.
This code is causing lots of problems. Much of the logic is dependent
upon the actual node going through the draw loop. As nodes in the
subgraph don't receive redraws, there's lots of issues with managing the
initial display and ensuring that an initial draw occurs.

This commit includes support for updating previews, but is more brittle
than I would like.
2025-09-19 09:51:04 -05:00
Austin Mroz
02bf937741 Clean up widget item styling 2025-09-16 18:11:24 -05:00
Austin Mroz
784ebfe331 Styling cleanup, fix node size on append 2025-09-16 17:16:36 -05:00
Austin Mroz
26a9527d23 Actually test that widget names aren't equal 2025-09-16 14:41:59 -05:00
Austin Mroz
b287bb645b Fix unused exports to satisfy knip 2025-09-16 14:23:50 -05:00
Austin Mroz
ee5903877a More tests with better organization 2025-09-16 14:18:03 -05:00
Austin Mroz
1d7546f9bf Add basic tests 2025-09-16 12:34:47 -05:00
Austin Mroz
dbb9a9acd4 Move proxyWidgets out of extensions dir 2025-09-16 12:25:00 -05:00
Austin Mroz
dcc056754d Remove extension code and setTimeout 2025-09-16 11:13:01 -05:00
Austin Mroz
4a7bc4aadf Fix typo in last_y breaking mouse events
Further prune hot loop, and remove cast
2025-09-16 01:19:47 -05:00
Austin Mroz
3187694a31 Simplify proxy handler code 2025-09-15 17:57:47 -05:00
Austin Mroz
9b6611dd20 Move schema to dedicated file, remove cast 2025-09-15 16:35:25 -05:00
Austin Mroz
ccc8d6e441 serialize to string at proxyWidgets boundry
While node.properties function with anything serializeable, the format
for proxyWidgets is not a valid option for type. After great
consideration, all access to and from this value goes through a JSON
serialization and parsing always includes a zod validation step.

This is sturdier to outside misuse, has even lower risk of custom node
breakage, and means that there's now proper type checking at the
boundries of interaction.

Performance was a major concern against this, but the path is quite
cold. I estimate the value of optimization here to be 3-4 orders of
magnitude less important than anything occuring during the draw loop
(like access to proxyWidget elements)
2025-09-15 15:44:15 -05:00
Austin Mroz
166cdc385c Fix type checking on ProxyWidget implementation 2025-09-13 13:05:27 -05:00
Austin Mroz
7fd4fc556a Swap label order: cleaner and more consistent 2025-09-13 10:36:47 -05:00
Austin Mroz
ed2cc26cff Implement a DisconnectedWidget, refactor to use 2025-09-13 10:33:31 -05:00
Austin Mroz
073175a719 Fix typechecking and linting
Note: the proxywidget code is still marked as ignored. This will require
further careful review in the future.
2025-09-12 13:19:47 -05:00
Austin Mroz
ec06e28af7 Pull proxyWidget code out of SubgraphNode
This was needed from an organizational standpoint. For now, it requires
an ugly setTimeout to prevent proxyWidgets from being clobbered during
initialization, but this will be cleaned up later.

This also allows for the proxy widget code to have type checks ignored.
I fully intend to find a functional solution here, but this provides a
migration path where typechecking can be enabled for the rest of the PR
first

Also cleans up type checking on graph change in scripts/app.ts
2025-09-12 09:42:08 -05:00
Austin Mroz
5d4c4ef63e Restrict show/hide all to search query 2025-09-12 08:06:36 -05:00
Austin Mroz
eb85406d70 linting 2025-09-11 17:36:39 -05:00
Austin Mroz
e820515db4 On widget change, also set back canvas dirty 2025-09-11 17:24:12 -05:00
Austin Mroz
b9dcb813d8 Implement show/hide all. dw state in prop handler 2025-09-11 17:03:48 -05:00
Austin Mroz
1e72ed8a78 Cursor fixes, show/hide all framework 2025-09-11 15:10:48 -05:00
Austin Mroz
4016929070 Merge main into austin/widgets-v2 2025-09-11 13:04:34 -05:00
Austin Mroz
e0eb699a93 Add searchbar 2025-09-11 12:02:34 -05:00
Rizumu Ayaka
08fe2829d4 feat: node border and hover and selected style, and when error (#5491)
* feat: node border and hover and selected style, and when error

* fix test error
2025-09-11 03:04:16 -07:00
Jin Yi
e70ddea684 fix: Add dropdown size control to Select components and improve UI (#5290)
* feature: size adjust

* feature: design adjust

* fix: popover width, height added

* fix: li style override

* refactor: improve component readability and
  maintainability per PR feedback

  - Replace CardGridList component with
  createGridStyle utility function
  - Add runtime validation for grid column values
  - Remove !important usage in MultiSelect, use cn()
  function instead
  - Extract popover sizing logic into
  usePopoverSizing composable
  - Improve class string readability by splitting
  into logical groups
  - Use Tailwind size utilities (size-8, size-10)
  instead of separate width/height
  - Remove magic numbers in SearchBox, align with
  button sizes
  - Rename BaseWidgetLayout to BaseModalLayout for
  clarity
  - Enhance SearchBox click area to cover entire
  component
  - Refactor long class strings using cn() utility
  across components

* fix: BaseWidgetLayout => BaseModalLayout

* fix: CardGrid deleted

* fix: unused exported types

* Update test expectations [skip ci]

* chore: code review

* Update test expectations [skip ci]

* chore: restore screenshot

---------

Co-authored-by: github-actions <github-actions@github.com>
2025-09-11 03:01:06 -07:00
Benjamin Lu
038f86fe84 fix(canvas): use vertical-align: top to eliminate baseline gap (#5484)
* fix(canvas): make graph canvas block-level to eliminate baseline gap

- Change <canvas id=graph-canvas> to display:block via Tailwind class
- Removes 1–5 px baseline offset between canvas and container
- Aligns canvas and TransformPane origins; fixes link/slot endpoint drift

No behavioral changes beyond layout origin alignment; no dependent CSS relies on inline/baseline.

* switch block to align-top

* Update test expectations [skip ci]

* Revert "Update test expectations [skip ci]"

This reverts commit ee0dfd4e0a.

* empty commit for ci

* Update test expectations [skip ci]

---------

Co-authored-by: github-actions <github-actions@github.com>
2025-09-11 01:52:15 -07:00
snomiao
cb0dab6cdc [bugfix] Fix flaky test 'Does not report warning on undo/redo' (#5488)
Add additional wait after closing the dialog to ensure all async operations
complete before continuing with the test. This prevents race conditions
where the dialog might not be fully closed when the test proceeds.

The test was failing intermittently because closeDialog() waits for the
dialog to be hidden, but there may be additional async state updates that
need to complete after the dialog closes.

Fixes flaky test in dialog.spec.ts:33
2025-09-11 01:30:30 -07:00
AustinMroz
568be0c44c When toggling selected, align state (#5482)
Previously, when toggling the mode of multiple nodes, each node would
have its state individually toggled. Now it enables mode if any node is
not currently set to that mode and only disables if all already match.
2025-09-11 00:50:26 -07:00
Jin Yi
6ea021d595 feat: Auto-close LoadWorkflowWarning dialog when all missing nodes are installed (#5321)
* feat: Auto-close LoadWorkflowWarning dialog when all missing nodes are installed

- Add computed property to check if all missing nodes are installed
- Watch for completion and automatically close dialog with 500ms delay
- Show success toast notification when installation completes
- Add translation key for success message

This improves UX by automatically dismissing the warning dialog once the user has successfully installed all missing nodes through the manager.

* fix: settimeout to nexttick

* [auto-fix] Apply ESLint and Prettier fixes

---------

Co-authored-by: GitHub Action <action@github.com>
2025-09-10 23:19:04 -07:00
Alexander Brown
7245213ed6 Fix: In standard mode, don't stop when you hit a Vue node. (#5445)
* fix: Forward the scrolling events to the litegraph canvas.

* prior-art: Use the existing event forwarding logic from useCanvasInteractions (h/t Ben)

* fix: Get proper scaling from properties in the original event, fix browser zoom

* tests: Fix missing property on mock

* types: Cleanup type annotations in the test

* cleanup: Initialize the mocks in place.

* tests: extract createMockPointerEvent

* tests: extract createMockWheelEvent

* tests: extract createMockLGraphCanvas

* tests: Add additional assertion for stopPropagation

* tests: Comment pruning, test rename suggested by @arjansingh
2025-09-10 23:17:06 -07:00
Christian Byrne
b72e22f6be Add Centralized Vue Node Size/Pos Tracking (#5442)
* add dom element resize observer registry for vue node components

* Update src/renderer/extensions/vueNodes/composables/useVueNodeResizeTracking.ts

Co-authored-by: AustinMroz <austin@comfy.org>

* refactor(vue-nodes): typed TransformState InjectionKey, safer ResizeObserver sizing, centralized slot tracking, and small readability updates

* chore: make TransformState interface non-exported to satisfy knip pre-push

* Revert "chore: make TransformState interface non-exported to satisfy knip pre-push"

This reverts commit 110ecf31da.

* Revert "refactor(vue-nodes): typed TransformState InjectionKey, safer ResizeObserver sizing, centralized slot tracking, and small readability updates"

This reverts commit 428752619c.

* [refactor] Improve resize tracking composable documentation and test utilities

- Rename parameters in useVueElementTracking for clarity (appIdentifier, trackingType)
- Add comprehensive docstring with examples to prevent DOM attribute confusion
- Extract mountLGraphNode test utility to eliminate repetitive mock setup
- Add technical implementation notes documenting optimization decisions

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* remove typo comment

* convert to functional bounds collection

* remove inline import

* add interfaces for bounds mutations

* remove change log

* fix bounds collection when vue nodes turned off

* fix title offset on y

* move from resize observer to selection toolbox bounds

---------

Co-authored-by: AustinMroz <austin@comfy.org>
Co-authored-by: Benjamin Lu <benjaminlu1107@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-09-10 22:38:49 -07:00
Jin Yi
5f045b335d [feat] Improve UX for disabled node packs in Manager dialog (#5478)
* [feat] Improve UX for disabled node packs in Manager dialog

- Hide "Update All" button when only disabled packs have updates
- Add tooltip on "Update All" hover to indicate disabled nodes won't be updated
- Disable version selector and show tooltip for disabled node packs
- Filter updates to only show enabled packs in the update queue
- Add visual indicators (opacity, cursor) for disabled pack cards
- Add comprehensive test coverage for new functionality

This improves the user experience by clearly indicating which packs
can be updated and preventing confusion about disabled packs.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* chore: missing nodes description added

* test: test code modified

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-10 22:35:16 -07:00
Arjan Singh
44e470488d [feat] carve out path to call asset browser in combo widget (#5464)
* [ci] ignore local browser tests files

this is where i have claude put its one off playwright scripts

* [feat] carve out path to call asset browser in combo widget

* [feat] use buttons on Model Loaders when Asset API setting is on
2025-09-10 22:26:07 -07:00
Alexander Brown
ca220440b2 Tailwind: Move customization into CSS (#5477)
* tailwind: Migrate out of the js/ts config part 1

* tailwind: Migrate custom variant and utility

* Update test expectations [skip ci]

* tailwind: Use relative colors for alpha variants

* fix: Use the new numbered color tokens

---------

Co-authored-by: github-actions <github-actions@github.com>
2025-09-10 18:39:37 -07:00