Repository navigation
[UX] New dashboard & refactored KeyVisual #40214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
72f62c5
Cleaning up Controls folder
niels9001 e1bcf62
Adding Card control
niels9001 faab625
Dashboard changes
niels9001 d28ebcd
Remove KBM dashboard item and related code
niels9001 0aff642
Adding shortcuts view
niels9001 1d43842
More shortcuts
niels9001 ef51252
Refactor KeyVisual for better UX customization
niels9001 f162449
Updating shortcut strings
niels9001 e08ef9c
Enabling resizing
niels9001 5457b27
Adding icons to the quick actions
niels9001 c1564db
CI fixes
niels9001 40fc456
More shortcut visual refactoring
niels9001 ab58418
More changes
niels9001 cb3afc7
Merge branch 'main' into niels9001/new-dashboard-ux
niels9001 3e14b3a
Add missing tag
niels9001 dbd2ea5
Moving Update and ShortcutConflicts to dedicated controls so they can…
niels9001 d1e702c
Fix
niels9001 5f748f8
Bringing back the icon for the shortcut control
niels9001 2dcf202
Styles refactor
niels9001 6c933f3
Update SettingsPageControl.xaml
niels9001 48b782a
Merge branch 'main' into niels9001/new-dashboard-ux
niels9001 2dc6bdb
Update App.xaml
niels9001 8fb55c0
Update src/settings-ui/Settings.UI/Strings/en-us/Resources.resw
niels9001 d851811
Update src/settings-ui/Settings.UI/Strings/en-us/Resources.resw
niels9001 cc419af
Update KeyVisual.xaml
niels9001 e165479
Fixed a few accessibility issues. Improper name fields and such
Jaylyn-Barbee afa4317
Merge branch 'main' of https://github.com/Jaylyn-Barbee/PowerToys int…
Jaylyn-Barbee 1f25860
merging main
Jaylyn-Barbee 7423649
testing
Jaylyn-Barbee 32da7d8
Recovered work
Jaylyn-Barbee 4b7b48d
spelling issue + xaml formatting
Jaylyn-Barbee 93a1e65
ran xaml formatter on unfomratted file
Jaylyn-Barbee 7e6c6d8
Replace the word 'launch' with 'open' since we shouldn't use 'launch'…
Jaylyn-Barbee 011fc69
fixed a11y issue with glyphs in keyvisual + removed unneeded line
Jaylyn-Barbee 2064325
Fixed dashboard page styling
Jaylyn-Barbee 5cd8337
fixed AOT issue with windows logo in keyvisual
Jaylyn-Barbee 32ed3db
xaml formatting
Jaylyn-Barbee b42e39b
Added back string for 'Update Available'
Jaylyn-Barbee 4c38bab
fixed wrap layout issue
Jaylyn-Barbee fb611a7
Address comments
niels9001 47401f2
Cleaning up and loccing KeyVisual
niels9001 8a62b76
Refactoring KeyVisual (#40904)
niels9001 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
23 changes: 0 additions & 23 deletions
23
src/settings-ui/Settings.UI/Converters/KeyVisualTemplateSelector.cs
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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
70 changes: 70 additions & 0 deletions
70
src/settings-ui/Settings.UI/SettingsXAML/Controls/Dashboard/Card.xaml
This file contains hidden or 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,70 @@ | ||
| <?xml version="1.0" encoding="utf-8" ?> | ||
| <UserControl | ||
| x:Class="Microsoft.PowerToys.Settings.UI.Controls.Card" | ||
| 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:local="using:Microsoft.PowerToys.Settings.UI.Controls" | ||
| xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
| Padding="8" | ||
| HorizontalContentAlignment="Stretch" | ||
| VerticalContentAlignment="Stretch" | ||
| Background="{ThemeResource CardBackgroundFillColorDefaultBrush}" | ||
| BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}" | ||
| BorderThickness="1" | ||
| CornerRadius="{StaticResource OverlayCornerRadius}" | ||
| mc:Ignorable="d"> | ||
| <Grid | ||
| VerticalAlignment="{x:Bind VerticalContentAlignment, Mode=OneWay}" | ||
| Background="{x:Bind Background, Mode=OneWay}" | ||
| BorderBrush="{x:Bind BorderBrush, Mode=OneWay}" | ||
| BorderThickness="{x:Bind BorderThickness, Mode=OneWay}" | ||
| CornerRadius="{x:Bind CornerRadius, Mode=OneWay}"> | ||
| <Grid.RowDefinitions> | ||
| <RowDefinition Height="Auto" MinHeight="44" /> | ||
| <RowDefinition Height="Auto" /> | ||
| <RowDefinition Height="*" /> | ||
| </Grid.RowDefinitions> | ||
| <Grid x:Name="TitleGrid"> | ||
| <Grid.ColumnDefinitions> | ||
| <ColumnDefinition Width="*" /> | ||
| <ColumnDefinition Width="Auto" /> | ||
| </Grid.ColumnDefinitions> | ||
| <TextBlock | ||
| Margin="16,0,0,0" | ||
| VerticalAlignment="Center" | ||
| FontSize="16" | ||
| FontWeight="SemiBold" | ||
| Text="{x:Bind Title, Mode=OneWay}" /> | ||
| <ContentPresenter | ||
| Grid.Column="2" | ||
| HorizontalAlignment="Right" | ||
| VerticalAlignment="Center" | ||
| Content="{x:Bind TitleContent, Mode=OneWay}" /> | ||
| </Grid> | ||
| <Rectangle | ||
| x:Name="Divider" | ||
| Grid.Row="1" | ||
| Height="1" | ||
| HorizontalAlignment="Stretch" | ||
| Fill="{ThemeResource DividerStrokeColorDefaultBrush}" | ||
| Visibility="{x:Bind DividerVisibility, Mode=OneWay}" /> | ||
|
|
||
| <ContentPresenter | ||
| Grid.Row="2" | ||
| Margin="{x:Bind Padding, Mode=OneWay}" | ||
| HorizontalAlignment="{x:Bind HorizontalContentAlignment, Mode=OneWay}" | ||
| VerticalAlignment="{x:Bind VerticalContentAlignment, Mode=OneWay}" | ||
| Content="{x:Bind Content, Mode=OneWay}" /> | ||
| <VisualStateManager.VisualStateGroups> | ||
| <VisualStateGroup x:Name="TitleGridVisibilityStates"> | ||
| <VisualState x:Name="TitleGridVisible" /> | ||
| <VisualState x:Name="TitleGridCollapsed"> | ||
| <VisualState.Setters> | ||
| <Setter Target="TitleGrid.Visibility" Value="Collapsed" /> | ||
| </VisualState.Setters> | ||
| </VisualState> | ||
| </VisualStateGroup> | ||
| </VisualStateManager.VisualStateGroups> | ||
| </Grid> | ||
| </UserControl> |
73 changes: 73 additions & 0 deletions
73
src/settings-ui/Settings.UI/SettingsXAML/Controls/Dashboard/Card.xaml.cs
This file contains hidden or 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,73 @@ | ||
| // Copyright (c) Microsoft Corporation | ||
| // The Microsoft Corporation licenses this file to you under the MIT license. | ||
| // See the LICENSE file in the project root for more information. | ||
|
|
||
| using Microsoft.UI.Xaml; | ||
| using Microsoft.UI.Xaml.Controls; | ||
|
|
||
| namespace Microsoft.PowerToys.Settings.UI.Controls | ||
| { | ||
| public sealed partial class Card : UserControl | ||
| { | ||
| public static readonly DependencyProperty TitleContentProperty = DependencyProperty.Register(nameof(TitleContent), typeof(object), typeof(Card), new PropertyMetadata(defaultValue: null, OnVisualPropertyChanged)); | ||
|
|
||
| public object TitleContent | ||
| { | ||
| get => (object)GetValue(TitleContentProperty); | ||
| set => SetValue(TitleContentProperty, value); | ||
| } | ||
|
|
||
| public static readonly DependencyProperty TitleProperty = DependencyProperty.Register(nameof(Title), typeof(string), typeof(Card), new PropertyMetadata(defaultValue: null, OnVisualPropertyChanged)); | ||
|
|
||
| public string Title | ||
| { | ||
| get => (string)GetValue(TitleProperty); | ||
| set => SetValue(TitleProperty, value); | ||
| } | ||
|
|
||
| public static new readonly DependencyProperty ContentProperty = DependencyProperty.Register(nameof(Content), typeof(object), typeof(Card), new PropertyMetadata(defaultValue: null)); | ||
|
|
||
| [System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1061:Do not hide base class methods", Justification = "We need to hide the base class method")] | ||
| public new object Content | ||
| { | ||
| get => (object)GetValue(ContentProperty); | ||
| set => SetValue(ContentProperty, value); | ||
| } | ||
|
|
||
| public static readonly DependencyProperty DividerVisibilityProperty = DependencyProperty.Register(nameof(DividerVisibility), typeof(Visibility), typeof(Card), new PropertyMetadata(defaultValue: null)); | ||
|
|
||
| public Visibility DividerVisibility | ||
| { | ||
| get => (Visibility)GetValue(DividerVisibilityProperty); | ||
| set => SetValue(DividerVisibilityProperty, value); | ||
| } | ||
|
|
||
| public Card() | ||
| { | ||
| InitializeComponent(); | ||
| SetVisualStates(); | ||
| } | ||
|
|
||
| private static void OnVisualPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) | ||
| { | ||
| if (d is Card card) | ||
| { | ||
| card.SetVisualStates(); | ||
| } | ||
| } | ||
|
|
||
| private void SetVisualStates() | ||
| { | ||
| if (string.IsNullOrEmpty(Title) && TitleContent == null) | ||
| { | ||
| VisualStateManager.GoToState(this, "TitleGridCollapsed", true); | ||
| DividerVisibility = Visibility.Collapsed; | ||
| } | ||
| else | ||
| { | ||
| VisualStateManager.GoToState(this, "TitleGridVisible", true); | ||
| DividerVisibility = Visibility.Visible; | ||
| } | ||
| } | ||
| } | ||
| } |
80 changes: 80 additions & 0 deletions
80
src/settings-ui/Settings.UI/SettingsXAML/Controls/Dashboard/CheckUpdateControl.xaml
This file contains hidden or 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,80 @@ | ||
| <?xml version="1.0" encoding="utf-8" ?> | ||
| <UserControl | ||
| x:Class="Microsoft.PowerToys.Settings.UI.Controls.CheckUpdateControl" | ||
| 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:local="using:Microsoft.PowerToys.Settings.UI.Controls" | ||
| xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
| mc:Ignorable="d"> | ||
|
|
||
| <StackPanel Orientation="Horizontal"> | ||
| <Button | ||
| Click="SWVersionButtonClicked" | ||
| Style="{StaticResource SubtleButtonStyle}" | ||
| Visibility="{x:Bind UpdateAvailable, Mode=OneWay}"> | ||
| <Grid ColumnSpacing="16"> | ||
| <Grid.ColumnDefinitions> | ||
| <ColumnDefinition Width="Auto" /> | ||
| <ColumnDefinition Width="*" /> | ||
| </Grid.ColumnDefinitions> | ||
| <Border | ||
| Width="20" | ||
| Height="20" | ||
| CornerRadius="10"> | ||
|
niels9001 marked this conversation as resolved.
Resolved
|
||
| <Border.Background> | ||
| <LinearGradientBrush StartPoint="0,0" EndPoint="0.5,1"> | ||
| <GradientStop Offset="0.0" Color="#239DE0" /> | ||
| <GradientStop Offset="1.0" Color="#037CD6" /> | ||
| </LinearGradientBrush> | ||
| </Border.Background> | ||
| <FontIcon | ||
| AutomationProperties.AccessibilityView="Raw" | ||
| FontSize="11" | ||
|
niels9001 marked this conversation as resolved.
Resolved
|
||
| Foreground="White" | ||
| Glyph="" /> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The associated name for this icon is "Sync". There's also "SyncBadge12" |
||
| </Border> | ||
| <StackPanel Grid.Column="1" Orientation="Vertical"> | ||
| <TextBlock x:Uid="UpdateAvailableTextBlock" FontWeight="SemiBold" /> | ||
| <TextBlock Foreground="{ThemeResource TextFillColorSecondaryBrush}" Style="{StaticResource CaptionTextBlockStyle}"> | ||
| <Run x:Uid="GeneralVersion" /> | ||
| <Run Text="{x:Bind UpdateSettingsConfig.NewVersion, Mode=OneWay}" /> | ||
| </TextBlock> | ||
| </StackPanel> | ||
| </Grid> | ||
| </Button> | ||
| <Grid | ||
| Padding="0,0,4,0" | ||
| VerticalAlignment="Center" | ||
| ColumnSpacing="16" | ||
| Visibility="{x:Bind UpdateAvailable, Converter={StaticResource ReverseBoolToVisibilityConverter}, Mode=OneWay}"> | ||
| <Grid.ColumnDefinitions> | ||
| <ColumnDefinition Width="Auto" /> | ||
| <ColumnDefinition Width="*" /> | ||
| </Grid.ColumnDefinitions> | ||
| <Border | ||
| Width="20" | ||
| Height="20" | ||
| CornerRadius="10"> | ||
| <Border.Background> | ||
| <LinearGradientBrush StartPoint="0,0" EndPoint="0.5,1"> | ||
| <GradientStop Offset="0.0" Color="#6FB538" /> | ||
| <GradientStop Offset="1.0" Color="#397A24" /> | ||
| </LinearGradientBrush> | ||
| </Border.Background> | ||
| <FontIcon | ||
| AutomationProperties.AccessibilityView="Raw" | ||
| FontSize="11" | ||
| Foreground="White" | ||
| Glyph="" /> | ||
| </Border> | ||
| <StackPanel Grid.Column="1" Orientation="Vertical"> | ||
| <TextBlock x:Uid="YoureUpToDate" FontWeight="SemiBold" /> | ||
| <TextBlock Foreground="{ThemeResource TextFillColorSecondaryBrush}" Style="{StaticResource CaptionTextBlockStyle}"> | ||
| <Run x:Uid="General_VersionLastChecked" /> | ||
| <Run Text="{x:Bind UpdateSettingsConfig.LastCheckedDateLocalized, Mode=OneWay}" /> | ||
| </TextBlock> | ||
| </StackPanel> | ||
| </Grid> | ||
| </StackPanel> | ||
| </UserControl> | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.