fix(uploader): follow right-to-left languages, name and reach every control by keyboard
Uploader: - Mirror the main window, the confirmation dialog and the tray menu for ar/he/fa/ur; keep paths, addresses, file names, the fingerprint, the brand mark and media glyphs left to right. - Queue rows take keyboard focus, are named "file · state" for screen readers, and Enter retries a failed file; a "✕ n failed" link jumps to the first failure; the list follows the upload near its top. - Focus moves into the settings panel (Tab cycles inside) and back to the gear, to Browse after sign-in and to the refused field after a failed one; activity changes and sign-in errors are announced. - A wrong address or password marks its field (error border, message in the tooltip); Retry only where it can help; session-ended toasts offer Sign in; the form stays visible while its own sign-in runs. - Watch chips and the add button wrap and shorten long paths; target choices wrap with their fields; the settings panel uses the side-panel width with wrapping labels; disabled controls say why. - The window opens at 760x700 (min 630 high) so the per-file list shows five rows; --capture adds an Arabic pass. Setup: - Every stage has a default and a cancel button (safe action first), the keyboard moves to the new default and outcomes are announced; the title-bar Close is disabled while files are written. - "Remove my data" measures the user data folder and shows the plan (largest entries, total) before Uninstall can run; the tooltip names backups and the uploader queue. - Folder field before Browse in Tab order; paths and file names left to right; disabled tooltips say why. Both: byte units come from the language (Common.Size.*). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
32 files changed
+1145
-227
No files matched your search
@@ -18,7 +18,8 @@
|
||||
<DockPanel>
|
||||
<ComboBox DockPanel.Dock="Right" MinWidth="180" VerticalAlignment="Center" ItemsSource="{Binding Languages}" SelectedItem="{Binding SelectedLanguage}"
|
||||
DisplayMemberPath="Name" IsEnabled="{Binding IsOptions}" ToolTip="{l:Loc Tooltips.Setup.Language}" AutomationProperties.Name="{l:Loc Setup.Field.Language}" />
|
||||
<ui:BrandMarkIcon ShowPlate="True" Width="40" Height="40" Margin="0,0,14,0" VerticalAlignment="Center" />
|
||||
<!-- The mark is artwork: its off-centre sun must not flip in right-to-left languages. -->
|
||||
<ui:BrandMarkIcon ShowPlate="True" Width="40" Height="40" Margin="0,0,14,0" VerticalAlignment="Center" FlowDirection="LeftToRight" />
|
||||
<StackPanel VerticalAlignment="Center">
|
||||
<TextBlock Text="{Binding Heading}" Style="{StaticResource Text.PageTitle}" />
|
||||
<TextBlock Text="{Binding SubHeading}" Style="{StaticResource Text.Secondary}" />
|
||||
@@ -43,7 +44,7 @@
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<DockPanel Margin="0,0,0,6">
|
||||
<TextBlock DockPanel.Dock="Right" Text="{Binding SizeText}" Style="{StaticResource Text.Secondary}" VerticalAlignment="Center" />
|
||||
<TextBlock DockPanel.Dock="Right" Text="{Binding SizeText}" Style="{StaticResource Text.Secondary}" VerticalAlignment="Center" Typography.NumeralAlignment="Tabular" />
|
||||
<CheckBox Content="{Binding Name}" IsChecked="{Binding IsSelected}" ToolTip="{Binding ToolTip}" />
|
||||
</DockPanel>
|
||||
</DataTemplate>
|
||||
@@ -58,13 +59,18 @@
|
||||
ToolTipService.ShowOnDisabled="True" ToolTip="{Binding AllUsersToolTip}" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- The field comes before Browse in the Tab order, as on screen; a path reads left to right in every language. -->
|
||||
<TextBlock Grid.Row="2" Text="{l:Loc Setup.Field.Folder}" Foreground="{DynamicResource Brush.TextMuted}" VerticalAlignment="Center" Margin="0,0,16,0" />
|
||||
<DockPanel Grid.Row="2" Grid.Column="1" VerticalAlignment="Center">
|
||||
<Button DockPanel.Dock="Right" Margin="8,0,0,0" Content="{l:Loc Setup.Folder.Browse}" Command="{Binding BrowseCommand}"
|
||||
ToolTipService.ShowOnDisabled="True" ToolTip="{l:Loc Tooltips.Setup.Browse}" />
|
||||
<TextBox Text="{Binding Directory, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding CanChangeLocation}"
|
||||
<Grid Grid.Row="2" Grid.Column="1" VerticalAlignment="Center">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox Text="{Binding Directory, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding CanChangeLocation}" FlowDirection="LeftToRight"
|
||||
ToolTipService.ShowOnDisabled="True" ToolTip="{Binding DirectoryToolTip}" AutomationProperties.Name="{l:Loc Setup.Field.Folder}" />
|
||||
</DockPanel>
|
||||
<Button Grid.Column="1" Margin="8,0,0,0" Content="{l:Loc Setup.Folder.Browse}" Command="{Binding BrowseCommand}"
|
||||
ToolTipService.ShowOnDisabled="True" ToolTip="{Binding BrowseToolTip}" />
|
||||
</Grid>
|
||||
|
||||
<TextBlock Grid.Row="3" Text="{l:Loc Setup.Field.Options}" Foreground="{DynamicResource Brush.TextMuted}" Margin="0,12,16,0" />
|
||||
<StackPanel Grid.Row="3" Grid.Column="1" Margin="0,12,0,0">
|
||||
@@ -77,7 +83,7 @@
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<!-- Uninstall options -->
|
||||
<!-- Uninstall options; "Remove my data" shows what it deletes before Uninstall can run (dry run). -->
|
||||
<Grid Grid.Row="1" Margin="0,24,0,0" Visibility="{Binding IsUninstallOptions, Converter={StaticResource BoolToVisibility}}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" MinWidth="116" />
|
||||
@@ -86,66 +92,103 @@
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="44" />
|
||||
<RowDefinition Height="44" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{l:Loc Setup.Field.Folder}" Foreground="{DynamicResource Brush.TextMuted}" VerticalAlignment="Center" Margin="0,0,16,0" />
|
||||
<TextBox Grid.Column="1" VerticalAlignment="Center" IsReadOnly="True" Text="{Binding Directory, Mode=OneWay}"
|
||||
<TextBox Grid.Column="1" VerticalAlignment="Center" IsReadOnly="True" Text="{Binding Directory, Mode=OneWay}" FlowDirection="LeftToRight"
|
||||
ToolTip="{l:Loc Tooltips.Setup.Installed}" AutomationProperties.Name="{l:Loc Setup.Field.Folder}" />
|
||||
<CheckBox Grid.Row="1" Grid.Column="1" Content="{l:Loc Setup.Uninstall.RemoveData}" IsChecked="{Binding RemoveUserData}"
|
||||
<CheckBox Grid.Row="1" Grid.Column="1" Content="{l:Loc Setup.Uninstall.RemoveData}" IsChecked="{Binding RemoveUserData}" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource Brush.Warning}" ToolTip="{l:Loc Tooltips.Setup.RemoveData}" />
|
||||
<Border Grid.Row="2" Grid.Column="1" Style="{StaticResource Border.Card}" Padding="12,8"
|
||||
Visibility="{Binding IsDataPlanVisible, Converter={StaticResource BoolToVisibility}}">
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding DataPlanText}" Style="{StaticResource Text.Section}" Foreground="{DynamicResource Brush.Warning}" Margin="0,0,0,6"
|
||||
AutomationProperties.LiveSetting="Polite" />
|
||||
<ItemsControl ItemsSource="{Binding DataPlanRows}" Focusable="False">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Margin="0,2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" MinWidth="72" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock x:Name="EntryName" Text="{Binding Name}" Style="{StaticResource Text.Secondary}" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding Size}" Style="{StaticResource Text.Secondary}" HorizontalAlignment="Right" Margin="12,0,0,0"
|
||||
Typography.NumeralAlignment="Tabular" />
|
||||
</Grid>
|
||||
<DataTemplate.Triggers>
|
||||
<!-- File and folder names read left to right in every language. -->
|
||||
<DataTrigger Binding="{Binding IsFileName}" Value="True">
|
||||
<Setter TargetName="EntryName" Property="FlowDirection" Value="LeftToRight" />
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<!-- Programs still running -->
|
||||
<DockPanel Grid.Row="1" VerticalAlignment="Center" Visibility="{Binding IsConfirm, Converter={StaticResource BoolToVisibility}}">
|
||||
<ui:Icon Glyph="{StaticResource Icon.Warning}" Size="20" Foreground="{DynamicResource Brush.Warning}" Margin="0,0,12,0" VerticalAlignment="Center" />
|
||||
<TextBlock Text="{Binding ConfirmText}" Style="{StaticResource Text.Title}" TextWrapping="Wrap" VerticalAlignment="Center" />
|
||||
<TextBlock x:Name="ConfirmMessage" Text="{Binding ConfirmText}" Style="{StaticResource Text.Title}" TextWrapping="Wrap" VerticalAlignment="Center"
|
||||
AutomationProperties.LiveSetting="Assertive" />
|
||||
</DockPanel>
|
||||
|
||||
<!-- Progress -->
|
||||
<StackPanel Grid.Row="1" VerticalAlignment="Center" Visibility="{Binding IsWorking, Converter={StaticResource BoolToVisibility}}">
|
||||
<TextBlock Text="{Binding WorkingText}" Style="{StaticResource Text.Title}" Margin="0,0,0,14" />
|
||||
<TextBlock x:Name="WorkingMessage" Text="{Binding WorkingText}" Style="{StaticResource Text.Title}" Margin="0,0,0,14" AutomationProperties.LiveSetting="Polite" />
|
||||
<DockPanel>
|
||||
<TextBlock DockPanel.Dock="Right" Text="{Binding ProgressText}" Style="{StaticResource Text.Secondary}" MinWidth="40" TextAlignment="Right" Margin="12,0,0,0" VerticalAlignment="Center" />
|
||||
<ProgressBar Minimum="0" Maximum="1" Value="{Binding Progress, Mode=OneWay}" IsIndeterminate="{Binding IsIndeterminate}" VerticalAlignment="Center" />
|
||||
<TextBlock DockPanel.Dock="Right" Text="{Binding ProgressText}" Style="{StaticResource Text.Secondary}" MinWidth="40" TextAlignment="Right" Margin="12,0,0,0"
|
||||
VerticalAlignment="Center" Typography.NumeralAlignment="Tabular" />
|
||||
<ProgressBar Minimum="0" Maximum="1" Value="{Binding Progress, Mode=OneWay}" IsIndeterminate="{Binding IsIndeterminate}" VerticalAlignment="Center"
|
||||
AutomationProperties.Name="{Binding WorkingText}" />
|
||||
</DockPanel>
|
||||
<TextBlock Text="{Binding ProgressFile}" Style="{StaticResource Text.Secondary}" TextTrimming="CharacterEllipsis" Margin="0,8,0,0" />
|
||||
<TextBlock Text="{Binding ProgressFile}" Style="{StaticResource Text.Secondary}" TextTrimming="CharacterEllipsis" Margin="0,8,0,0"
|
||||
FlowDirection="LeftToRight" HorizontalAlignment="Left" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- Success -->
|
||||
<DockPanel Grid.Row="1" VerticalAlignment="Center" Visibility="{Binding IsDone, Converter={StaticResource BoolToVisibility}}">
|
||||
<ui:Icon Glyph="{StaticResource Icon.SuccessCircle}" Size="20" Foreground="{DynamicResource Brush.Success}" Margin="0,0,12,0" VerticalAlignment="Center" />
|
||||
<TextBlock Text="{Binding DoneText}" Style="{StaticResource Text.Title}" TextWrapping="Wrap" VerticalAlignment="Center" />
|
||||
<TextBlock x:Name="DoneMessage" Text="{Binding DoneText}" Style="{StaticResource Text.Title}" TextWrapping="Wrap" VerticalAlignment="Center"
|
||||
AutomationProperties.LiveSetting="Assertive" />
|
||||
</DockPanel>
|
||||
|
||||
<!-- Failure -->
|
||||
<DockPanel Grid.Row="1" VerticalAlignment="Center" Visibility="{Binding IsFailed, Converter={StaticResource BoolToVisibility}}">
|
||||
<ui:Icon Glyph="{StaticResource Icon.ErrorCircle}" Size="20" Foreground="{DynamicResource Brush.Error}" Margin="0,0,12,0" VerticalAlignment="Center" />
|
||||
<TextBlock Text="{Binding ErrorText}" Style="{StaticResource Text.Title}" TextWrapping="Wrap" VerticalAlignment="Center" />
|
||||
<TextBlock x:Name="FailedMessage" Text="{Binding ErrorText}" Style="{StaticResource Text.Title}" TextWrapping="Wrap" VerticalAlignment="Center"
|
||||
AutomationProperties.LiveSetting="Assertive" />
|
||||
</DockPanel>
|
||||
|
||||
<!-- Footer: space needed and at most two actions per state -->
|
||||
<!--
|
||||
Footer: space needed and at most two actions per stage, the safe one first (DESIGN §4). Enter and Esc follow
|
||||
Windows: Install, Launch and Retry are the default when shown; otherwise the safe action is; Esc is the safe action.
|
||||
-->
|
||||
<DockPanel Grid.Row="2" LastChildFill="False" Margin="0,16,0,0">
|
||||
<TextBlock DockPanel.Dock="Left" Text="{Binding RequiredSpaceText}" Style="{StaticResource Text.Secondary}" VerticalAlignment="Center"
|
||||
Visibility="{Binding IsInstallOptions, Converter={StaticResource BoolToVisibility}}" />
|
||||
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal">
|
||||
<StackPanel x:Name="Footer" DockPanel.Dock="Right" Orientation="Horizontal">
|
||||
<Button Content="{l:Loc Setup.Action.Cancel}" MinWidth="88" Margin="0,0,8,0" Command="{Binding CloseCommand}" ToolTip="{l:Loc Tooltips.Setup.Cancel}"
|
||||
IsCancel="{Binding IsOptions}" IsDefault="{Binding IsUninstallOptions}" Visibility="{Binding IsOptions, Converter={StaticResource BoolToVisibility}}" />
|
||||
<Button Style="{StaticResource Button.Primary}" MinWidth="104" Content="{Binding InstallText}" Command="{Binding PrimaryCommand}" ToolTip="{Binding InstallToolTip}"
|
||||
ToolTipService.ShowOnDisabled="True" IsDefault="True" Visibility="{Binding IsInstallOptions, Converter={StaticResource BoolToVisibility}}" />
|
||||
ToolTipService.ShowOnDisabled="True" IsDefault="{Binding IsInstallOptions}" Visibility="{Binding IsInstallOptions, Converter={StaticResource BoolToVisibility}}" />
|
||||
<Button Style="{StaticResource Button.Destructive}" MinWidth="104" Content="{l:Loc Setup.Action.Uninstall}" Command="{Binding PrimaryCommand}" ToolTip="{l:Loc Tooltips.Setup.Uninstall}"
|
||||
Visibility="{Binding IsUninstallOptions, Converter={StaticResource BoolToVisibility}}" />
|
||||
|
||||
<Button Content="{l:Loc Setup.Action.Cancel}" Command="{Binding BackCommand}" ToolTip="{l:Loc Tooltips.Setup.Back}" IsCancel="True" Margin="0,0,8,0"
|
||||
Visibility="{Binding IsConfirm, Converter={StaticResource BoolToVisibility}}" />
|
||||
<Button Content="{l:Loc Setup.Action.Cancel}" MinWidth="88" Command="{Binding BackCommand}" ToolTip="{l:Loc Tooltips.Setup.Back}" Margin="0,0,8,0"
|
||||
IsCancel="{Binding IsConfirm}" IsDefault="{Binding IsConfirm}" Visibility="{Binding IsConfirm, Converter={StaticResource BoolToVisibility}}" />
|
||||
<Button Style="{StaticResource Button.Primary}" Content="{l:Loc Setup.Action.ClosePrograms}" Command="{Binding CloseProgramsCommand}" ToolTip="{l:Loc Tooltips.Setup.ClosePrograms}"
|
||||
Visibility="{Binding IsConfirm, Converter={StaticResource BoolToVisibility}}" />
|
||||
|
||||
<Button Content="{l:Loc Setup.Action.Close}" MinWidth="88" Command="{Binding CloseCommand}" ToolTip="{l:Loc Tooltips.Setup.Close}"
|
||||
Visibility="{Binding IsDone, Converter={StaticResource BoolToVisibility}}" />
|
||||
IsCancel="{Binding IsFinished}" IsDefault="{Binding IsCloseDefault}" Visibility="{Binding IsFinished, Converter={StaticResource BoolToVisibility}}" />
|
||||
<Button Style="{StaticResource Button.Primary}" MinWidth="88" Content="{l:Loc Setup.Action.Launch}" Command="{Binding LaunchCommand}" ToolTip="{l:Loc Tooltips.Setup.LaunchNow}" Margin="8,0,0,0"
|
||||
Visibility="{Binding CanLaunch, Converter={StaticResource BoolToVisibility}}" />
|
||||
|
||||
<Button Content="{l:Loc Setup.Action.Close}" MinWidth="88" Command="{Binding CloseCommand}" ToolTip="{l:Loc Tooltips.Setup.Close}"
|
||||
Visibility="{Binding IsFailed, Converter={StaticResource BoolToVisibility}}" />
|
||||
IsDefault="{Binding CanLaunch}" Visibility="{Binding CanLaunch, Converter={StaticResource BoolToVisibility}}" />
|
||||
<Button Style="{StaticResource Button.Primary}" MinWidth="88" Content="{l:Loc Setup.Action.Retry}" Command="{Binding RetryCommand}" ToolTip="{l:Loc Tooltips.Setup.Retry}" Margin="8,0,0,0"
|
||||
Visibility="{Binding CanRetry, Converter={StaticResource BoolToVisibility}}" />
|
||||
IsDefault="{Binding CanRetry}" Visibility="{Binding CanRetry, Converter={StaticResource BoolToVisibility}}" />
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
|
||||
Reference in new issue
Block a user