feat(ui): add DescriptionStepsCard detail component
Standalone UserControl combining Description + Steps into one card with a top-right toggle. Description view shows raw editor or composed MarkdownView (title + description + open steps). Steps view has an add-step input and subtask rows with inline editing and check circles. Adds Icon.Text geometry to IslandStyles for the steps→description toggle. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Input.Platform;
|
||||
using Avalonia.Interactivity;
|
||||
using ClaudeDo.Ui.ViewModels.Islands.Detail;
|
||||
|
||||
namespace ClaudeDo.Ui.Views.Islands.Detail;
|
||||
|
||||
public partial class DescriptionStepsCard : UserControl
|
||||
{
|
||||
public DescriptionStepsCard()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private async void OnCopyClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
if (DataContext is not DescriptionStepsCardViewModel vm) return;
|
||||
var clipboard = TopLevel.GetTopLevel(this)?.Clipboard;
|
||||
if (clipboard is null) return;
|
||||
await clipboard.SetTextAsync(vm.ComposedPreview);
|
||||
}
|
||||
|
||||
private void OnSubtaskTitleTapped(object? sender, TappedEventArgs e)
|
||||
{
|
||||
if (sender is TextBlock { DataContext: SubtaskRowSampleViewModel row })
|
||||
row.IsEditing = true;
|
||||
}
|
||||
|
||||
private void OnSubtaskEditLostFocus(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is TextBox { DataContext: SubtaskRowSampleViewModel row })
|
||||
row.IsEditing = false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user