Comfy-Org / Comfy-Org/ComfyUI_frontend

Refactor: Use Galleria lightbox for 'Open Image' instead of new tab

Open
#9,156 0 comments 0 reactions 1 assignee Claimed by @christian-byrne View on GitHub
area:ui
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

## Description

Currently, the 'Open Image' functionality (implemented in PR #9122) opens images in a new browser tab. In cloud mode, it fetches the image as a blob to avoid GCS auto-download behavior.

## Proposed Improvement

Instead of opening images in a new tab, reuse the existing Galleria lightbox component that is already used when clicking 'Inspect' in the right-click context menu of asset cards in the assets panel.

## Benefits

- Consistent UX with existing image viewing workflow
- Avoids complexity of managing new tabs, popup blockers, and blob URL revocation
- Better user experience with native lightbox controls (zoom, pan, etc.)

## Implementation Notes

1. Extract/refactor the Galleria lightbox code if needed to make it reusable
2. Update `useImageMenuOptions` and `litegraphService` to use the Galleria lightbox instead of `openFileInNewTab()`
3. Consider whether `openFileInNewTab()` utility should be removed or kept for other use cases

## Related

- Original PR: #9122
- Discussion: https://github.com/Comfy-Org/ComfyUI_frontend/pull/9122#discussion_r2839105301
- Requested by: @christian-byrne

┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-9156-Refactor-Use-Galleria-lightbox-for-Open-Image-instead-of-new-tab-3116d73d365081e793e9d70f3300587b) by [Unito](https://www.unito.io)

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.