fix(jobs): show job log times in local time and give the Type column room; 1.1.1
CI / Build and test (pull_request) Successful in 11m47s
CI / Windows tests and installer (pull_request) Skipped
CI / YAML check (pull_request) Successful in 12s
CI / PostgreSQL 16 integration (pull_request) Successful in 10m37s
CI / PostgreSQL 17 integration (pull_request) Successful in 9m56s
CI / Docker image (pull_request) Successful in 1m48s
CI / Build and test (pull_request) Successful in 11m47s
CI / Windows tests and installer (pull_request) Skipped
CI / YAML check (pull_request) Successful in 12s
CI / PostgreSQL 16 integration (pull_request) Successful in 10m37s
CI / PostgreSQL 17 integration (pull_request) Successful in 9m56s
CI / Docker image (pull_request) Successful in 1m48s
The Windows hands-on test of 1.1.0 found two things in Jobs. The log under a job showed UTC times (12:35) next to rows in local time (13:35): the stored log keeps UTC, so a server's jobs read right anywhere, and the desktop now dates the lines backwards from the job's end and shows them in local time. The Type column cut "Analisi approfondita" at a 0.7* share; a 1* share (90-170 px) fits it in a 1440 px window and still gives way at the 1200 px minimum. Builds without a release tag say 1.1.1; CHANGELOG [1.1.1], STATUS and DECISIONS updated. Refs #70 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a191c70b7b
commit
a89ec10ebf
17 files changed
+152
-8
No files matched your search
@@ -129,6 +129,47 @@ public sealed class JobsScreenSmokeTests
|
||||
}
|
||||
});
|
||||
|
||||
/// <summary>
|
||||
/// In a 1440 px window (a 1920 px screen at 100 %), the Type column shows the Italian kinds whole, the longest
|
||||
/// "Analisi approfondita" included: it was cut at a 0.7* share (#70).
|
||||
/// </summary>
|
||||
[Test]
|
||||
public Task KindsFitTheTypeColumnInItalianAt1440() => ScreenHost.RunAsync(async () =>
|
||||
{
|
||||
await using var app = await ScreenSmokeTests.SampleApp.StartAsync();
|
||||
var shell = app.Shell;
|
||||
await app.Sample.FillAsync();
|
||||
await shell.Jobs.ReloadAsync();
|
||||
shell.Navigate(SectionKey.Jobs);
|
||||
await app.ExpectAsync<JobsView>("jobs");
|
||||
app.Window.Width = 1440;
|
||||
UiLanguage.Apply("it");
|
||||
try
|
||||
{
|
||||
app.Window.UpdateLayout();
|
||||
await app.Window.Dispatcher.InvokeAsync(() => { }, System.Windows.Threading.DispatcherPriority.ApplicationIdle);
|
||||
var items = app.FindAll<ListBoxItem>().Where(i => i.DataContext is JobRowViewModel && i.IsVisible).ToList();
|
||||
Assert.True(items.Count > 3, "several rows are on screen");
|
||||
foreach (var item in items)
|
||||
{
|
||||
var row = (JobRowViewModel)item.DataContext;
|
||||
var kind = Descendants<TextBlock>(item).First(t => t.Text == row.Kind);
|
||||
Assert.True(Needed(kind, kind.Text) <= kind.ActualWidth + 0.5, $"'{row.Kind}' needs {Needed(kind, kind.Text):0.0} px, has {kind.ActualWidth:0.0}");
|
||||
var deep = JobText.Kind(Core.Model.JobKind.DeepAnalyse);
|
||||
Assert.True(Needed(kind, deep) <= kind.ActualWidth + 0.5, $"'{deep}' needs {Needed(kind, deep):0.0} px, has {kind.ActualWidth:0.0}");
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
UiLanguage.Apply("en");
|
||||
}
|
||||
});
|
||||
|
||||
/// <summary>The width <paramref name="text"/> takes in <paramref name="cell"/>'s font.</summary>
|
||||
private static double Needed(TextBlock cell, string text) => new FormattedText(text, System.Globalization.CultureInfo.CurrentUICulture, cell.FlowDirection,
|
||||
new Typeface(cell.FontFamily, cell.FontStyle, cell.FontWeight, cell.FontStretch), cell.FontSize, Brushes.Black,
|
||||
VisualTreeHelper.GetDpi(cell).PixelsPerDip).WidthIncludingTrailingWhitespace;
|
||||
|
||||
/// <summary>The left and right edges of an element in window coordinates, whichever way the window reads.</summary>
|
||||
private static (double Left, double Right) Span(FrameworkElement element, Window window)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user