From 19a5eb208dc2f51fc38361d887f1ace2bb9dfd6f Mon Sep 17 00:00:00 2001 From: PankajBhojwani Date: Fri, 11 Feb 2022 06:17:48 -0800 Subject: [PATCH] Add tooltips for nav items in the SUI (#12448) ## Summary of the Pull Request Profiles with long names were having their titles cut off in the navigation view sidebar. This change adds tooltips to all nav view items so the full names can still be read. ## References #11353 ## 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 sidebartooltip sidebartooltip2 --- .../TerminalSettingsEditor/MainPage.cpp | 2 ++ .../Resources/en-US/Resources.resw | 28 +++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/src/cascadia/TerminalSettingsEditor/MainPage.cpp b/src/cascadia/TerminalSettingsEditor/MainPage.cpp index e456afdc27..08855aa033 100644 --- a/src/cascadia/TerminalSettingsEditor/MainPage.cpp +++ b/src/cascadia/TerminalSettingsEditor/MainPage.cpp @@ -504,6 +504,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation if (!profile.Deleted()) { auto navItem = _CreateProfileNavViewItem(_viewModelForProfile(profile, _settingsClone)); + Controls::ToolTipService::SetToolTip(navItem, box_value(profile.Name())); menuItems.Append(navItem); } } @@ -511,6 +512,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation // Top off (the end of the nav view) with the Add Profile item MUX::Controls::NavigationViewItem addProfileItem; addProfileItem.Content(box_value(RS_(L"Nav_AddNewProfile/Content"))); + Controls::ToolTipService::SetToolTip(addProfileItem, box_value(RS_(L"Nav_AddNewProfile/Content"))); addProfileItem.Tag(box_value(addProfileTag)); FontIcon icon; diff --git a/src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw b/src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw index 0413a31b4b..59c308edd0 100644 --- a/src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw +++ b/src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw @@ -463,18 +463,34 @@ Appearance Header for the "appearance" menu item. This navigates to a page that lets you see and modify settings related to the app's appearance. + + Appearance + Tooltip for the "appearance" menu item. + Color schemes Header for the "color schemes" menu item. This navigates to a page that lets you see and modify schemes of colors that can be used by the terminal. + + Color schemes + Tooltip for the "color schemes" menu item. + Interaction Header for the "interaction" menu item. This navigates to a page that lets you see and modify settings related to the user's mouse and touch interactions with the app. + + Interaction + Tooltip for the "interaction" menu item. + Startup Header for the "startup" menu item. This navigates to a page that lets you see and modify settings related to the app's launch experience (i.e. screen position, mode, etc.) + + Startup + Tooltip for the "startup" menu item. + Open JSON file Header for a menu item. This opens the JSON file that is used to log the app's settings. @@ -483,14 +499,26 @@ Defaults Header for the "defaults" menu item. This navigates to a page that lets you see and modify settings that affect profiles. This is the lowest layer of profile settings that all other profile settings are based on. If a profile doesn't define a setting, this page is responsible for figuring out what that setting is supposed to be. + + Defaults + Tooltip for the "profile defaults" menu item. + Rendering Header for the "rendering" menu item. This navigates to a page that lets you see and modify settings related to the app's rendering of text in the terminal. + + Rendering + Tooltip for the "rendering" menu item. + Actions Header for the "actions" menu item. This navigates to a page that lets you see and modify commands, key bindings, and actions that can be done in the app. + + Actions + Tooltip for the "actions" menu item. + Acrylic opacity Header for a control to determine the level of opacity for the acrylic rendering material. The user can choose to make the acrylic background of the app more or less opaque.