Skip to content

Commit

Permalink
format, breadcrumb is a word now I guess
Browse files Browse the repository at this point in the history
  • Loading branch information
PankajBhojwani committed Jan 12, 2022
1 parent 614448b commit c45cb11
Show file tree
Hide file tree
Showing 7 changed files with 270 additions and 266 deletions.
1 change: 1 addition & 0 deletions .github/actions/spelling/allow/allow.txt
@@ -1,4 +1,5 @@
apc
breadcrumb
calt
ccmp
changelog
Expand Down
41 changes: 20 additions & 21 deletions src/cascadia/TerminalSettingsEditor/MainPage.cpp
Expand Up @@ -314,28 +314,28 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
*this);

_profileViewModelChangedRevoker = _lastProfilesNavState.Profile().PropertyChanged(winrt::auto_revoke, [=](auto&&, const PropertyChangedEventArgs& args) {
const auto settingName{ args.PropertyName() };
if (settingName == L"CurrentPage")
const auto settingName{ args.PropertyName() };
if (settingName == L"CurrentPage")
{
const auto currentPage = _lastProfilesNavState.Profile().CurrentPage();
if (currentPage == L"Base")
{
const auto currentPage = _lastProfilesNavState.Profile().CurrentPage();
if (currentPage == L"Base")
{
contentFrame().Navigate(xaml_typename<Editor::Profiles_Base>(), _lastProfilesNavState);
_breadcrumbs.Clear();
_breadcrumbs.Append(RS_(L"Nav_ProfileDefaults/Content"));
}
else if (currentPage == L"Appearance")
{
contentFrame().Navigate(xaml_typename<Editor::Profiles_Appearance>(), _lastProfilesNavState);
_breadcrumbs.Append(RS_(L"Profile_Appearance/Header"));
}
else if (currentPage == L"Advanced")
{
contentFrame().Navigate(xaml_typename<Editor::Profiles_Advanced>(), _lastProfilesNavState);
_breadcrumbs.Append(RS_(L"Profile_Advanced/Header"));
}
contentFrame().Navigate(xaml_typename<Editor::Profiles_Base>(), _lastProfilesNavState);
_breadcrumbs.Clear();
_breadcrumbs.Append(RS_(L"Nav_ProfileDefaults/Content"));
}
});
else if (currentPage == L"Appearance")
{
contentFrame().Navigate(xaml_typename<Editor::Profiles_Appearance>(), _lastProfilesNavState);
_breadcrumbs.Append(RS_(L"Profile_Appearance/Header"));
}
else if (currentPage == L"Advanced")
{
contentFrame().Navigate(xaml_typename<Editor::Profiles_Advanced>(), _lastProfilesNavState);
_breadcrumbs.Append(RS_(L"Profile_Advanced/Header"));
}
}
});

contentFrame().Navigate(xaml_typename<Editor::Profiles_Base>(), _lastProfilesNavState);
_breadcrumbs.Append(RS_(L"Nav_ProfileDefaults/Content"));
Expand Down Expand Up @@ -451,7 +451,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
_lastProfilesNavState.Profile().CurrentPage(L"Base");
}


void MainPage::_InitializeProfilesList()
{
const auto menuItems = SettingsNav().MenuItems();
Expand Down
4 changes: 2 additions & 2 deletions src/cascadia/TerminalSettingsEditor/MainPage.xaml
Expand Up @@ -43,9 +43,9 @@
TabFocusNavigation="Cycle">
<muxc:NavigationView.Header>
<muxc:BreadcrumbBar x:Name="NavigationBreadcrumbBar"
ItemsSource="{x:Bind Breadcrumbs}"
Margin="-40,0,0,16"
ItemClicked="BreadcrumbBar_ItemClicked"
Margin="-40,0,0,16">
ItemsSource="{x:Bind Breadcrumbs}">
<muxc:BreadcrumbBar.Resources>
<ResourceDictionary>
<x:Double x:Key="BreadcrumbBarItemThemeFontSize">28</x:Double>
Expand Down
84 changes: 42 additions & 42 deletions src/cascadia/TerminalSettingsEditor/Profiles_Advanced.xaml
Expand Up @@ -35,84 +35,84 @@
Margin="{StaticResource StandardIndentMargin}"
Style="{StaticResource DisclaimerStyle}"
Visibility="{x:Bind State.Profile.IsBaseLayer}" />
<ScrollViewer ViewChanging="ViewChanging"
Grid.Row="1">
<StackPanel Style="{StaticResource PivotStackStyle}"
Margin="13,0,0,0">
<ScrollViewer Grid.Row="1"
ViewChanging="ViewChanging">
<StackPanel Margin="13,0,0,0"
Style="{StaticResource PivotStackStyle}">
<!-- Suppress Application Title -->
<local:SettingContainer x:Uid="Profile_SuppressApplicationTitle"
ClearSettingValue="{x:Bind State.Profile.ClearSuppressApplicationTitle}"
HasSettingValue="{x:Bind State.Profile.HasSuppressApplicationTitle, Mode=OneWay}"
SettingOverrideSource="{x:Bind State.Profile.SuppressApplicationTitleOverrideSource, Mode=OneWay}">
ClearSettingValue="{x:Bind State.Profile.ClearSuppressApplicationTitle}"
HasSettingValue="{x:Bind State.Profile.HasSuppressApplicationTitle, Mode=OneWay}"
SettingOverrideSource="{x:Bind State.Profile.SuppressApplicationTitleOverrideSource, Mode=OneWay}">
<ToggleSwitch IsOn="{x:Bind State.Profile.SuppressApplicationTitle, Mode=TwoWay}" />
</local:SettingContainer>

<!-- Antialiasing Mode -->
<local:SettingContainer x:Uid="Profile_AntialiasingMode"
ClearSettingValue="{x:Bind State.Profile.ClearAntialiasingMode}"
HasSettingValue="{x:Bind State.Profile.HasAntialiasingMode, Mode=OneWay}"
SettingOverrideSource="{x:Bind State.Profile.AntialiasingModeOverrideSource, Mode=OneWay}"
Style="{StaticResource ExpanderSettingContainerStyle}">
ClearSettingValue="{x:Bind State.Profile.ClearAntialiasingMode}"
HasSettingValue="{x:Bind State.Profile.HasAntialiasingMode, Mode=OneWay}"
SettingOverrideSource="{x:Bind State.Profile.AntialiasingModeOverrideSource, Mode=OneWay}"
Style="{StaticResource ExpanderSettingContainerStyle}">
<muxc:RadioButtons AutomationProperties.AccessibilityView="Content"
ItemTemplate="{StaticResource EnumRadioButtonTemplate}"
ItemsSource="{x:Bind AntiAliasingModeList, Mode=OneWay}"
SelectedItem="{x:Bind CurrentAntiAliasingMode, Mode=TwoWay}" />
ItemTemplate="{StaticResource EnumRadioButtonTemplate}"
ItemsSource="{x:Bind AntiAliasingModeList, Mode=OneWay}"
SelectedItem="{x:Bind CurrentAntiAliasingMode, Mode=TwoWay}" />
</local:SettingContainer>

<!-- AltGr Aliasing -->
<local:SettingContainer x:Uid="Profile_AltGrAliasing"
ClearSettingValue="{x:Bind State.Profile.ClearAltGrAliasing}"
HasSettingValue="{x:Bind State.Profile.HasAltGrAliasing, Mode=OneWay}"
SettingOverrideSource="{x:Bind State.Profile.AltGrAliasingOverrideSource, Mode=OneWay}">
ClearSettingValue="{x:Bind State.Profile.ClearAltGrAliasing}"
HasSettingValue="{x:Bind State.Profile.HasAltGrAliasing, Mode=OneWay}"
SettingOverrideSource="{x:Bind State.Profile.AltGrAliasingOverrideSource, Mode=OneWay}">
<ToggleSwitch IsOn="{x:Bind State.Profile.AltGrAliasing, Mode=TwoWay}" />
</local:SettingContainer>

<!-- Snap On Input -->
<local:SettingContainer x:Uid="Profile_SnapOnInput"
ClearSettingValue="{x:Bind State.Profile.ClearSnapOnInput}"
HasSettingValue="{x:Bind State.Profile.HasSnapOnInput, Mode=OneWay}"
SettingOverrideSource="{x:Bind State.Profile.SnapOnInputOverrideSource, Mode=OneWay}">
ClearSettingValue="{x:Bind State.Profile.ClearSnapOnInput}"
HasSettingValue="{x:Bind State.Profile.HasSnapOnInput, Mode=OneWay}"
SettingOverrideSource="{x:Bind State.Profile.SnapOnInputOverrideSource, Mode=OneWay}">
<ToggleSwitch IsOn="{x:Bind State.Profile.SnapOnInput, Mode=TwoWay}" />
</local:SettingContainer>

<!-- History Size -->
<local:SettingContainer x:Uid="Profile_HistorySize"
ClearSettingValue="{x:Bind State.Profile.ClearHistorySize}"
HasSettingValue="{x:Bind State.Profile.HasHistorySize, Mode=OneWay}"
SettingOverrideSource="{x:Bind State.Profile.HistorySizeOverrideSource, Mode=OneWay}">
ClearSettingValue="{x:Bind State.Profile.ClearHistorySize}"
HasSettingValue="{x:Bind State.Profile.HasHistorySize, Mode=OneWay}"
SettingOverrideSource="{x:Bind State.Profile.HistorySizeOverrideSource, Mode=OneWay}">
<muxc:NumberBox x:Uid="Profile_HistorySizeBox"
LargeChange="100"
Minimum="0"
SmallChange="10"
Style="{StaticResource NumberBoxSettingStyle}"
Value="{x:Bind State.Profile.HistorySize, Mode=TwoWay}" />
LargeChange="100"
Minimum="0"
SmallChange="10"
Style="{StaticResource NumberBoxSettingStyle}"
Value="{x:Bind State.Profile.HistorySize, Mode=TwoWay}" />
</local:SettingContainer>

<!-- Close On Exit -->
<local:SettingContainer x:Uid="Profile_CloseOnExit"
ClearSettingValue="{x:Bind State.Profile.ClearCloseOnExit}"
HasSettingValue="{x:Bind State.Profile.HasCloseOnExit, Mode=OneWay}"
SettingOverrideSource="{x:Bind State.Profile.CloseOnExitOverrideSource, Mode=OneWay}"
Style="{StaticResource ExpanderSettingContainerStyle}">
ClearSettingValue="{x:Bind State.Profile.ClearCloseOnExit}"
HasSettingValue="{x:Bind State.Profile.HasCloseOnExit, Mode=OneWay}"
SettingOverrideSource="{x:Bind State.Profile.CloseOnExitOverrideSource, Mode=OneWay}"
Style="{StaticResource ExpanderSettingContainerStyle}">
<muxc:RadioButtons AutomationProperties.AccessibilityView="Content"
ItemTemplate="{StaticResource EnumRadioButtonTemplate}"
ItemsSource="{x:Bind CloseOnExitModeList, Mode=OneWay}"
SelectedItem="{x:Bind CurrentCloseOnExitMode, Mode=TwoWay}" />
ItemTemplate="{StaticResource EnumRadioButtonTemplate}"
ItemsSource="{x:Bind CloseOnExitModeList, Mode=OneWay}"
SelectedItem="{x:Bind CurrentCloseOnExitMode, Mode=TwoWay}" />
</local:SettingContainer>

<!-- Bell Style -->
<local:SettingContainer x:Uid="Profile_BellStyle"
ClearSettingValue="{x:Bind State.Profile.ClearBellStyle}"
HasSettingValue="{x:Bind State.Profile.HasBellStyle, Mode=OneWay}"
SettingOverrideSource="{x:Bind State.Profile.BellStyleOverrideSource, Mode=OneWay}"
Style="{StaticResource ExpanderSettingContainerStyle}">
ClearSettingValue="{x:Bind State.Profile.ClearBellStyle}"
HasSettingValue="{x:Bind State.Profile.HasBellStyle, Mode=OneWay}"
SettingOverrideSource="{x:Bind State.Profile.BellStyleOverrideSource, Mode=OneWay}"
Style="{StaticResource ExpanderSettingContainerStyle}">
<StackPanel>
<CheckBox x:Uid="Profile_BellStyleAudible"
IsChecked="{x:Bind IsBellStyleFlagSet(1), BindBack=SetBellStyleAudible, Mode=TwoWay}" />
IsChecked="{x:Bind IsBellStyleFlagSet(1), BindBack=SetBellStyleAudible, Mode=TwoWay}" />
<CheckBox x:Uid="Profile_BellStyleWindow"
IsChecked="{x:Bind IsBellStyleFlagSet(2), BindBack=SetBellStyleWindow, Mode=TwoWay}" />
IsChecked="{x:Bind IsBellStyleFlagSet(2), BindBack=SetBellStyleWindow, Mode=TwoWay}" />
<CheckBox x:Uid="Profile_BellStyleTaskbar"
IsChecked="{x:Bind IsBellStyleFlagSet(4), BindBack=SetBellStyleTaskbar, Mode=TwoWay}" />
IsChecked="{x:Bind IsBellStyleFlagSet(4), BindBack=SetBellStyleTaskbar, Mode=TwoWay}" />
</StackPanel>
</local:SettingContainer>
</StackPanel>
Expand Down

1 comment on commit c45cb11

@github-actions
Copy link

@github-actions github-actions bot commented on c45cb11 Jan 12, 2022

Choose a reason for hiding this comment

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

@check-spelling-bot Report

Unrecognized words, please review:

  • breadcrumbs
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 git@github.com:microsoft/terminal.git repository
on the dev/pabhoj/SUI_breadcrumb 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/c45cb11034fb9c34a9957fbe6f1bc278b7352ea3.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/comments/63659746" > "$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).

Please sign in to comment.