Titano: Library completion, remote editing, accessibility and RTL pass, remaining translations #3

Merged
Alby96 merged 117 commits from claude/keen-knuth-uhxv8w into main 2026-10-12 09:24:21 +02:00
Showing only changes of commit 809711add6 - Show all commits
@@ -71,7 +71,7 @@ public sealed class ImportScreenSmokeTests
Assert.True(Fits(TextFor(app, file.SourceText)), "a file's name on the card is shown whole");
Assert.True(Fits(TextFor(app, file.DestinationText)), "a file's new name is shown whole");
Assert.True(Fits(TextFor(app, import.Details.Rows[0].SourceText)), "a session heading is shown whole");
Assert.Within(Left(app, TextFor(app, Loc.L("Import.Details.Column.Action"))), 0, Left(app, TextFor(app, file.ActionText)), 0, 1,
Assert.Within(Left(app, TextFor(app, Loc.L("Import.Details.Column.Action"))), 0, Left(app, TextFor(app, file.ActionText)), 0, 2,
"the Action header lines up with its cells");
AssertEveryButtonIsNamed(app);
@@ -139,7 +139,7 @@ public sealed class ImportScreenSmokeTests
var import = app.Shell.Import;
await ShowAsync(app, "plan");
Assert.Equal(ImportPhase.Ready, import.Phase);
Assert.Equal(FlowDirection.RightToLeft, Window.GetWindow(View(app))!.FlowDirection);
Assert.Equal(FlowDirection.RightToLeft, WindowOf(app).FlowDirection);
Assert.Equal(FlowDirection.LeftToRight, Named<TextBox>(app, "FolderPathBox").FlowDirection);
Assert.Equal(FlowDirection.LeftToRight, Named<TextBox>(app, "GapBox").FlowDirection);
foreach (var template in app.FindAll<TextBox>().Where(t => EditBehavior.GetField(t) is { } f && (f == import.FolderTemplate || f == import.FileTemplate)))
@@ -183,7 +183,7 @@ public sealed class ImportScreenSmokeTests
/// <summary>The size CI captures at (and the window's minimum width): nothing may be cut there.</summary>
private static async Task UseCaptureSizeAsync(ScreenSmokeTests.SampleApp app)
{
var window = Window.GetWindow(View(app))!;
var window = WindowOf(app);
window.Width = 1200;
window.Height = 788;
await SettleAsync(app);
@@ -191,7 +191,7 @@ public sealed class ImportScreenSmokeTests
private static async Task SettleAsync(ScreenSmokeTests.SampleApp app)
{
var window = Window.GetWindow(View(app))!;
var window = WindowOf(app);
window.UpdateLayout();
await window.Dispatcher.InvokeAsync(() => { }, System.Windows.Threading.DispatcherPriority.ApplicationIdle);
window.UpdateLayout();
@@ -241,6 +241,8 @@ public sealed class ImportScreenSmokeTests
}
}
private static Window WindowOf(ScreenSmokeTests.SampleApp app) => Window.GetWindow(app.FindAll<FrameworkElement>().First())!;
private static ImportView View(ScreenSmokeTests.SampleApp app) => app.FindAll<ImportView>().First(v => v.IsVisible);
private static bool IsInImport(DependencyObject element) => FindAncestor<ImportView>(element) is not null;
@@ -283,7 +285,7 @@ public sealed class ImportScreenSmokeTests
VisualTreeHelper.GetDpi(text).PixelsPerDip);
if (text.TextWrapping != TextWrapping.NoWrap)
{
formatted.MaxTextWidth = System.Math.Max(1, text.ActualWidth - text.Padding.Left - text.Padding.Right);
formatted.MaxTextWidth = System.Math.Max(1, text.ActualWidth - text.Padding.Left - text.Padding.Right + 1);
return formatted.Height <= text.ActualHeight + 0.5;
}
return formatted.WidthIncludingTrailingWhitespace <= text.ActualWidth - text.Padding.Left - text.Padding.Right + 1;