fix(app): announce job and transfer states, not progress ticks; smoke tests for the screens
- Jobs and sync rows announce a new state with their job or sequence; the update check announces each state, not each download percent. Live regions stay quiet when a recycled row shows another item or a language switch relabels them. - The first-run dialog keeps its chosen card as the window's focused element, so focus starts inside it even before the window is active. - Known-server addresses read left to right in the menu. - Smoke tests: row names and states, row buttons, radio chips, header and cell columns, Workers readout, badge and strip counts, Settings values set elsewhere, German labels never cut, the cache row at 1200 px, no Reset on Advanced, Forget asks first, first-run focus and the RTL window direction. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
18 files changed
+398
-8
No files matched your search
@@ -58,7 +58,7 @@
|
||||
<StackPanel Grid.Row="7" Grid.Column="1" Orientation="Horizontal">
|
||||
<ui:StatusGlyph Kind="{Binding UpdateKind}" Text="{Binding UpdateText}" FontSize="13" VerticalAlignment="Center"
|
||||
Visibility="{Binding HasUpdateText, Converter={StaticResource BoolToVisibility}}"
|
||||
AutomationProperties.LiveSetting="Polite" infra:LiveRegion.Text="{Binding UpdateText}" />
|
||||
AutomationProperties.LiveSetting="Polite" infra:LiveRegion.Text="{Binding UpdateAnnouncement}" />
|
||||
<Button Style="{StaticResource Button.Link}" FontSize="13" Margin="12,0,0,0" VerticalAlignment="Center" Content="{l:Loc About.Update.Download}"
|
||||
Command="{Binding DownloadCommand}" ToolTip="{Binding DownloadToolTip}"
|
||||
Visibility="{Binding IsUpdateAvailable, Converter={StaticResource BoolToVisibility}}" />
|
||||
|
||||
@@ -81,6 +81,9 @@ public sealed class AboutViewModel : SectionViewModel
|
||||
_ => null,
|
||||
};
|
||||
|
||||
/// <summary>What screen readers announce: each new state, not each percent of a download.</summary>
|
||||
public string? UpdateAnnouncement => _update.State == UpdateState.Downloading ? Loc.L("About.Update.InProgress") : UpdateText;
|
||||
|
||||
public StatusKind UpdateKind => _update.State switch
|
||||
{
|
||||
UpdateState.Checking or UpdateState.Downloading => StatusKind.Running,
|
||||
@@ -137,6 +140,7 @@ public sealed class AboutViewModel : SectionViewModel
|
||||
private void RaiseUpdate()
|
||||
{
|
||||
OnPropertyChanged(nameof(UpdateText));
|
||||
OnPropertyChanged(nameof(UpdateAnnouncement));
|
||||
OnPropertyChanged(nameof(UpdateKind));
|
||||
OnPropertyChanged(nameof(HasUpdateText));
|
||||
OnPropertyChanged(nameof(IsUpdateAvailable));
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
xmlns:ui="clr-namespace:Titano.Ui.Controls;assembly=Titano.Ui"
|
||||
xmlns:l="clr-namespace:Titano.Ui.Localization;assembly=Titano.Ui"
|
||||
xmlns:s="clr-namespace:Titano.App.Sections"
|
||||
xmlns:infra="clr-namespace:Titano.App.Infrastructure"
|
||||
xmlns:j="clr-namespace:Titano.App.Jobs">
|
||||
<UserControl.Resources>
|
||||
<Style x:Key="Text.Muted" TargetType="TextBlock" BasedOn="{StaticResource Text.Cell}">
|
||||
@@ -167,8 +168,10 @@
|
||||
<TextBlock Grid.Column="4" Style="{StaticResource Text.MutedNumber}" Text="{Binding SpeedText}" Margin="10,0,0,0" />
|
||||
<TextBlock Grid.Column="5" Style="{StaticResource Text.MutedNumber}" Text="{Binding LeftText}" Margin="10,0,0,0" />
|
||||
<TextBlock Grid.Column="6" Style="{StaticResource Text.Muted}" Text="{Binding WhereText}" Margin="16,0,0,0" />
|
||||
<!-- A new state is announced with its job; progress ticks are not. -->
|
||||
<ui:StatusGlyph Grid.Column="7" Kind="{Binding StateKind}" Text="{Binding StateText}" ToolTip="{Binding StateToolTip}"
|
||||
FontSize="13" VerticalAlignment="Center" Margin="10,0,0,0" />
|
||||
FontSize="13" VerticalAlignment="Center" Margin="10,0,0,0"
|
||||
AutomationProperties.LiveSetting="Polite" infra:LiveRegion.Text="{Binding StateAnnouncement}" />
|
||||
<ItemsControl Grid.Column="8" ItemsSource="{Binding Actions}" ItemsPanel="{StaticResource Panel.Row}" Focusable="False"
|
||||
VerticalAlignment="Center" Margin="10,0,0,0">
|
||||
<ItemsControl.ItemTemplate>
|
||||
|
||||
@@ -84,6 +84,14 @@
|
||||
<ContextMenu.ItemContainerStyle>
|
||||
<Style TargetType="MenuItem" BasedOn="{StaticResource {x:Type MenuItem}}">
|
||||
<Setter Property="Header" Value="{Binding Address}" />
|
||||
<!-- An address reads left to right in every language. -->
|
||||
<Setter Property="HeaderTemplate">
|
||||
<Setter.Value>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" FlowDirection="LeftToRight" />
|
||||
</DataTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="InputGestureText" Value="{Binding Name}" />
|
||||
<Setter Property="Command" Value="{Binding DataContext.UseServerCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}" />
|
||||
<Setter Property="CommandParameter" Value="{Binding}" />
|
||||
@@ -244,8 +252,10 @@
|
||||
<TextBlock Style="{StaticResource Text.Cell}" Text="{Binding Title}" ToolTip="{Binding Title}" />
|
||||
<TextBlock Grid.Column="1" Style="{StaticResource Text.Cell}" Text="{Binding LocalText}" ToolTip="{Binding LocalText}" Margin="10,0,0,0" />
|
||||
<TextBlock Grid.Column="2" Style="{StaticResource Text.Cell}" Text="{Binding ServerText}" ToolTip="{Binding ServerText}" Margin="10,0,0,0" />
|
||||
<!-- A new state (uploading, in sync, failed) is announced with its sequence; progress ticks are not. -->
|
||||
<ui:StatusGlyph Grid.Column="3" Kind="{Binding StateKind}" Text="{Binding StateText}" ToolTip="{Binding StateToolTip}"
|
||||
FontSize="13" VerticalAlignment="Center" Margin="10,0,0,0" />
|
||||
FontSize="13" VerticalAlignment="Center" Margin="10,0,0,0"
|
||||
AutomationProperties.LiveSetting="Polite" infra:LiveRegion.Text="{Binding StateAnnouncement}" />
|
||||
<ItemsControl Grid.Column="4" ItemsSource="{Binding Actions}" ItemsPanel="{StaticResource Panel.Wrap}" Focusable="False" VerticalAlignment="Center" Margin="10,4,0,4">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type srv:SyncRowAction}">
|
||||
|
||||
@@ -383,7 +383,7 @@
|
||||
<Button Content="{l:Loc About.Update.Check}" Command="{Binding Shell.About.CheckCommand}" ToolTip="{l:Loc Tooltips.About.Check}" />
|
||||
<ui:StatusGlyph Kind="{Binding Shell.About.UpdateKind}" Text="{Binding Shell.About.UpdateText}" FontSize="13" VerticalAlignment="Center" Margin="12,0,0,0"
|
||||
Visibility="{Binding Shell.About.HasUpdateText, Converter={StaticResource BoolToVisibility}}"
|
||||
AutomationProperties.LiveSetting="Polite" infra:LiveRegion.Text="{Binding Shell.About.UpdateText}" />
|
||||
AutomationProperties.LiveSetting="Polite" infra:LiveRegion.Text="{Binding Shell.About.UpdateAnnouncement}" />
|
||||
<Button Style="{StaticResource Button.Link}" Content="{l:Loc About.Update.Download}" Command="{Binding Shell.About.DownloadCommand}" ToolTip="{Binding Shell.About.DownloadToolTip}"
|
||||
VerticalAlignment="Center" Margin="12,0,0,0" FontSize="13"
|
||||
Visibility="{Binding Shell.About.IsUpdateAvailable, Converter={StaticResource BoolToVisibility}}" />
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Threading;
|
||||
@@ -16,10 +15,14 @@ public partial class WelcomeView : UserControl
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>The dialog opens with keyboard focus on the chosen card, so the keyboard starts inside it.</summary>
|
||||
/// <summary>
|
||||
/// The dialog opens with focus on the chosen card, so the keyboard starts inside it; the window keeps it as its focused
|
||||
/// element, so a window not active yet gives the card keyboard focus when activated.
|
||||
/// </summary>
|
||||
private void FocusChoice()
|
||||
{
|
||||
var chosen = new[] { LocalChoice, AdoptChoice, ServerChoice }.FirstOrDefault(c => c.IsChecked == true) ?? LocalChoice;
|
||||
FocusManager.SetFocusedElement(FocusManager.GetFocusScope(chosen), chosen);
|
||||
Keyboard.Focus(chosen);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user