Skip to content

Commit

Permalink
Remove Base Layer from Settings UI (#9655)
Browse files Browse the repository at this point in the history
Removes base layer (aka profiles.defaults) from the Settings UI. `SettingContainer` was also updated to not present a revert arrow when overriding a base layer value.

The new experience is now as follows:
- The revert arrow will only appear if you are overriding a value from a fragment extension.
- Users are still able to fully interact with `profiles.defaults` in their settings.json. Doing so still propagates those changes to their profiles as normal. In this case, the Settings UI presents the base layer value as the one that you selected.

#6800 - Settings UI Epic
Closes #9539
  • Loading branch information
carlos-zamora authored Mar 30, 2021
1 parent c7d2a81 commit 19fb9b2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 21 deletions.
12 changes: 0 additions & 12 deletions src/cascadia/TerminalSettingsEditor/MainPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ static const std::wstring_view launchTag{ L"Launch_Nav" };
static const std::wstring_view interactionTag{ L"Interaction_Nav" };
static const std::wstring_view renderingTag{ L"Rendering_Nav" };
static const std::wstring_view actionsTag{ L"Actions_Nav" };
static const std::wstring_view globalProfileTag{ L"GlobalProfile_Nav" };
static const std::wstring_view addProfileTag{ L"AddProfile" };
static const std::wstring_view colorSchemesTag{ L"ColorSchemes_Nav" };
static const std::wstring_view globalAppearanceTag{ L"GlobalAppearance_Nav" };
Expand Down Expand Up @@ -269,17 +268,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
});
contentFrame().Navigate(xaml_typename<Editor::Actions>(), actionsState);
}
else if (clickedItemTag == globalProfileTag)
{
auto profileVM{ _viewModelForProfile(_settingsClone.ProfileDefaults()) };
profileVM.IsBaseLayer(true);
_lastProfilesNavState = winrt::make<ProfilePageNavigationState>(profileVM,
_settingsClone.GlobalSettings().ColorSchemes(),
_lastProfilesNavState,
*this);

contentFrame().Navigate(xaml_typename<Editor::Profiles>(), _lastProfilesNavState);
}
else if (clickedItemTag == colorSchemesTag)
{
contentFrame().Navigate(xaml_typename<Editor::ColorSchemes>(), _colorSchemesNavState);
Expand Down
8 changes: 0 additions & 8 deletions src/cascadia/TerminalSettingsEditor/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,6 @@

<muxc:NavigationViewItemHeader x:Uid="Nav_Profiles" />

<muxc:NavigationViewItem x:Name="BaseLayerMenuItem"
x:Uid="Nav_ProfileDefaults"
Tag="GlobalProfile_Nav">
<muxc:NavigationViewItem.Icon>
<FontIcon Glyph="&#xE81E;" />
</muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem>

</muxc:NavigationView.MenuItems>

<muxc:NavigationView.PaneFooter>
Expand Down
6 changes: 5 additions & 1 deletion src/cascadia/TerminalSettingsEditor/SettingContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,11 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
// TODO GH#3818: When we add profile inheritance as a setting,
// we'll need an extra conditional check to see if this
// is the base layer or some other profile
return RS_(L"SettingContainer_OverrideMessageBaseLayer");

// GH#9539: Base Layer has been removed from the Settings UI.
// In the event that the Base Layer comes back,
// return RS_(L"SettingContainer_OverrideMessageBaseLayer") instead
return {};
}
}
}

0 comments on commit 19fb9b2

Please sign in to comment.