-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Introduce parsed command line text to command palette #8515
Merged
Merged
Changes from 5 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
7d6c61a
Introduce parsed command line text to command palette
Don-Vito e0739c2
Introduce support for command line parsing failure message
Don-Vito dc33d61
Fix typo in resource comment
Don-Vito 4ceeadf
Merge remote-tracking branch 'upstream/main' into 8344-cmdpal-command…
Don-Vito a39dc0d
Introduce command line args as a member of CmdPal to reduce allocations
Don-Vito 39553a3
Fix spacing in CmdPal xaml
Don-Vito 75fffb3
Cleanup leftover setting noMatchText visible in command line mode
Don-Vito dc24592
Introduce vertical scroll for parsed command text
Don-Vito 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 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ the MIT License. See LICENSE in the project root for license information. --> | |
|
||
<!-- This creates an instance of our CommandKeyChordVisibilityConverter we can reference below --> | ||
<local:EmptyStringVisibilityConverter x:Key="CommandKeyChordVisibilityConverter"/> | ||
<local:EmptyStringVisibilityConverter x:Key="ParsedCommandLineTextVisibilityConverter"/> | ||
<local:EmptyStringVisibilityConverter x:Key="ParentCommandVisibilityConverter"/> | ||
<local:HasNestedCommandsVisibilityConverter x:Key="HasNestedCommandsVisibilityConverter"/> | ||
<model:IconPathConverter x:Key="IconSourceConverter"/> | ||
|
@@ -69,6 +70,16 @@ the MIT License. See LICENSE in the project root for license information. --> | |
<Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseMediumBrush}" /> | ||
</Style> | ||
|
||
<!-- ParsedCommandLineText styles --> | ||
<Style x:Key="ParsedCommandLineBorderStyle" TargetType="Border"> | ||
<Setter Property="BorderThickness" Value="1" /> | ||
<Setter Property="CornerRadius" Value="1" /> | ||
<Setter Property="Background" Value="{ThemeResource SystemAltMediumLowColor}" /> | ||
<Setter Property="BorderBrush" Value="{ThemeResource SystemControlForegroundBaseMediumBrush}" /> | ||
</Style> | ||
<Style x:Key="ParsedCommandLineTextBlockStyle" TargetType="TextBlock"> | ||
<Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseMediumBrush}" /> | ||
</Style> | ||
</ResourceDictionary> | ||
<ResourceDictionary x:Key="Light"> | ||
<Style x:Key="CommandPaletteBackground" TargetType="Grid"> | ||
|
@@ -100,6 +111,16 @@ the MIT License. See LICENSE in the project root for license information. --> | |
<Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseMediumBrush}" /> | ||
</Style> | ||
|
||
<!-- ParsedCommandLineText styles --> | ||
<Style x:Key="ParsedCommandLineBorderStyle" TargetType="Border"> | ||
<Setter Property="BorderThickness" Value="1" /> | ||
<Setter Property="CornerRadius" Value="1" /> | ||
<Setter Property="Background" Value="{ThemeResource SystemAltMediumLowColor}" /> | ||
<Setter Property="BorderBrush" Value="{ThemeResource SystemControlForegroundBaseMediumBrush}" /> | ||
</Style> | ||
<Style x:Key="ParsedCommandLineTextBlockStyle" TargetType="TextBlock"> | ||
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. spacing looks strange around here.. Sup? |
||
<Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseMediumBrush}" /> | ||
</Style> | ||
</ResourceDictionary> | ||
<ResourceDictionary x:Key="HighContrast"> | ||
<Style x:Key="CommandPaletteBackground" TargetType="Grid"> | ||
|
@@ -110,6 +131,9 @@ the MIT License. See LICENSE in the project root for license information. --> | |
<Style x:Key="KeyChordBorderStyle" TargetType="Border"/> | ||
<Style x:Key="KeyChordTextBlockStyle" TargetType="TextBlock"/> | ||
|
||
<!-- ParsedCommandLineText styles (use XAML defaults for High Contrast theme) --> | ||
<Style x:Key="ParsedCommandLineBoderStyle" TargetType="Border"/> | ||
<Style x:Key="ParsedCommandLineTextBlockStyle" TargetType="TextBlock"/> | ||
</ResourceDictionary> | ||
</ResourceDictionary.ThemeDictionaries> | ||
</ResourceDictionary> | ||
|
@@ -228,6 +252,20 @@ the MIT License. See LICENSE in the project root for license information. --> | |
Text="{x:Bind NoMatchesText, Mode=OneWay}"> | ||
</TextBlock> | ||
|
||
<Border | ||
Grid.Row="1" | ||
Visibility="{x:Bind ParsedCommandLineText, Mode=OneWay, Converter={StaticResource ParsedCommandLineTextVisibilityConverter}}" | ||
Style="{ThemeResource ParsedCommandLineBorderStyle}" | ||
Padding="16" | ||
HorizontalAlignment="Stretch" | ||
VerticalAlignment="Center"> | ||
|
||
<TextBlock | ||
FontStyle="Italic" | ||
TextWrapping="Wrap" | ||
Text="{x:Bind ParsedCommandLineText, Mode=OneWay}"/> | ||
</Border> | ||
|
||
<ListView | ||
Grid.Row="2" | ||
x:Name="_filteredActionsView" | ||
|
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious -- we're showing the no matches string all the time now? What's this look like?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DHowett - I am afraid this might be a leftover.. 🤦 which is hidden by the ParsedCommandLineText... 🤔
Fixing it immediately, after I am finalizing the live search for initial review. Hopefully today (it is already 2am for me 😄)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. It is a leftover. Thanks!