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>
125 lines
9.3 KiB
XML
125 lines
9.3 KiB
XML
<ui:TitanoWindow x:Class="Titano.App.Shell.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:ui="clr-namespace:Titano.Ui.Controls;assembly=Titano.Ui"
|
|
xmlns:l="clr-namespace:Titano.Ui.Localization;assembly=Titano.Ui"
|
|
xmlns:shell="clr-namespace:Titano.App.Shell"
|
|
xmlns:infra="clr-namespace:Titano.App.Infrastructure"
|
|
xmlns:s="clr-namespace:Titano.App.Sections"
|
|
Title="{Binding WindowTitle}"
|
|
Width="1440" Height="900" MinWidth="1200" MinHeight="760"
|
|
WindowStartupLocation="CenterScreen">
|
|
<!-- The taskbar button mirrors the job bar (BRIEF §11.5); red while a failure waits on the Jobs screen. -->
|
|
<ui:TitanoWindow.TaskbarItemInfo>
|
|
<TaskbarItemInfo ProgressState="{Binding TaskbarState}" ProgressValue="{Binding TaskbarProgress}" />
|
|
</ui:TitanoWindow.TaskbarItemInfo>
|
|
<!-- Sections by keyboard, as the rail tooltips list them (BRIEF §12.1): Ctrl+1…6 down the rail, Ctrl+, for Settings. -->
|
|
<ui:TitanoWindow.InputBindings>
|
|
<KeyBinding Key="D1" Modifiers="Control" Command="{Binding NavigateCommand}" CommandParameter="{x:Static shell:SectionKey.Library}" />
|
|
<KeyBinding Key="D2" Modifiers="Control" Command="{Binding NavigateCommand}" CommandParameter="{x:Static shell:SectionKey.Import}" />
|
|
<KeyBinding Key="D3" Modifiers="Control" Command="{Binding NavigateCommand}" CommandParameter="{x:Static shell:SectionKey.Sequence}" />
|
|
<KeyBinding Key="D4" Modifiers="Control" Command="{Binding NavigateCommand}" CommandParameter="{x:Static shell:SectionKey.Archive}" />
|
|
<KeyBinding Key="D5" Modifiers="Control" Command="{Binding NavigateCommand}" CommandParameter="{x:Static shell:SectionKey.Jobs}" />
|
|
<KeyBinding Key="D6" Modifiers="Control" Command="{Binding NavigateCommand}" CommandParameter="{x:Static shell:SectionKey.Server}" />
|
|
<KeyBinding Key="NumPad1" Modifiers="Control" Command="{Binding NavigateCommand}" CommandParameter="{x:Static shell:SectionKey.Library}" />
|
|
<KeyBinding Key="NumPad2" Modifiers="Control" Command="{Binding NavigateCommand}" CommandParameter="{x:Static shell:SectionKey.Import}" />
|
|
<KeyBinding Key="NumPad3" Modifiers="Control" Command="{Binding NavigateCommand}" CommandParameter="{x:Static shell:SectionKey.Sequence}" />
|
|
<KeyBinding Key="NumPad4" Modifiers="Control" Command="{Binding NavigateCommand}" CommandParameter="{x:Static shell:SectionKey.Archive}" />
|
|
<KeyBinding Key="NumPad5" Modifiers="Control" Command="{Binding NavigateCommand}" CommandParameter="{x:Static shell:SectionKey.Jobs}" />
|
|
<KeyBinding Key="NumPad6" Modifiers="Control" Command="{Binding NavigateCommand}" CommandParameter="{x:Static shell:SectionKey.Server}" />
|
|
<KeyBinding Key="OemComma" Modifiers="Control" Command="{Binding NavigateCommand}" CommandParameter="{x:Static shell:SectionKey.Settings}" />
|
|
<!-- The rail's names or its icons alone (owner review 1). -->
|
|
<KeyBinding Key="B" Modifiers="Control" Command="{Binding ToggleRailCommand}" />
|
|
</ui:TitanoWindow.InputBindings>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- Navigation rail: full names, collapsible to icons (BRIEF §12.1; owner review 1): 200 px with names, 48 px of icons
|
|
whose tooltips name their section, by ≡ or Ctrl+B, and the choice is kept. While the first-run dialog is open the
|
|
shell behind it takes no input. The buttons of both lists form one group (GroupName); their check binds one way,
|
|
the section the shell navigates to (a GroupName spans every window not yet on screen). -->
|
|
<Border x:Name="Rail" Background="{DynamicResource Brush.Chrome}" ui:NavRail.IsCollapsed="{Binding IsRailCollapsed}"
|
|
IsEnabled="{Binding IsShellEnabled}">
|
|
<Border.Style>
|
|
<Style TargetType="Border">
|
|
<Setter Property="Width" Value="{StaticResource Width.Rail}" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsRailCollapsed}" Value="True">
|
|
<Setter Property="Width" Value="{StaticResource Width.RailCollapsed}" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Border.Style>
|
|
<DockPanel Margin="8,8,8,8" LastChildFill="False">
|
|
<Button DockPanel.Dock="Top" Style="{StaticResource Button.IconSubtle}" HorizontalAlignment="Left" Margin="0,0,0,6"
|
|
ui:ButtonIcon.Glyph="{StaticResource Icon.Menu}" Command="{Binding ToggleRailCommand}"
|
|
ToolTip="{Binding RailToggleToolTip}" AutomationProperties.Name="{Binding RailToggleName}" />
|
|
<!-- The tooltip names the section while the rail shows icons alone; screen readers hear the name once, then what it is for. -->
|
|
<ItemsControl DockPanel.Dock="Top" ItemsSource="{Binding TopSections}" Focusable="False">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate DataType="{x:Type shell:SectionViewModel}">
|
|
<ui:NavRailButton GroupName="Rail" Glyph="{Binding Glyph}" Content="{Binding Label}" Badge="{Binding Badge}"
|
|
IsChecked="{Binding IsSelected, Mode=OneWay}" ToolTip="{Binding RailToolTip}" AutomationProperties.Name="{Binding Label}"
|
|
AutomationProperties.HelpText="{Binding ToolTip}"
|
|
Command="{Binding DataContext.NavigateCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}" CommandParameter="{Binding}" />
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
<ItemsControl DockPanel.Dock="Bottom" ItemsSource="{Binding BottomSections}" Focusable="False">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate DataType="{x:Type shell:SectionViewModel}">
|
|
<ui:NavRailButton GroupName="Rail" Glyph="{Binding Glyph}" Content="{Binding Label}" Badge="{Binding Badge}"
|
|
IsChecked="{Binding IsSelected, Mode=OneWay}" ToolTip="{Binding RailToolTip}" AutomationProperties.Name="{Binding Label}"
|
|
AutomationProperties.HelpText="{Binding ToolTip}"
|
|
Command="{Binding DataContext.NavigateCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}" CommandParameter="{Binding}" />
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</DockPanel>
|
|
</Border>
|
|
|
|
<Grid Grid.Column="1" IsEnabled="{Binding IsShellEnabled}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Job bar (DESIGN §4): current job, progress, time left, pause; "Ready" when idle, hidden when idle in the editor.
|
|
Screen readers hear which job starts and when the queue empties, not its progress ticks. -->
|
|
<ui:JobBar x:Name="JobBar" Text="{Binding JobText}" Progress="{Binding JobProgress}" IsActive="{Binding IsJobActive}" IsIndeterminate="{Binding IsJobIndeterminate}"
|
|
StopCommand="{Binding StopJobCommand}" StopToolTip="{l:Loc Tooltips.Shell.PauseJob}" StopName="{l:Loc Shell.JobBar.Pause}" ActionGlyph="{StaticResource Icon.Pause}"
|
|
Visibility="{Binding IsJobBarVisible, Converter={StaticResource BoolToVisibility}}"
|
|
AutomationProperties.LiveSetting="Polite" infra:LiveRegion.Text="{Binding JobAnnouncement}" />
|
|
|
|
<ContentControl Grid.Row="1" Content="{Binding Current}" Focusable="False" />
|
|
|
|
<!-- Status strip -->
|
|
<Border Grid.Row="2" Height="30" Background="{DynamicResource Brush.Chrome}" Padding="20,0">
|
|
<StackPanel Orientation="Horizontal" TextElement.FontSize="12" TextElement.Foreground="{DynamicResource Brush.TextMuted}">
|
|
<TextBlock Text="{Binding SequencesText}" Margin="0,0,18,0" VerticalAlignment="Center" />
|
|
<TextBlock Text="{Binding PhotosText}" Margin="0,0,18,0" VerticalAlignment="Center" />
|
|
<TextBlock Text="{Binding StorageText}" Margin="0,0,18,0" VerticalAlignment="Center" />
|
|
<TextBlock x:Name="Connection" Text="{Binding ConnectionText}" Margin="0,0,18,0" VerticalAlignment="Center"
|
|
AutomationProperties.LiveSetting="Polite" infra:LiveRegion.Text="{Binding ConnectionText}" />
|
|
<TextBlock Text="{Binding JobsText}" VerticalAlignment="Center" />
|
|
</StackPanel>
|
|
</Border>
|
|
</Grid>
|
|
|
|
<!-- First run (Welcome.html): the shell dimmed behind one dialog that keeps the keyboard. -->
|
|
<Grid x:Name="WelcomeOverlay" Grid.ColumnSpan="2" Visibility="{Binding IsWelcomeOpen, Converter={StaticResource BoolToVisibility}}"
|
|
KeyboardNavigation.TabNavigation="Cycle" KeyboardNavigation.ControlTabNavigation="Cycle" KeyboardNavigation.DirectionalNavigation="Contained">
|
|
<Border Background="{DynamicResource Brush.Scrim}" />
|
|
<s:WelcomeView DataContext="{Binding Welcome}" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,114,0,0"
|
|
AutomationProperties.Name="{l:Loc Shell.Welcome.Title}" />
|
|
</Grid>
|
|
|
|
<!-- Above the first-run dialog too, so a card inserted meanwhile can still be acted on (Welcome.html). -->
|
|
<ui:ToastHost x:Name="Toasts" Grid.ColumnSpan="2" />
|
|
</Grid>
|
|
</ui:TitanoWindow>
|