mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-22 07:44:11 +00:00
docs: add Vue Nodes vs LiteGraph mode banners to canvas, nodes, widgets
- Add prominent warning banners clarifying LiteGraph mode patterns - Include comparison tables showing API differences - Cross-link between LiteGraph and Vue Nodes documentation - Add scope clarification to vue-nodes.md Amp-Thread-ID: https://ampcode.com/threads/T-019c165d-cebf-7393-847a-914e5858bd9a Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
# Canvas Interaction Patterns
|
||||
|
||||
> **⚠️ LiteGraph Mode:** These patterns apply to the default LiteGraph canvas rendering. For Vue Nodes 2.0 (DOM-based rendering), see [vue-nodes.md](../features/vue-nodes.md). Check which mode you're testing:
|
||||
> - **LiteGraph:** Canvas-based, use `comfyPage.canvas.*`, `NodeReference`, coordinate-based interactions
|
||||
> - **Vue Nodes:** DOM-based, use `comfyPage.vueNodes.*`, Playwright locators, CSS selectors
|
||||
|
||||
## Critical: Always Use nextFrame()
|
||||
|
||||
Canvas changes don't render immediately. **Always** call `nextFrame()` after canvas operations:
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# Node Patterns
|
||||
|
||||
> **⚠️ LiteGraph Mode:** These patterns apply to the default LiteGraph canvas rendering. For Vue Nodes 2.0 (DOM-based rendering), see [vue-nodes.md](../features/vue-nodes.md).
|
||||
>
|
||||
> | Mode | Node Access | Example |
|
||||
> |------|-------------|---------|
|
||||
> | LiteGraph | `comfyPage.getNodeRefByTitle()` | `node.click()`, `node.getWidget('seed')` |
|
||||
> | Vue Nodes | `comfyPage.vueNodes.getNodeByTitle()` | Playwright locators, CSS classes |
|
||||
|
||||
## Getting Node References
|
||||
|
||||
### By Title (Preferred)
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
|
||||
Vue Nodes 2.0 is an alternative rendering mode for nodes. Tests need to explicitly enable it.
|
||||
|
||||
> **📋 This file covers Vue Nodes equivalents for:**
|
||||
> - Canvas interactions → [LiteGraph version](../core/canvas.md)
|
||||
> - Node operations → [LiteGraph version](../core/nodes.md)
|
||||
> - Widget testing → [LiteGraph version](../testing/widgets.md)
|
||||
>
|
||||
> Vue Nodes uses **DOM elements** instead of canvas drawing. Test with Playwright locators, not coordinate-based clicks.
|
||||
|
||||
## Enabling Vue Nodes
|
||||
|
||||
```typescript
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# Widget Patterns
|
||||
|
||||
> **⚠️ LiteGraph Mode:** These patterns apply to the default LiteGraph canvas rendering where widgets are drawn on canvas. For Vue Nodes 2.0 (DOM-based widgets), see [vue-nodes.md](../features/vue-nodes.md#dom-based-widget-access).
|
||||
>
|
||||
> | Mode | Widget Access | Interaction Style |
|
||||
> |------|---------------|-------------------|
|
||||
> | LiteGraph | `node.getWidget('seed')` | `setValue()`, `getValue()`, canvas coordinates |
|
||||
> | Vue Nodes | `comfyPage.vueNodes.getWidgetByName()` | DOM locators, `click()`, `fill()` |
|
||||
|
||||
## Getting Widgets
|
||||
|
||||
```typescript
|
||||
|
||||
Reference in New Issue
Block a user