refactor(ui): clean up task-row drag visuals
Collapse the grabbed row out of layout instead of overlapping neighbors with scale/opacity/shadow (the ghost window already shows the moving snapshot). Replace the thin moss drop-hint lines with a dashed placeholder gap sized like a collapsed row. Suppress the ordinary hover highlight and transitions on whatever row is currently the drop target so it doesn't read as "clickable" while dragging.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using ClaudeDo.Data.Models;
|
||||
using ClaudeDo.Ui.ViewModels.Islands;
|
||||
using Xunit;
|
||||
@@ -20,4 +21,25 @@ public class TaskRowViewModelTests
|
||||
vm.Status = s;
|
||||
Assert.Equal(expected, vm.StatusChipClass);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void IsDropTarget_Follows_Either_DropHint_And_Raises_PropertyChanged()
|
||||
{
|
||||
var vm = new TaskRowViewModel { Id = "t" };
|
||||
var raised = new List<string?>();
|
||||
vm.PropertyChanged += (_, e) => raised.Add(e.PropertyName);
|
||||
|
||||
Assert.False(vm.IsDropTarget);
|
||||
|
||||
vm.DropHintAbove = true;
|
||||
Assert.True(vm.IsDropTarget);
|
||||
Assert.Contains(nameof(TaskRowViewModel.IsDropTarget), raised);
|
||||
|
||||
vm.DropHintAbove = false;
|
||||
vm.DropHintBelow = true;
|
||||
Assert.True(vm.IsDropTarget);
|
||||
|
||||
vm.DropHintBelow = false;
|
||||
Assert.False(vm.IsDropTarget);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user