feat(ui): make steps visible at a glance; lift details card off background
The single flip-icon hid that steps existed until toggled. Replace it with an always-visible "STEPS" summary strip below the description (open/total count, click to expand and manage). Description is now always the card body. Give the card a Surface2 background + LineBrush border so it separates from the window. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -104,15 +104,28 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
||||
[RelayCommand]
|
||||
private void ToggleDescriptionExpanded() => IsDescriptionExpanded = !IsDescriptionExpanded;
|
||||
|
||||
// ── Description/Steps card (redesign) ──────────────────────────────
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(IsDescriptionView))]
|
||||
private bool _isStepsView;
|
||||
|
||||
public bool IsDescriptionView => !IsStepsView;
|
||||
// ── Description / Steps card (redesign) ─────────────────────────────
|
||||
// Description is always the card body; steps live in an expandable summary
|
||||
// strip below it so step presence is visible without switching views.
|
||||
[ObservableProperty] private bool _isStepsExpanded;
|
||||
|
||||
[RelayCommand]
|
||||
private void ToggleCardView() => IsStepsView = !IsStepsView;
|
||||
private void ToggleStepsExpanded() => IsStepsExpanded = !IsStepsExpanded;
|
||||
|
||||
public int TotalStepCount => Subtasks.Count;
|
||||
public int OpenStepCount => Subtasks.Count(s => !s.Done);
|
||||
public string StepsSummary =>
|
||||
TotalStepCount == 0 ? "no steps yet"
|
||||
: OpenStepCount == 0 ? $"all done · {TotalStepCount} total"
|
||||
: $"{OpenStepCount} open · {TotalStepCount} total";
|
||||
|
||||
private void NotifyStepsChanged()
|
||||
{
|
||||
OnPropertyChanged(nameof(TotalStepCount));
|
||||
OnPropertyChanged(nameof(OpenStepCount));
|
||||
OnPropertyChanged(nameof(StepsSummary));
|
||||
OnPropertyChanged(nameof(ComposedPreview));
|
||||
}
|
||||
|
||||
// The exact text handed to Claude: title + description + open steps only.
|
||||
public string ComposedPreview =>
|
||||
@@ -375,7 +388,7 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
||||
_services = services;
|
||||
_notesApi = notesApi;
|
||||
Notes = new NotesEditorViewModel(_notesApi);
|
||||
Subtasks.CollectionChanged += (_, _) => OnPropertyChanged(nameof(ComposedPreview));
|
||||
Subtasks.CollectionChanged += (_, _) => NotifyStepsChanged();
|
||||
Loc.LanguageChanged += (_, _) =>
|
||||
{
|
||||
OnPropertyChanged(nameof(AgentStatusLabel));
|
||||
@@ -1140,7 +1153,7 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
||||
{
|
||||
if (row is null) return;
|
||||
row.Done = !row.Done;
|
||||
OnPropertyChanged(nameof(ComposedPreview));
|
||||
NotifyStepsChanged();
|
||||
await using var ctx = _dbFactory.CreateDbContext();
|
||||
var repo = new SubtaskRepository(ctx);
|
||||
var subs = await repo.GetByTaskIdAsync(Task?.Id ?? "");
|
||||
|
||||
Reference in New Issue
Block a user