feat: wider rail and admin sidebar that collapse to icons
Owner review 1, phase 3a (docs/requests/2026-10-15-owner-review-1.md, R1). The desktop rail is 200 px wide, so the section names fit in every language, and collapses to 48 px of icons with its ≡ button or Ctrl+B. Collapsed, each icon's tooltip names its section before saying what it is for, while screen readers keep the name and the description. The choice is written to the settings file the moment it changes (nothing else restarts) and survives Settings › Reset all and Import; Ctrl+B waits behind the first-run dialog like Ctrl+1…6, and a held key toggles once. The admin panel's sidebar is 256 px and collapses to icons the same way, with its own ≡ button or Ctrl+B (on the physical key where the layout's B types no Latin letter, so Cyrillic, Greek, Hebrew and Arabic layouts work). The choice is kept in the browser, for the page when the browser refuses storage, and the tables fit their columns again after each toggle. At 900 px and below it stays the top bar and Ctrl+B stays the browser's. The wider rail leaves 49-72 px less for every screen at the 1200 px minimum. Six adversarial review rounds found what that cut, and in every shipped language no action is cut off now: the Jobs columns share their width (Target and Progress give way first, Kind/Where/State capped on wide windows), the editor's preview tools take a second line, a server job's Cancel has its own header column, the Archive tree keeps a year's label, the Import rows and result, the certificates and cache rows and the frame table fit. Headers, titles and cells that may be shortened end in an ellipsis and show their text in their tooltip; state tooltips start with the state, and their explanations were reworded not to repeat it (a queued job "waits for its turn", jobs running one at a time). The crop-result tool sits beside Crop mask, disabled with its reason while the mask is off. Tests check these rows in all 38 languages at 1200 px; the App test program now shuts WPF down in order, so its exit no longer crashes after every test passed. Phase 3 lands as two commits: R7 (the Edit section) edits the same shell files and follows. Also updates BRIEF (12.1, 14.8, 24), DECISIONS, CHANGELOG, STATUS, the request file, DESIGN and the mockups; every new or reworded string is in all 38 languages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
43b6871cdc
commit
4ea44bb917
131 files changed
+1458
-670
No files matched your search
@@ -330,6 +330,165 @@ public sealed class EditorSmokeTests
|
||||
}
|
||||
});
|
||||
|
||||
/// <summary>
|
||||
/// At the 1200 px minimum beside the 200 px rail (owner review 1, R1), the preview's tools stay inside the preview in
|
||||
/// every language, crop mask on (the crop-result tool enabled): they take a second line rather than lose Play and Full screen.
|
||||
/// </summary>
|
||||
[Test]
|
||||
public Task ThePreviewToolsStayInsideThePreviewInEveryLanguage() => ScreenHost.RunAsync(async () =>
|
||||
{
|
||||
await using var app = await ScreenSmokeTests.SampleApp.StartAsync();
|
||||
app.Window.Width = 1200;
|
||||
app.Window.Height = 788;
|
||||
var id = await app.Sample.FillEditorAsync();
|
||||
app.Shell.OpenSequence(id);
|
||||
await app.Shell.Sequence.OpenAsync(id);
|
||||
var editor = Assert.NotNull(app.Shell.Sequence.Editor);
|
||||
try
|
||||
{
|
||||
editor.SelectedTab = editor.Exposure;
|
||||
editor.ShowCropMask = true;
|
||||
foreach (var language in Languages.Shipped)
|
||||
{
|
||||
UiLanguage.Apply(language);
|
||||
await SettleAsync(app.Window);
|
||||
var viewport = Find<PreviewViewport>(app.Window).Single(v => v.IsVisible);
|
||||
var (left, right) = Span(viewport, app.Window);
|
||||
var tools = Find<System.Windows.Controls.Primitives.ButtonBase>(viewport).Where(b => b.IsVisible).ToList();
|
||||
Assert.True(tools.Count >= 8, $"{language}: every tool shows ({tools.Count})");
|
||||
foreach (var tool in tools)
|
||||
{
|
||||
var (start, end) = Span(tool, app.Window);
|
||||
Assert.True(start >= left - 0.5 && end <= right + 0.5,
|
||||
$"{language}: the tool '{System.Windows.Automation.AutomationProperties.GetName(tool)}{tool.Content}' spans {start:0}–{end:0} px, the preview {left:0}–{right:0} px");
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
UiLanguage.Apply("en");
|
||||
await app.Shell.Sequence.CloseAsync();
|
||||
}
|
||||
});
|
||||
|
||||
/// <summary>
|
||||
/// At the 1200 px minimum beside the 200 px rail (owner review 1, R1), a server sequence's job keeps its Cancel whole in every
|
||||
/// language, also read-only (the longest place line): the title and the summary give way first (BRIEF §11.5, cancel always stays).
|
||||
/// </summary>
|
||||
[Test]
|
||||
public Task AServerJobKeepsItsCancelAtTheMinimumWidthInEveryLanguage() => ScreenHost.RunAsync(async () =>
|
||||
{
|
||||
await using var app = await ScreenSmokeTests.SampleApp.StartAsync();
|
||||
app.Window.Width = 1200;
|
||||
app.Window.Height = 788;
|
||||
await app.Sample.FillAsync();
|
||||
await app.Services.Server.RestoreAsync();
|
||||
await app.Services.Sync.RefreshAsync();
|
||||
await app.Sample.CacheProxiesAsync();
|
||||
await app.Sample.RestrictAccountAsync();
|
||||
var id = app.Sample.ProxiedSequenceId;
|
||||
app.Shell.OpenSequence(id);
|
||||
await app.Shell.Sequence.OpenAsync(id);
|
||||
var editor = Assert.NotNull(app.Shell.Sequence.Editor);
|
||||
try
|
||||
{
|
||||
Assert.True(editor.IsReadOnly, "the account may not edit");
|
||||
app.Sample.RunServerRender();
|
||||
await editor.AttachJobsAsync();
|
||||
Assert.NotNull(editor.ServerJobText, "the server's render shows");
|
||||
foreach (var language in Languages.Shipped)
|
||||
{
|
||||
UiLanguage.Apply(language);
|
||||
await SettleAsync(app.Window);
|
||||
var cancel = Find<Button>(app.Window).Single(b => b.IsVisible && ReferenceEquals(b.Command, editor.CancelServerJobCommand));
|
||||
// Drawn whole: its left edge, its middle and its right edge each take the pointer (a layout clip would not).
|
||||
foreach (var x in new[] { 2.0, cancel.ActualWidth / 2, cancel.ActualWidth - 2 })
|
||||
{
|
||||
var point = cancel.TranslatePoint(new Point(x, cancel.ActualHeight / 2), app.Window);
|
||||
Assert.True(app.Window.InputHitTest(point) is DependencyObject hit && IsWithin(hit, cancel),
|
||||
$"{language}: Cancel is cut at {x:0} px of its {cancel.ActualWidth:0}");
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
UiLanguage.Apply("en");
|
||||
app.Sample.EndServerJobs();
|
||||
await app.Shell.Sequence.CloseAsync();
|
||||
}
|
||||
});
|
||||
|
||||
/// <summary>
|
||||
/// At the 1200 px minimum beside the 200 px rail (owner review 1, R1), the frame table's Time column holds the widest time
|
||||
/// of every shipped language (two-digit hours, morning and afternoon marks).
|
||||
/// </summary>
|
||||
[Test]
|
||||
public Task TheFrameTableShowsWholeTimesInEveryLanguage() => ScreenHost.RunAsync(async () =>
|
||||
{
|
||||
await using var app = await ScreenSmokeTests.SampleApp.StartAsync();
|
||||
app.Window.Width = 1200;
|
||||
app.Window.Height = 788;
|
||||
var id = await app.Sample.FillEditorAsync();
|
||||
app.Shell.OpenSequence(id);
|
||||
await app.Shell.Sequence.OpenAsync(id);
|
||||
var editor = Assert.NotNull(app.Shell.Sequence.Editor);
|
||||
try
|
||||
{
|
||||
editor.SelectedTab = editor.Frames;
|
||||
var times = new[] { new DateTime(2026, 1, 1, 12, 59, 59), new DateTime(2026, 1, 1, 22, 58, 48), new DateTime(2026, 1, 1, 10, 48, 58) };
|
||||
foreach (var language in Languages.Shipped)
|
||||
{
|
||||
UiLanguage.Apply(language);
|
||||
await SettleAsync(app.Window);
|
||||
var cell = Find<TextBlock>(app.Window).First(t => t.IsVisible && t.DataContext is FrameRow row && row.Time.Length > 0 && t.Text == row.Time);
|
||||
var widest = times.Max(t => Measure(cell, t.ToString("T", Loc.Culture)));
|
||||
Assert.True(widest <= cell.ActualWidth + 1, $"{language}: the widest time needs {widest:0} px, the column gives {cell.ActualWidth:0}");
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
UiLanguage.Apply("en");
|
||||
await app.Shell.Sequence.CloseAsync();
|
||||
}
|
||||
});
|
||||
|
||||
/// <summary>The width <paramref name="text"/> needs in the font, numerals and formatting of <paramref name="like"/>.</summary>
|
||||
private static double Measure(TextBlock like, string text)
|
||||
{
|
||||
var probe = new TextBlock
|
||||
{
|
||||
Text = text,
|
||||
FontFamily = like.FontFamily,
|
||||
FontSize = like.FontSize,
|
||||
FontStyle = like.FontStyle,
|
||||
FontWeight = like.FontWeight,
|
||||
FontStretch = like.FontStretch,
|
||||
FlowDirection = like.FlowDirection,
|
||||
Language = like.Language,
|
||||
};
|
||||
System.Windows.Documents.Typography.SetNumeralAlignment(probe, System.Windows.Documents.Typography.GetNumeralAlignment(like));
|
||||
TextOptions.SetTextFormattingMode(probe, TextOptions.GetTextFormattingMode(like));
|
||||
probe.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
|
||||
return probe.DesiredSize.Width;
|
||||
}
|
||||
|
||||
private static bool IsWithin(DependencyObject node, DependencyObject ancestor)
|
||||
{
|
||||
for (var at = node; at is not null; at = VisualTreeHelper.GetParent(at))
|
||||
{
|
||||
if (ReferenceEquals(at, ancestor)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <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)
|
||||
{
|
||||
var a = element.TranslatePoint(new Point(0, 0), window).X;
|
||||
var b = element.TranslatePoint(new Point(element.ActualWidth, 0), window).X;
|
||||
return (Math.Min(a, b), Math.Max(a, b));
|
||||
}
|
||||
|
||||
/// <summary>The measuring tool of each section has content.</summary>
|
||||
private static void ExpectMeasure(SequenceView view, EditorTab tab)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user