Skip to content

Command palette and search box visual tweaks - #12913

Merged
4 commits merged into
mainfrom
unknown repository
Apr 29, 2022
Merged

4 commits merged into
mainfrom
unknown repository

Conversation

@ghost

@ghost Deleted user (ghost) commented Apr 15, 2022 •

Copy link
Copy Markdown

Tweaked command palette and search box to better match the Windows 11 Fluent design:

  • Now styled like a normal flyout, with acrylic, shadow and border
  • TextBox now uses default style
  • Tweaked button and key chord designs
  • Adjusted spacing

Fixes #12968.

@zadjii

Copy link
Copy Markdown

Wow I friggin love it. I'm offline for the weekend already, but lemme ping the team on Monday.

@DHowett

Copy link
Copy Markdown
Member

I, too, love this! Holy wow!

@DHowett

Copy link
Copy Markdown
Member

I somewhat prefer the first design, as it is consistent with the search box and what VSCode does. Giving the controls some space affords us some visual distance between the shadow, tab content and search.

How does the list look in tab switcher mode? (by default, Ctrl+Tab will trigger it; keep holding down Ctrl to see the switcher)

@zadjii-msft Mike Griese (zadjii-msft) added the Needs-Discussion Something that requires a team discussion before we can proceed label Apr 18, 2022
@DHowett

Dustin L. Howett (DHowett) commented Apr 18, 2022 •

Copy link
Copy Markdown
Member

Ah, and how does this look in "commandline" mode? If you backspace the implicit > it will change the UI up a bit.

@ghost

Copy link
Copy Markdown
Author

imageimage
The tab switcher has a weird space at the top, I'll try to fix it.

@zadjii-msft

Mike Griese (zadjii-msft) commented Apr 21, 2022 •

Copy link
Copy Markdown
Member

This is gorgeous, I love it so much

image

For those playing along in HC mode
image

@DHowett

Copy link
Copy Markdown
Member

I think this is waiting on the fix for the tab switcher top gap, right? I'm happy to review it still! I love it so much.

@ghost

Copy link
Copy Markdown
Author

I fixed the spacing, but there is still a crash happening sometimes when typing and deleting text inside the command palette. It can be easily replicated by typing >, backspace, >.

@zadjii-msft

Copy link
Copy Markdown
Member

I fixed the spacing, but there is still a crash happening sometimes when typing and deleting text inside the command palette. It can be easily replicated by typing >, backspace, >.

I'll try debugging this more later today. Wild that it doesn't even like give a useful stack trace - it just explodes 🤔

@zadjii-msft Mike Griese (zadjii-msft) added Product-Terminal The new Windows Terminal. Area-CmdPal Command Palette issues and features and removed Needs-Discussion Something that requires a team discussion before we can proceed labels Apr 25, 2022
@zadjii-msft

Copy link
Copy Markdown
Member
0:000> !xamlstowed
-------------------------
Callstack for hr=88000fa8 - AG_E_LAYOUT_CYCLE

Oh no. This won't be simple to diagnose. Lemme eye up the diff a bit closer, see if there's something that stands out.

@ghost

Copy link
Copy Markdown
Author

The issue happens when MinHeight in _filteredActionsView has values from 5 to 13. There's a connection to the negative padding, but I'm not sure why a key combination causes this.

@zadjii-msft

Copy link
Copy Markdown
Member

The issue happens when MinHeight in _filteredActionsView has values from 5 to 13. There's a connection to the negative padding, but I'm not sure why a key combination causes this.

I suspect it has nothing to do with the key combo, but more about the showing/hiding/showing of certain UI elements. XAML can be finicky like that sometimes. At this point, we might just need to mess with the padding and general spacing to try and work around this.

@zadjii-msft Mike Griese (zadjii-msft) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(apparently I had a review in progress).

Mostly, notes on the MinHeight thing.

<!-- Remove when implementing WinUI 2.6 -->
<Thickness x:Key="FlyoutContentPadding">12</Thickness>
<!-- Shadow that can be used by any control. -->
<ThemeShadow x:Name="SharedShadow" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is so brilliant. This is what our life would be like if we had people who actually knew how to use XAML ☺️

CornerRadius="{ThemeResource OverlayCornerRadius}"
Orientation="Horizontal"
Style="{ThemeResource SearchBoxBackground}">
Shadow="{StaticResource SharedShadow}"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a future note to self - if we ever do productize the WinUI Terminal control, we'll need to edit this, but that is DEFINITELY not a concern for now.


<ListView x:Name="_filteredActionsView"
Grid.Row="2"
MinHeight="8"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose here's a thought - why do we need this MinHeight at all? Setting it to 0 seems to mitigate the crash, and I don't know what it's needed for. At least, my eyes aren't sensitive enough to see what this changes...

@ghost ghost added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Apr 27, 2022
@zadjii-msft Mike Griese (zadjii-msft) removed their assignment Apr 27, 2022
@ghost

Copy link
Copy Markdown
Author

image
That was because of a very small issue: when the list is empty, it still takes up space (6px), when it should be collapsed. I made it 8px to look more balanced, but I'll revert that.

@ghost ghost removed the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Apr 29, 2022
@ghost

Deleted user (ghost) commented Apr 29, 2022 •

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

@ghost ghost added Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Issue-Bug It either shouldn't be doing this or needs an investigation. labels Apr 29, 2022
@ghost ghost added the Priority-2 A description (P2) label Apr 29, 2022

@zadjii-msft Mike Griese (zadjii-msft) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the persistence debugging that MinHeight crash - that kind of thing would have drove me crazy!

@zadjii-msft Mike Griese (zadjii-msft) added the AutoMerge Marked for automatic merge by the bot when requirements are met label Apr 29, 2022
@ghost

Copy link
Copy Markdown

Hello Mike Griese (@zadjii-msft)!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost
ghost merged commit b63102f into microsoft:main Apr 29, 2022
@zadjii-msft Mike Griese (zadjii-msft) mentioned this pull request May 5, 2022
13 of 20 tasks
Carlos Zamora (carlos-zamora) pushed a commit that referenced this pull request May 12, 2022
Tweaked command palette and search box to better match the Windows 11 Fluent design:
* Now styled like a normal flyout, with acrylic, shadow and border
* TextBox now uses default style
* Tweaked button and key chord designs
* Adjusted spacing

Fixes #12968.

![searchlight](https://user-images.githubusercontent.com/101892345/163623805-3b860942-7e2e-401e-8739-3a966cf2b4a9.png)
![palettelight](https://user-images.githubusercontent.com/101892345/163623825-b1f187fa-557b-4921-86bc-4040ffd2952f.png)
![searchdark](https://user-images.githubusercontent.com/101892345/163623820-b3b7b138-d9af-4aae-a637-8e48717ddd2c.png)
![palettedark](https://user-images.githubusercontent.com/101892345/163623830-448354e6-6b37-4dbe-8cb4-e9275aa56322.png)

(cherry picked from commit b63102f)
Service-Card-Id: 81805346
Service-Version: 1.13
@ghost

Copy link
Copy Markdown

🎉Windows Terminal v1.13.1143 has been released which incorporates this pull request.:tada:

Handy links:

@ghost

Copy link
Copy Markdown

🎉Windows Terminal Preview v1.14.143 has been released which incorporates this pull request.:tada:

Handy links:

@ghost
ghost deleted the search-visual-tweaks branch September 1, 2022 20:13
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-CmdPal Command Palette issues and features Area-UserInterface Issues pertaining to the user interface of the Console or Terminal AutoMerge Marked for automatic merge by the bot when requirements are met Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Second It's a PR that needs another sign-off Priority-2 A description (P2) Product-Terminal The new Windows Terminal.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"No matching commands" overlaps Back button in nested command palette

4 participants