mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-09 23:20:04 +00:00
## Summary Refactors the error and subgraph node footer UI by extracting a dedicated `NodeFooter` component and replacing the CSS `outline` approach with a layered border overlay for selection/executing state indicators. ## Changes - **What**: Extracted `NodeFooter.vue` from `LGraphNode.vue` to encapsulate the footer tab logic (subgraph enter, error, advanced inputs). Replaced CSS `outline` with an absolutely-positioned border overlay div for selection and executing state. Added a separate root border overlay div for the node body border. Removed unused `isTransparent` function from `colorUtil.ts`. - **Dependencies**: None ## Review Focus - The layered overlay approach (`absolute -inset-[3px] border-3`) for selection/executing outlines vs the previous `outline-3` approach — ensures the outline renders outside the node bounds correctly including the footer area - `NodeFooter` handles 4 cases: subgraph+error (dual tabs), error only, subgraph only, advanced inputs — verify edge cases render correctly - Resize handle bottom offset adjustments for nodes with footers (`hasFooter`) ## Screenshots <img width="1142" height="603" alt="image" src="https://github.com/user-attachments/assets/e0d401f0-8516-4f5f-ab77-48a79530f4bd" /> <img width="1175" height="577" alt="image" src="https://github.com/user-attachments/assets/bcf08fff-728a-491c-add9-5b96d2f3bfce" /> ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9360-style-Update-error-subgraph-node-footer-design-with-layered-overlay-approach-3186d73d365081b2ac31f166f4d1944a) by [Unito](https://www.unito.io) --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: GitHub Action <action@github.com>
42 lines
1.3 KiB
TypeScript
42 lines
1.3 KiB
TypeScript
import {
|
|
comfyExpect as expect,
|
|
comfyPageFixture as test
|
|
} from '../../../fixtures/ComfyPage'
|
|
|
|
const ERROR_CLASS = /ring-destructive-background/
|
|
|
|
test.describe('Vue Node Error', () => {
|
|
test.beforeEach(async ({ comfyPage }) => {
|
|
await comfyPage.settings.setSetting('Comfy.VueNodes.Enabled', true)
|
|
await comfyPage.vueNodes.waitForNodes()
|
|
})
|
|
|
|
test('should display error state when node is missing (node from workflow is not installed)', async ({
|
|
comfyPage
|
|
}) => {
|
|
await comfyPage.setup()
|
|
await comfyPage.workflow.loadWorkflow('missing/missing_nodes')
|
|
|
|
// Expect error state on missing unknown node
|
|
const unknownNode = comfyPage.page
|
|
.locator('[data-node-id]')
|
|
.filter({ hasText: 'UNKNOWN NODE' })
|
|
.getByTestId('node-inner-wrapper')
|
|
await expect(unknownNode).toHaveClass(ERROR_CLASS)
|
|
})
|
|
|
|
test('should display error state when node causes execution error', async ({
|
|
comfyPage
|
|
}) => {
|
|
await comfyPage.setup()
|
|
await comfyPage.workflow.loadWorkflow('nodes/execution_error')
|
|
await comfyPage.runButton.click()
|
|
|
|
const raiseErrorNode = comfyPage.page
|
|
.locator('[data-node-id]')
|
|
.filter({ hasText: 'Raise Error' })
|
|
.getByTestId('node-inner-wrapper')
|
|
await expect(raiseErrorNode).toHaveClass(ERROR_CLASS)
|
|
})
|
|
})
|