Comfy-Org / Comfy-Org/ComfyUI_frontend

Add browser coverage for workspace-inset-aware dialog bounds

Open
#17,480 0 comments 0 reactions 1 assignee Claimed by @christian-byrne View on GitHub
Dominant language
TypeScript
Stars
2k
Forks
704
Avg merge
1d 8h
Merged PRs (30d)
512

Description

## Summary

Add browser-level coverage for workspace-inset-aware dialog sizing.

## Required changes

Create a browser test that sets `--workspace-inset-right` to a non-zero value and verifies that rendered dialog bounds remain inside the visible workspace. Cover the dialog sizing surfaces currently protected by `src/components/ui/dialog/dialog.variants.test.ts`, including size variants, viewer dialogs, hug-content dialogs, and centered placement.

Keep the existing unit test focused on class-generation contracts unless the new browser coverage makes a specific assertion redundant.

## Rationale

The current Vitest suite verifies that dialog sizing contracts reserve the workspace inset. happy-dom does not perform CSS layout, so it cannot verify the rendered bounds. A browser test is required to validate the user-visible behavior.

## Affected areas

- `src/components/ui/dialog/dialog.variants.test.ts`
- Dialog components and browser-test fixtures that render the affected dialog variants
- Browser test suite for dialog layout behavior

## Acceptance criteria

- The test sets a non-zero `--workspace-inset-right` value.
- The test measures rendered dialog bounds in a real browser.
- The test verifies that the dialog does not extend into the reserved right workspace inset.
- The test covers the applicable sizing and centered-placement behavior.
- The test does not depend only on Tailwind utility-class strings.

Requested by: @christian-byrne

Backlinks:
- PR: https://github.com/Comfy-Org/ComfyUI_frontend/pull/16492
- Review comment: https://github.com/Comfy-Org/ComfyUI_frontend/pull/16492#discussion_r3908409449

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.