Skip to content

Update our SUI to follow win 11 guidelines#11720

Merged
PankajBhojwani merged 23 commits intomainfrom
dev/pabhoj/SUI_11
Jan 28, 2022
Merged

Update our SUI to follow win 11 guidelines#11720
PankajBhojwani merged 23 commits intomainfrom
dev/pabhoj/SUI_11

Conversation

@PankajBhojwani
Copy link
Contributor

@PankajBhojwani PankajBhojwani commented Nov 9, 2021

Summary of the Pull Request

Updates our SUI to follow the windows 11 style guidelines. Includes updating our setting containers to follow the 'expander' style.

PR Checklist

@github-actions
Copy link

github-actions bot commented Nov 9, 2021

@check-spelling-bot Report

Unrecognized words, please review:

  • ayy
Previously acknowledged words that are now absent carlos dpg sid SPACEBAR Unregister Urxvt vcvarsall xIcon yIcon zamora
To accept these unrecognized words as correct (and remove the previously acknowledged and now absent words), run the following commands

... in a clone of the [email protected]:microsoft/terminal.git repository
on the dev/pabhoj/SUI_11 branch:

update_files() {
perl -e '
my @expect_files=qw('".github/actions/spelling/expect/alphabet.txt
.github/actions/spelling/expect/expect.txt
.github/actions/spelling/expect/web.txt"');
@ARGV=@expect_files;
my @stale=qw('"$patch_remove"');
my $re=join "|", @stale;
my $suffix=".".time();
my $previous="";
sub maybe_unlink { unlink($_[0]) if $_[0]; }
while (<>) {
if ($ARGV ne $old_argv) { maybe_unlink($previous); $previous="$ARGV$suffix"; rename($ARGV, $previous); open(ARGV_OUT, ">$ARGV"); select(ARGV_OUT); $old_argv = $ARGV; }
next if /^(?:$re)(?:(?:\r|\n)*$| .*)/; print;
}; maybe_unlink($previous);'
perl -e '
my $new_expect_file=".github/actions/spelling/expect/f9b97c4880f63af8d034234f4d23c24b8704f8a7.txt";
use File::Path qw(make_path);
use File::Basename qw(dirname);
make_path (dirname($new_expect_file));
open FILE, q{<}, $new_expect_file; chomp(my @words = <FILE>); close FILE;
my @add=qw('"$patch_add"');
my %items; @items{@words} = @words x (1); @items{@add} = @add x (1);
@words = sort {lc($a)."-".$a cmp lc($b)."-".$b} keys %items;
open FILE, q{>}, $new_expect_file; for my $word (@words) { print FILE "$word\n" if $word =~ /\w/; };
close FILE;
system("git", "add", $new_expect_file);
'
}

comment_json=$(mktemp)
curl -L -s -S \
  --header "Content-Type: application/json" \
  "https://api.github.com/repos/microsoft/terminal/issues/comments/964618191" > "$comment_json"
comment_body=$(mktemp)
jq -r .body < "$comment_json" > $comment_body
rm $comment_json

patch_remove=$(perl -ne 'next unless s{^</summary>(.*)</details>$}{$1}; print' < "$comment_body")
  

patch_add=$(perl -e '$/=undef;
$_=<>;
s{<details>.*}{}s;
s{^#.*}{};
s{\n##.*}{};
s{(?:^|\n)\s*\*}{}g;
s{\s+}{ }g;
print' < "$comment_body")
  
update_files
rm $comment_body
git add -u
✏️ Contributor please read this

By default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.

⚠️ The command is written for posix shells. You can copy the contents of each perl command excluding the outer ' marks and dropping any '"/"' quotation mark pairs into a file and then run perl file.pl from the root of the repository to run the code. Alternatively, you can manually insert the items...

If the listed items are:

  • ... misspelled, then please correct them instead of using the command.
  • ... names, please add them to .github/actions/spelling/allow/names.txt.
  • ... APIs, you can add them to a file in .github/actions/spelling/allow/.
  • ... just things you're using, please add them to an appropriate file in .github/actions/spelling/expect/.
  • ... tokens you only need in one place and shouldn't generally be used, you can add an item in an appropriate file in .github/actions/spelling/patterns/.

See the README.md in each directory for more information.

🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉

🗜️ If you see a bunch of garbage

If it relates to a ...

well-formed pattern

See if there's a pattern that would match it.

If not, try writing one and adding it to a patterns/{file}.txt.

Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

Note that patterns can't match multiline strings.

binary-ish string

Please add a file path to the excludes.txt file instead of just accepting the garbage.

File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

@PankajBhojwani
Copy link
Contributor Author

NOTE: This is slightly different from the settings app in the following manner - when you hover over our expanders, only the chevron/arrow gets highlighted, whereas when you hover over the expanders in the settings app, the entire control gets highlighted. We know about this difference and are sticking with our implementation because the settings app implemented its own version of an 'expander' that is actually a toggle button + a border instead of using the built-in xaml expander, which is what we are using. Here's the difference in GIFs:

Ours:
hoverexpander

Settings app:
hovertoggle

Copy link
Member

@carlos-zamora carlos-zamora left a comment

Choose a reason for hiding this comment

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

It's annoying that the mux expander is different from the Settings App one, but this is a good start. :)

Comment on lines +61 to +62
<Style x:Key="NonExpanderGrid"
TargetType="Grid">
Copy link
Member

Choose a reason for hiding this comment

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

Is there anything we can set the BasedOn property too? That way, if any changes happen upstream, we'll just get them for free.

@tropicaaal
Copy link

tropicaaal commented Nov 12, 2021

I personally agree that the default expander style should be kept, as settings is the only inbox app that uses those. Other inbox apps such as Calculator, Clock and Snipping Tool all use the default expander style in their settings.

@Shomnipotence
Copy link

image
A Design for two level navigation

image
If you just want only one level navigation,the Icons Only is a better choose。

@Shomnipotence
Copy link

for the button bar ,the in-app-acrylic is a good way to show the content in the background
image

@LasseRosenow
Copy link

I was wondering: Why have those boxes with rounded corners?

The windows 11 settings app does not have any boxes. The navigation and the pages share the same background.

@Tropix126 already created a design concept that looks much more consistent to the windows 11 settings:

#11231 (comment)

@tropicaaal
Copy link

tropicaaal commented Dec 8, 2021

The windows 11 settings app does not have any boxes. The navigation and the pages share the same background.

This is just due to the default styling added by WinUI, it can be overrided fairly easily if they want to do that.

One thing that I might suggest if you guys make the settings panel flush with the app, is to also modify the tabs to be semitransparent so they line up as a single apparent surface. I imagine this will also depend on how mica is handled throughout the titlebar too, though.

image

@zadjii-msft
Copy link
Member

  • The rename button in the schemes page cuts off half the icon now...?
    image
  • Curiously, the rest of the icons throughout the UI are still using Segoe MDL2, instead of Segoe Fluent. We may need to manually update the font name where we're using it manually...

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.

meh, I'm pretty much good with this. Let's merge and keep working on the rest of the polish for 1.12

<ResourceDictionary.MergedDictionaries>
<!-- Include the MUX Controls resources -->
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls"
ControlsResourcesVersion="Version1" />
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 going to also change the appearance of the tabs, of the command palette, the find dialog, the content dialogs, the toasts - everything.

This almost deserves it's own PR to make sure everything besides the SUI still looks & works right

@PankajBhojwani PankajBhojwani marked this pull request as ready for review January 25, 2022 21:54
@PankajBhojwani
Copy link
Contributor Author

Undrafting this so we can get this in, the actions page and color schemes page will be done in post

@zadjii-msft zadjii-msft added the Needs-Second It's a PR that needs another sign-off label Jan 26, 2022
@ghost ghost requested review from leonMSFT, lhecker and miniksa January 26, 2022 12:21
@zadjii-msft zadjii-msft mentioned this pull request Jan 26, 2022
2 tasks
<Style TargetType="local:SettingContainer">
<Setter Property="Margin" Value="0,24,0,0" />
<Setter Property="IsTabStop" Value="False" />
<Setter Property="MaxWidth" Value="1000" />
Copy link
Member

Choose a reason for hiding this comment

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

Is 1000 enough for super high resolution screens with the window maximized?

Copy link
Member

Choose a reason for hiding this comment

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

I'm sure this value is in DIPs, So that should be 3000px at 300% scaling and thus fine.

Copy link
Member

Choose a reason for hiding this comment

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

Aha OK

</Grid>

<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
Copy link
Member

Choose a reason for hiding this comment

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

My brain has exploded at these animation declarations. My hope is that you were able to just steal these from somewhere and not have to figure all this out yourself. Sheesh!

Copy link
Contributor Author

@PankajBhojwani PankajBhojwani Jan 27, 2022

Choose a reason for hiding this comment

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

Yeah I got them from the xaml github (yay open source 👍)

@PankajBhojwani PankajBhojwani changed the title SUI rejuvenation [WORK IN PROGRESS] SUI rejuvenation Jan 27, 2022
@PankajBhojwani PankajBhojwani changed the title SUI rejuvenation Update our SUI to follow win 11 guidelines Jan 27, 2022
@zadjii-msft
Copy link
Member

I'm not automerging this because it'll blow up the stacked changes IIRC

Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

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

i love this, and you did a great job pulling it together

ghost pushed a commit that referenced this pull request Jan 27, 2022
Turns out, this bug only repros in Controls version 2. I'm not sure why, but it didn't repro only on main. So this fix does nothing until #11720 merges.

This PR prevents us from setting properties on the paste warning dialog unless we actually need to paste. 5f9c551 proves that settings these properties is what would cause the bug in the first place. 

I went a step further and cleaned this up a bit. This was always a little weird, having to get the `BracketedPasteEnabled` for the active control on the UI thread before we actually display the warning. In the post-#5000 future where going back to the control like this would be a x-proc hop, I figured I should just skip that entirely and plumb the `BracketedPaste` state out in the initial request. 

* [x] Closes #12202
* [x] I work here
* [x] No tests, but there's not a great place for a test like this
* [x] Doesn't affect docs

See also: #12241 which would introduce #12202 on its own.
@PankajBhojwani PankajBhojwani merged commit 35504f4 into main Jan 28, 2022
@PankajBhojwani PankajBhojwani deleted the dev/pabhoj/SUI_11 branch January 28, 2022 00:43
ghost pushed a commit that referenced this pull request Jan 28, 2022
## Summary of the Pull Request
**Note: This PR targets #11720**

Replaces our old pivot-style settings UI with a breadcrumb bar style, as per the windows 11 style guidelines. This required splitting `Profiles.xaml` into 3 separate files, `Profiles_Base.xaml` for general settings, `Profiles_Appearance.xaml` for appearance settings, `Profiles_Advanced.xaml` for advanced settings

The header in the navigation view is now a [BreadcrumbBar](https://docs.microsoft.com/en-us/windows/apps/design/controls/breadcrumbbar), which can be used to navigate back to `Profiles_Base` after moving into the advanced or appearance page (see GIF below)

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
* [ ] Closes #xxx
* [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
* [ ] Tests added/passed
* [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx
* [ ] Schema updated.
* [x] I work here

## Validation Steps Performed
![breadcrumb](https://user-images.githubusercontent.com/26824113/150410517-2232811e-4f5b-4732-9a0d-569cc94093b3.gif)
@zadjii-msft zadjii-msft mentioned this pull request Feb 7, 2022
12 tasks
zadjii-msft pushed a commit that referenced this pull request Mar 3, 2022
Updates our SUI to follow the windows 11 style guidelines. Includes updating our setting containers to follow the 'expander' style.

* [x] Closes #10631
* [x] Closes #9978
* [x] Closes #9595
* [x] Closes #11231
* [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
* [ ] Tests added/passed
* [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx
* [ ] Schema updated.
* [x] I work here
zadjii-msft pushed a commit that referenced this pull request Mar 3, 2022
**Note: This PR targets #11720**

Replaces our old pivot-style settings UI with a breadcrumb bar style, as per the windows 11 style guidelines. This required splitting `Profiles.xaml` into 3 separate files, `Profiles_Base.xaml` for general settings, `Profiles_Appearance.xaml` for appearance settings, `Profiles_Advanced.xaml` for advanced settings

The header in the navigation view is now a [BreadcrumbBar](https://docs.microsoft.com/en-us/windows/apps/design/controls/breadcrumbbar), which can be used to navigate back to `Profiles_Base` after moving into the advanced or appearance page (see GIF below)

<!-- Please review the items on the PR checklist before submitting-->
* [ ] Closes #xxx
* [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
* [ ] Tests added/passed
* [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx
* [ ] Schema updated.
* [x] I work here

![breadcrumb](https://user-images.githubusercontent.com/26824113/150410517-2232811e-4f5b-4732-9a0d-569cc94093b3.gif)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-SettingsUI Anything specific to the SUI 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. Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Second It's a PR that needs another sign-off Priority-3 A description (P3) Product-Terminal The new Windows Terminal.

Projects

None yet

9 participants