Skip to content

Add preview to workflow tabs #4290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

pythongosssss
Copy link
Member

@pythongosssss pythongosssss commented Jun 28, 2025

Adds a preview of the graph when you hover over the tab
image

┆Issue is synchronized with this Notion page by Unito

@christian-byrne
Copy link
Contributor

Claude Code review

I reviewed this thoroughly and found that most potential concerns are already properly handled:

Memory management with blob URLs - The code correctly calls URL.revokeObjectURL() in clearThumbnail() and clearAllThumbnails(), properly cleaning up blob URLs when workflows are closed.

Manual DOM positioning - The manual positioning addresses a PrimeVue bug with scrolled tabs, as noted in the code comments. The workaround is reasonable.

Removed tooltip - The v-tooltip removal is intentional, replaced by a richer popover with visual preview that mirrors browser tab behavior.

Device pixel ratio - While DPR support could make thumbnails crisper on high-DPI displays, the current implementation works well with browser image scaling.

CSS variables with Tailwind - Using CSS variables for dynamic popover width that's referenced in multiple places is a practical pattern here.

The implementation is solid with good test coverage and follows Vue 3 best practices.

Comment on lines +118 to +120
const handleMouseLeave = () => {
popoverRef.value?.hidePopover()
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also call hidePopover during unmount?

sourceHeight = graphCanvas.width / targetAspect
sourceY = (graphCanvas.height - sourceHeight) / 2
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if there's a good way to get the low quality / zoomed-out render of litegraph before drawing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants