-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Convert the update dialog to be a ContainedDialog (#1201)
#### Details Currently, our update dialog is a traditional modal dialog in a separate window. This results in some undesirable side effects while the dialog is open, such as the inability to reposition or close the application. To improve this behavior, this PR switches the update dialog to be a `ContainedDialog`, following the same pattern as our telemetry and channel switching dialogs. With one exception, the updated `UpdateContainedDialog` provides exactly the same functionality to the user as the existing `UpdateDialog`. The exception: for required updates, there is now a Close button in place of the Later button for option updates. ##### Motivation Addresses issue #1186 (at least partially) ##### Context - To support this change, I updated `DialogContainerModeControl` to disable all background `ContainedDialog`. This way, in the (rare) scenario where the user has the Update, Telemetry, and StartUp dialogs all open at once, only the topmost contained dialog will show up in the tab order. #### Pull request checklist <!-- If a checklist item is not applicable to this change, write "n/a" in the checkbox --> - [n/a] Run through of all [test scenarios](https://github.com/Microsoft/accessibility-insights-windows/blob/main/docs/Scenarios.md) completed? - [x] Does this address an existing issue? If yes, Issue# - #1186 - [x] Includes UI changes? - [x] Run the production version of Accessibility Insights for Windows against a version with changes. - [x] Attach any screenshots / GIF's that are applicable. > Note: After the PR has been created, certain checks will be kicked off. All of these checks must pass before a merge.
- Loading branch information
Showing
17 changed files
with
240 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
src/AccessibilityInsights.SharedUx/Dialogs/UpdateContainedDialog.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<!-- Copyright (c) Microsoft. All rights reserved. | ||
Licensed under the MIT license. See LICENSE file in the project root for full license information.--> | ||
<dialogs:ContainedDialog | ||
xmlns:dialogs="clr-namespace:AccessibilityInsights.SharedUx.Dialogs" | ||
x:Class="AccessibilityInsights.SharedUx.Dialogs.UpdateContainedDialog" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:properties="clr-namespace:AccessibilityInsights.SharedUx.Properties" | ||
mc:Ignorable="d" | ||
AutomationProperties.Name="{x:Static properties:Resources.UpdateContainedDialogAutomationName}"> | ||
<dialogs:ContainedDialog.Resources> | ||
<ResourceDictionary Source="pack://application:,,,/AccessibilityInsights.SharedUx;component/Resources/Styles.xaml"/> | ||
</dialogs:ContainedDialog.Resources> | ||
<Border VerticalAlignment="Center" HorizontalAlignment="Center" | ||
BorderThickness="{DynamicResource ResourceKey=BtnBrdrThickness}" | ||
BorderBrush="{DynamicResource ResourceKey=PrimaryFGBrush}"> | ||
<Grid Width="370" HorizontalAlignment="Center" VerticalAlignment="Center" | ||
Background="{DynamicResource ResourceKey=SecondaryBGBrush}"> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="8"/> | ||
<ColumnDefinition/> | ||
</Grid.ColumnDefinitions> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="Auto"/> | ||
<RowDefinition Height="Auto"/> | ||
<RowDefinition Height="Auto"/> | ||
<RowDefinition Height="12"/> | ||
</Grid.RowDefinitions> | ||
<Label Grid.Column="1" HorizontalAlignment="Left" Margin="2,8" Name="lblUpdate" Content="{x:Static properties:Resources.UpdateContainedDialog_An_update_is_available}" Style="{StaticResource TxtTelemetryDialogLabel}"/> | ||
<TextBlock Grid.Column="1" Grid.Row="1" Style="{StaticResource TxtTelemetryDialogText}" TextWrapping="Wrap" Margin="8"> | ||
<Hyperlink x:Name="hlReleaseNotes" Click="hlReleaseNotes_Click" FocusVisualStyle="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}" Style="{StaticResource hLink}"> | ||
<Run Text="{x:Static properties:Resources.ReleaseNotesText}" /> | ||
</Hyperlink> | ||
</TextBlock> | ||
<Grid Grid.Column="1" Grid.Row="2" Margin="8"> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="*"/> | ||
<ColumnDefinition/> | ||
<ColumnDefinition/> | ||
</Grid.ColumnDefinitions> | ||
<Button x:Name="btnUpdateNow" Click="UpdateNow_Click" Grid.Column="2" Width="100" Height="30" | ||
Style="{StaticResource BtnBlueRounded}" Content="{x:Static properties:Resources.btnUpdateNowText}"/> | ||
<Button x:Name="btnUpdateLater" Click="UpdateLater_Dismiss" Grid.Column="1" Width="100" Height="30" | ||
Style="{StaticResource BtnBlueRounded}" Content="{x:Static properties:Resources.btnUpdateLaterText}"/> | ||
</Grid> | ||
</Grid> | ||
</Border> | ||
</dialogs:ContainedDialog> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
src/AccessibilityInsights.SharedUx/Properties/Resources.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.