Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/dotnet-retest/RetestCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using NuGet.Packaging;
using Spectre.Console;
using Spectre.Console.Cli;
using Spectre.Console.Rendering;
using static Spectre.Console.AnsiConsole;

namespace Devlooped;
Expand Down Expand Up @@ -82,7 +83,7 @@ public override async Task<int> ExecuteAsync(CommandContext context, RetestSetti

ProgressColumn[] columns = ci ?
[new TaskDescriptionColumn { Alignment = Justify.Left }] :
[new SpinnerColumn(), new ElapsedTimeColumn(), new TaskDescriptionColumn { Alignment = Justify.Left }];
[new SpinnerColumn(), new ElapsedTimeColumn(), new MultilineTaskDescriptionColumn()];

// 11 = spinner + elapsed time + padding
var maxwith = AnsiConsole.Console.Profile.Width - 11;
Expand Down Expand Up @@ -288,4 +289,14 @@ public class RetestSettings : CommandSettings

#endregion
}

class MultilineTaskDescriptionColumn : ProgressColumn
{
public override IRenderable Render(RenderOptions options, ProgressTask task, TimeSpan deltaTime)
{
return new Markup(task.Description ?? string.Empty)
.Overflow(Overflow.Ellipsis)
.Justify(Justify.Left);
}
}
}