feat(ui): hide list chip outside virtual list views
Task rows now expose a ShowListChip flag that the tasks island sets only for Virtual list kinds, so the chip stops being redundant when viewing a single concrete list. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,7 @@ public sealed partial class TaskRowViewModel : ViewModelBase
|
||||
[ObservableProperty] private bool _isExpanded = true;
|
||||
[ObservableProperty] private bool _hasPlanningChildren;
|
||||
[ObservableProperty] private bool _hasQueuedSubtasks;
|
||||
[ObservableProperty] private bool _showListChip = true;
|
||||
|
||||
public DateTime CreatedAt { get; init; }
|
||||
public string CreatedAtFormatted => CreatedAt == default ? "—" : $"Created {CreatedAt:MMM d}";
|
||||
|
||||
@@ -192,8 +192,13 @@ public sealed partial class TasksIslandViewModel : ViewModelBase
|
||||
filteredList.Add(c);
|
||||
}
|
||||
|
||||
var showListChip = list.Kind == ListKind.Virtual;
|
||||
foreach (var t in filteredList)
|
||||
Items.Add(TaskRowViewModel.FromEntity(t));
|
||||
{
|
||||
var row = TaskRowViewModel.FromEntity(t);
|
||||
row.ShowListChip = showListChip;
|
||||
Items.Add(row);
|
||||
}
|
||||
|
||||
// Mark any top-level row that has at least one child as a planning parent,
|
||||
// so its subtasks remain expandable even after the parent is queued/running.
|
||||
@@ -342,6 +347,7 @@ public sealed partial class TasksIslandViewModel : ViewModelBase
|
||||
db.Tasks.Add(entity);
|
||||
await db.SaveChangesAsync();
|
||||
var row = TaskRowViewModel.FromEntity(entity);
|
||||
row.ShowListChip = _currentList?.Kind == ListKind.Virtual;
|
||||
Items.Add(row);
|
||||
Regroup();
|
||||
NewTaskTitle = "";
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
</Button>
|
||||
|
||||
<!-- List chip with dot -->
|
||||
<Border Classes="chip chip-list">
|
||||
<Border Classes="chip chip-list" IsVisible="{Binding ShowListChip}">
|
||||
<StackPanel Orientation="Horizontal" Spacing="5" VerticalAlignment="Center">
|
||||
<Ellipse Width="6" Height="6"
|
||||
Fill="{DynamicResource MossBrush}"
|
||||
|
||||
Reference in New Issue
Block a user