Skip to content

fix: move HunkContextMenu outside each block #8224

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

Merged
merged 1 commit into from
Apr 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions apps/desktop/src/components/v3/UnifiedDiffView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -217,15 +217,6 @@
}}
/>
</div>
<HunkContextMenu
bind:this={contextMenu}
trigger={viewport}
projectPath={project.vscodePath}
{projectId}
{change}
{readonly}
unSelectHunk={(hunk) => unselectHunk(hunk, diff.subject.hunks)}
/>
{:else}
<div class="hunk-placehoder">
<EmptyStatePlaceholder image={emptyFileSvg} gap={12} topBottomPadding={34}>
Expand All @@ -235,6 +226,17 @@
</EmptyStatePlaceholder>
</div>
{/each}

<!-- The context menu should be outside the each block. -->
<HunkContextMenu
bind:this={contextMenu}
trigger={viewport}
projectPath={project.vscodePath}
{projectId}
{change}
{readonly}
unSelectHunk={(hunk) => unselectHunk(hunk, diff.subject.hunks)}
/>
{:else if diff.type === 'TooLarge'}
<div class="hunk-placehoder">
<EmptyStatePlaceholder image={tooLargeSvg} gap={12} topBottomPadding={34}>
Expand Down
Loading