Compare commits

...

4 Commits

Author SHA1 Message Date
Niels Laute
9dbeda8405 Merge branch 'main' into niels9001/cmd-pal-ux-refinements 2025-07-04 11:57:37 +02:00
Niels Laute
35287df227 Tag and hotkey tweaks 2025-07-03 19:31:58 +02:00
Niels Laute
aa7c3ba23b Left alignment of icons and content 2025-07-03 17:12:41 +02:00
Niels Laute
3fb0e88339 Updates to the New Extension UI 2025-07-03 17:12:02 +02:00
9 changed files with 59 additions and 132 deletions

View File

@@ -32,22 +32,6 @@ internal sealed partial class NewExtensionForm : NewExtensionFormBase
"text": {{FormatJsonString(Properties.Resources.builtin_create_extension_page_title)}},
"size": "large"
},
{
"type": "TextBlock",
"text": {{FormatJsonString(Properties.Resources.builtin_create_extension_page_text)}},
"wrap": true
},
{
"type": "TextBlock",
"text": {{FormatJsonString(Properties.Resources.builtin_create_extension_name_header)}},
"weight": "bolder",
"size": "default"
},
{
"type": "TextBlock",
"text": {{FormatJsonString(Properties.Resources.builtin_create_extension_name_description)}},
"wrap": true
},
{
"type": "Input.Text",
"label": {{FormatJsonString(Properties.Resources.builtin_create_extension_name_label)}},
@@ -59,14 +43,11 @@ internal sealed partial class NewExtensionForm : NewExtensionFormBase
},
{
"type": "TextBlock",
"text": {{FormatJsonString(Properties.Resources.builtin_create_extension_display_name_header)}},
"weight": "bolder",
"size": "default"
},
{
"type": "TextBlock",
"text": {{FormatJsonString(Properties.Resources.builtin_create_extension_display_name_description)}},
"wrap": true
"text": {{FormatJsonString(Properties.Resources.builtin_create_extension_name_description)}},
"wrap": true,
"size": "small",
"isSubtle": true,
"spacing": "none"
},
{
"type": "Input.Text",
@@ -74,18 +55,16 @@ internal sealed partial class NewExtensionForm : NewExtensionFormBase
"isRequired": true,
"errorMessage": {{FormatJsonString(Properties.Resources.builtin_create_extension_display_name_required)}},
"id": "DisplayName",
"placeholder": "My new extension"
"placeholder": "My new extension",
"spacing": "medium"
},
{
"type": "TextBlock",
"text": {{FormatJsonString(Properties.Resources.builtin_create_extension_directory_header)}},
"weight": "bolder",
"size": "default"
},
{
"type": "TextBlock",
"text": {{FormatJsonString(Properties.Resources.builtin_create_extension_directory_description)}},
"wrap": true
"text": {{FormatJsonString(Properties.Resources.builtin_create_extension_display_name_description)}},
"wrap": true,
"size": "small",
"isSubtle": true,
"spacing": "none"
},
{
"type": "Input.Text",
@@ -93,7 +72,16 @@ internal sealed partial class NewExtensionForm : NewExtensionFormBase
"isRequired": true,
"errorMessage": {{FormatJsonString(Properties.Resources.builtin_create_extension_directory_required)}},
"id": "OutputPath",
"placeholder": "C:\\users\\me\\dev"
"placeholder": "C:\\users\\me\\dev",
"spacing": "medium"
},
{
"type": "TextBlock",
"text": {{FormatJsonString(Properties.Resources.builtin_create_extension_directory_description)}},
"wrap": true,
"size": "small",
"isSubtle": true,
"spacing": "none"
}
],
"actions": [

View File

@@ -70,7 +70,7 @@ namespace Microsoft.CmdPal.UI.ViewModels.Properties {
}
/// <summary>
/// Looks up a localized string similar to Where should the new extension be created? This path will be created if it doesn&apos;t exist.
/// Looks up a localized string similar to Select the folder where the new extension will be created. The path will be created if it doesn&apos;t exist..
/// </summary>
public static string builtin_create_extension_directory_description {
get {
@@ -78,15 +78,6 @@ namespace Microsoft.CmdPal.UI.ViewModels.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Output path.
/// </summary>
public static string builtin_create_extension_directory_header {
get {
return ResourceManager.GetString("builtin_create_extension_directory_header", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Output path.
/// </summary>
@@ -106,7 +97,7 @@ namespace Microsoft.CmdPal.UI.ViewModels.Properties {
}
/// <summary>
/// Looks up a localized string similar to The name of your extension as users will see it..
/// Looks up a localized string similar to The name of the extension as it will appear to users..
/// </summary>
public static string builtin_create_extension_display_name_description {
get {
@@ -114,15 +105,6 @@ namespace Microsoft.CmdPal.UI.ViewModels.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Display name.
/// </summary>
public static string builtin_create_extension_display_name_header {
get {
return ResourceManager.GetString("builtin_create_extension_display_name_header", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Display name.
/// </summary>
@@ -151,7 +133,7 @@ namespace Microsoft.CmdPal.UI.ViewModels.Properties {
}
/// <summary>
/// Looks up a localized string similar to This is the name of your new extension project. It should be a valid C# class name. Best practice is to also include the word &apos;Extension&apos; in the name..
/// Looks up a localized string similar to Enter a valid C# class name for the new extension project. It&apos;s recommended to include the word &quot;Extension&quot; in the name..
/// </summary>
public static string builtin_create_extension_name_description {
get {
@@ -159,15 +141,6 @@ namespace Microsoft.CmdPal.UI.ViewModels.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Extension name.
/// </summary>
public static string builtin_create_extension_name_header {
get {
return ResourceManager.GetString("builtin_create_extension_name_header", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Extension name.
/// </summary>
@@ -205,16 +178,7 @@ namespace Microsoft.CmdPal.UI.ViewModels.Properties {
}
/// <summary>
/// Looks up a localized string similar to Use this page to create a new extension project..
/// </summary>
public static string builtin_create_extension_page_text {
get {
return ResourceManager.GetString("builtin_create_extension_page_text", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Create your new extension.
/// Looks up a localized string similar to Create a new extension.
/// </summary>
public static string builtin_create_extension_page_title {
get {

View File

@@ -180,16 +180,10 @@
<value>Once you're ready to test deploy the package locally with Visual Studio, then run the \"Reload\" command in the Command Palette to load your new extension.</value>
</data>
<data name="builtin_create_extension_page_title" xml:space="preserve">
<value>Create your new extension</value>
</data>
<data name="builtin_create_extension_page_text" xml:space="preserve">
<value>Use this page to create a new extension project.</value>
</data>
<data name="builtin_create_extension_name_header" xml:space="preserve">
<value>Extension name</value>
<value>Create a new extension</value>
</data>
<data name="builtin_create_extension_name_description" xml:space="preserve">
<value>This is the name of your new extension project. It should be a valid C# class name. Best practice is to also include the word 'Extension' in the name.</value>
<value>Enter a valid C# class name for the new extension project. It's recommended to include the word "Extension" in the name.</value>
</data>
<data name="builtin_create_extension_name_label" xml:space="preserve">
<value>Extension name</value>
@@ -197,11 +191,8 @@
<data name="builtin_create_extension_name_required" xml:space="preserve">
<value>Extension name is required and must be a valid C# identifier (start with a letter or underscore, followed by letters, numbers, or underscores)</value>
</data>
<data name="builtin_create_extension_display_name_header" xml:space="preserve">
<value>Display name</value>
</data>
<data name="builtin_create_extension_display_name_description" xml:space="preserve">
<value>The name of your extension as users will see it.</value>
<value>The name of the extension as it will appear to users.</value>
</data>
<data name="builtin_create_extension_display_name_label" xml:space="preserve">
<value>Display name</value>
@@ -209,11 +200,8 @@
<data name="builtin_create_extension_display_name_required" xml:space="preserve">
<value>Display name is required</value>
</data>
<data name="builtin_create_extension_directory_header" xml:space="preserve">
<value>Output path</value>
</data>
<data name="builtin_create_extension_directory_description" xml:space="preserve">
<value>Where should the new extension be created? This path will be created if it doesn't exist</value>
<value>Select the folder where the new extension will be created. The path will be created if it doesn't exist.</value>
</data>
<data name="builtin_create_extension_directory_label" xml:space="preserve">
<value>Output path</value>

View File

@@ -38,7 +38,7 @@ public sealed class AdaptiveCardsConfig
"fontFamily": "'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",
"fontSizes": {
"small": 12,
"default": 12,
"default": 14,
"medium": 14,
"large": 20,
"extraLarge": 26
@@ -199,7 +199,7 @@ public sealed class AdaptiveCardsConfig
"fontFamily": "'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",
"fontSizes": {
"small": 12,
"default": 12,
"default": 14,
"medium": 14,
"large": 20,
"extraLarge": 26

View File

@@ -100,6 +100,16 @@
</Grid>
</DataTemplate>
<Style x:Key="HotkeyStyle" TargetType="Border">
<Style.Setters>
<Setter Property="Padding" Value="4" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Background" Value="{ThemeResource ControlFillColorSecondaryBrush}" />
<Setter Property="BorderBrush" Value="{ThemeResource DividerStrokeColorDefaultBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="6" />
</Style.Setters>
</Style>
</ResourceDictionary>
</UserControl.Resources>
@@ -193,17 +203,12 @@
VerticalAlignment="Center"
Style="{StaticResource CaptionTextBlockStyle}"
Text="{x:Bind ViewModel.PrimaryCommand.Name, Mode=OneWay}" />
<Border
Padding="4"
Background="{ThemeResource SubtleFillColorSecondaryBrush}"
BorderBrush="{ThemeResource DividerStrokeColorDefaultBrush}"
BorderThickness="1"
CornerRadius="4">
<Border Style="{StaticResource HotkeyStyle}">
<FontIcon
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="10"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
Foreground="{ThemeResource TextFillColorPrimaryBrush}"
Glyph="&#xE751;" />
</Border>
</StackPanel>
@@ -221,32 +226,20 @@
VerticalAlignment="Center"
Style="{StaticResource CaptionTextBlockStyle}"
Text="{x:Bind ViewModel.SecondaryCommand.Name, Mode=OneWay}" />
<StackPanel Orientation="Horizontal" Spacing="2">
<Border
Padding="4,2,4,2"
VerticalAlignment="Center"
Background="{ThemeResource SubtleFillColorSecondaryBrush}"
BorderBrush="{ThemeResource DividerStrokeColorDefaultBrush}"
BorderThickness="1"
CornerRadius="4">
<StackPanel Orientation="Horizontal" Spacing="4">
<Border Padding="4,2,4,2" Style="{StaticResource HotkeyStyle}">
<TextBlock
CharacterSpacing="4"
FontSize="10"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
Foreground="{ThemeResource TextFillColorPrimaryBrush}"
Text="Ctrl" />
</Border>
<Border
Padding="4"
VerticalAlignment="Center"
Background="{ThemeResource SubtleFillColorSecondaryBrush}"
BorderBrush="{ThemeResource DividerStrokeColorDefaultBrush}"
BorderThickness="1"
CornerRadius="4">
<Border Style="{StaticResource HotkeyStyle}">
<FontIcon
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="10"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
Foreground="{ThemeResource TextFillColorPrimaryBrush}"
Glyph="&#xE751;" />
</Border>
</StackPanel>
@@ -267,7 +260,6 @@
Opened="Flyout_Opened"
Placement="TopEdgeAlignedRight">
<StackPanel>
<ListView
x:Name="CommandsDropdown"
MinWidth="248"
@@ -288,7 +280,6 @@
<TransitionCollection />
</ListView.ItemContainerTransitions>
</ListView>
<TextBox
x:Name="ContextFilterBox"
x:Uid="ContextFilterBox"
@@ -296,7 +287,6 @@
KeyDown="ContextFilterBox_KeyDown"
PreviewKeyDown="ContextFilterBox_PreviewKeyDown"
TextChanged="ContextFilterBox_TextChanged" />
</StackPanel>
</Flyout>
</Button.Flyout>

View File

@@ -19,6 +19,5 @@
</Style>
</ResourceDictionary>
</UserControl.Resources>
<Grid x:Name="ContentGrid" />
</UserControl>

View File

@@ -6,14 +6,14 @@
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Default">
<StaticResource x:Key="TagBackground" ResourceKey="ControlSolidFillColorDefaultBrush" />
<StaticResource x:Key="TagBorderBrush" ResourceKey="ControlStrokeColorSecondaryBrush" />
<StaticResource x:Key="TagBackground" ResourceKey="ControlFillColorSecondaryBrush" />
<StaticResource x:Key="TagBorderBrush" ResourceKey="DividerStrokeColorDefaultBrush" />
<StaticResource x:Key="TagForeground" ResourceKey="TextFillColorTertiaryBrush" />
</ResourceDictionary>
<ResourceDictionary x:Key="Light">
<StaticResource x:Key="TagBackground" ResourceKey="ControlSolidFillColorDefaultBrush" />
<StaticResource x:Key="TagBorderBrush" ResourceKey="ControlStrokeColorSecondaryBrush" />
<StaticResource x:Key="TagBackground" ResourceKey="ControlFillColorSecondaryBrush" />
<StaticResource x:Key="TagBorderBrush" ResourceKey="DividerStrokeColorDefaultBrush" />
<StaticResource x:Key="TagForeground" ResourceKey="TextFillColorTertiaryBrush" />
</ResourceDictionary>

View File

@@ -108,7 +108,7 @@
</ResourceDictionary>
</Page.Resources>
<Grid Background="{ThemeResource CardBackgroundFillColorDefaultBrush}">
<Grid>
<ScrollView VerticalAlignment="Top" VerticalScrollMode="Enabled">
<ItemsRepeater
VerticalAlignment="Stretch"

View File

@@ -380,19 +380,19 @@
To="24,0,0"
Duration="0:0:0.187" />
</animations:Implicit.HideAnimations>
<Grid Margin="12">
<Grid Margin="16">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<cpcontrols:IconBox
x:Name="HeroImageBorder"
Width="64"
Margin="16,8,16,16"
HorizontalAlignment="Center"
Margin="0,0,16,16"
HorizontalAlignment="Left"
AutomationProperties.AccessibilityView="Raw"
SourceKey="{x:Bind ViewModel.Details.HeroImage, Mode=OneWay}"
SourceRequested="{x:Bind help:IconCacheProvider.SourceRequested}"
@@ -400,17 +400,15 @@
<TextBlock
Grid.Row="1"
HorizontalAlignment="Center"
FontSize="18"
FontWeight="SemiBold"
Text="{x:Bind ViewModel.Details.Title, Mode=OneWay}"
TextAlignment="Center"
TextWrapping="WrapWholeWords"
Visibility="{x:Bind ViewModel.Details.Title, Converter={StaticResource StringNotEmptyToVisibilityConverter}, Mode=OneWay}" />
<toolkit:MarkdownTextBlock
Grid.Row="2"
Margin="0,12,0,24"
Margin="0,4,0,24"
Background="Transparent"
Header3FontSize="12"
Header3FontWeight="Normal"