|
11 | 11 | import PrNumberUpdater from '$components/PrNumberUpdater.svelte';
|
12 | 12 | import ReduxResult from '$components/ReduxResult.svelte';
|
13 | 13 | import CodegenBadge from '$components/codegen/CodegenBadge.svelte';
|
| 14 | + import { BranchDropData } from '$lib/branches/dropHandler'; |
14 | 15 | import { CLAUDE_CODE_SERVICE } from '$lib/codegen/claude';
|
15 | 16 | import { CodegenRuleDropData, CodegenRuleDropHandler } from '$lib/codegen/dropzone';
|
16 | 17 | import { useGoToCodegenPage } from '$lib/codegen/redirect.svelte';
|
17 | 18 | import { MoveCommitDzHandler } from '$lib/commits/dropHandler';
|
18 |
| - import { draggableChips } from '$lib/dragging/draggable'; |
| 19 | + import { draggableBranch, draggableChips } from '$lib/dragging/draggable'; |
19 | 20 | import { DROPZONE_REGISTRY } from '$lib/dragging/registry';
|
20 | 21 | import { ReorderCommitDzHandler } from '$lib/dragging/stackingReorderDropzoneManager';
|
21 | 22 | import { DEFAULT_FORGE_FACTORY } from '$lib/forge/forgeFactory.svelte';
|
|
76 | 77 | isConflicted: boolean;
|
77 | 78 | contextMenu?: typeof BranchHeaderContextMenu;
|
78 | 79 | dropzones: DropzoneHandler[];
|
| 80 | + numberOfCommits: number; |
79 | 81 | onclick: () => void;
|
80 | 82 | menu?: Snippet<[{ rightClickTrigger: HTMLElement }]>;
|
81 | 83 | buttons?: Snippet;
|
|
151 | 153 | class:draft={args.type === 'draft-branch'}
|
152 | 154 | data-series-name={branchName}
|
153 | 155 | data-testid={TestId.BranchCard}
|
| 156 | + data-remove-from-panning |
| 157 | + use:draggableBranch={{ |
| 158 | + disabled: args.type !== 'stack-branch' || args.isConflicted, |
| 159 | + label: branchName, |
| 160 | + pushStatus: args.type === 'stack-branch' ? args.pushStatus : undefined, |
| 161 | + viewportId: 'board-viewport', |
| 162 | + data: |
| 163 | + args.type === 'stack-branch' && args.stackId |
| 164 | + ? new BranchDropData(args.stackId, branchName, args.isConflicted, args.numberOfCommits) |
| 165 | + : undefined, |
| 166 | + dropzoneRegistry, |
| 167 | + dragStateService |
| 168 | + }} |
154 | 169 | >
|
155 | 170 | {#if args.type === 'stack-branch'}
|
156 | 171 | {@const moveHandler = args.stackId
|
|
174 | 189 | >
|
175 | 190 | {#snippet overlay({ hovered, activated, handler })}
|
176 | 191 | {@const label =
|
177 |
| - handler instanceof MoveCommitDzHandler |
| 192 | + handler instanceof MoveCommitDzHandler || handler instanceof CodegenRuleDropHandler |
178 | 193 | ? 'Move here'
|
179 | 194 | : handler instanceof ReorderCommitDzHandler
|
180 | 195 | ? 'Reorder here'
|
181 |
| - : handler instanceof CodegenRuleDropHandler |
182 |
| - ? 'Move here' |
183 |
| - : 'Start commit'} |
| 196 | + : 'Start commit'} |
184 | 197 | <CardOverlay {hovered} {activated} {label} />
|
185 | 198 | {/snippet}
|
186 | 199 |
|
|
0 commit comments