Skip to content
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

Command palette and search box visual tweaks #12913

Merged
4 commits merged into from Apr 29, 2022
Merged

Command palette and search box visual tweaks #12913

4 commits merged into from Apr 29, 2022

Conversation

ghost
Copy link

@ghost ghost commented Apr 15, 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.

@zadjii
Copy link

zadjii commented Apr 15, 2022

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

@DHowett
Copy link
Member

DHowett commented Apr 18, 2022

I, too, love this! Holy wow!

@DHowett
Copy link
Member

DHowett commented Apr 18, 2022

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 zadjii-msft added the Needs-Discussion Something that requires a team discussion before we can proceed label Apr 18, 2022
@DHowett
Copy link
Member

DHowett commented Apr 18, 2022

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
Author

ghost commented Apr 19, 2022

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

@zadjii-msft
Copy link
Member

zadjii-msft commented Apr 21, 2022

This is gorgeous, I love it so much

image

For those playing along in HC mode
image

@DHowett
Copy link
Member

DHowett commented Apr 21, 2022

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
Author

ghost commented Apr 22, 2022

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
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 zadjii-msft self-assigned this Apr 25, 2022
@zadjii-msft 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
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
Author

ghost commented Apr 26, 2022

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
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.

Copy link
Member

@zadjii-msft zadjii-msft left a comment

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
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
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.

@@ -482,6 +388,8 @@

<ListView x:Name="_filteredActionsView"
Grid.Row="2"
MinHeight="8"
Copy link
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 zadjii-msft removed their assignment Apr 27, 2022
@ghost
Copy link
Author

ghost commented Apr 29, 2022

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
Copy link

ghost commented Apr 29, 2022

CLA assistant check
All CLA requirements met.

@ghost ghost added Area-User Interface 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
Copy link
Member

@zadjii-msft zadjii-msft left a comment

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 zadjii-msft added the Needs-Second It's a PR that needs another sign-off label Apr 29, 2022
@zadjii-msft zadjii-msft added the AutoMerge Marked for automatic merge by the bot when requirements are met label Apr 29, 2022
@ghost
Copy link

ghost commented Apr 29, 2022

Hello @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 zadjii-msft mentioned this pull request May 5, 2022
20 tasks
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

ghost commented May 24, 2022

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

Handy links:

@ghost
Copy link

ghost commented May 24, 2022

🎉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-User Interface 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