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

Merge the Windows 11 styles into 1.12 #12696

Merged
merged 27 commits into from
Mar 15, 2022

Commits on Mar 3, 2022

  1. Apply MVVM for profiles in SUI (#11877)

    Cleans up `ProfileViewModel`, `Profiles`, and `ProfilePageNavigationState` to move all of the view model responsibilities over to `ProfileViewModel`. We don't actually store the `ProfilePageNavigationState` anymore. We only use it as a way to transfer information to the new page.
    
    - I pulled out `ProfileViewModel` into its own file to keep things cleaner. It was getting pretty big.
    - The font lists are now stored in a static location in `ProfileViewModel`, which means that we can reuse the same list between pages.
    - the profile pivot was also moved to the `ProfileViewModel` and stored as a static value.
    
    ✅ pivot behavior is the same
    ✅ font list is still populated
    carlos-zamora authored and zadjii-msft committed Mar 3, 2022
    Configuration menu
    Copy the full SHA
    fe46f70 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9b4ee32 View commit details
    Browse the repository at this point in the history
  3. Update our SUI to follow win 11 guidelines (#11720)

    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
    PankajBhojwani authored and zadjii-msft committed Mar 3, 2022
    Configuration menu
    Copy the full SHA
    49b7978 View commit details
    Browse the repository at this point in the history
  4. Fix broken reset button on some profile settings (#12275)

    This fixes a bug where several settings would not show the reset button. The root cause of this issue is two fold:
    1. Hooking up `CurrentXXX`
       - `GETSET_BINDABLE_ENUM_SETTING` was hooked up to the **settings** model profile object instead of the **view** model profile object. Since the settings model has no `PropertyChanged` system, any changes were directly being applied to the setting, but not notifying the view model (and thus, the view, by extension) to update themselves.
       - This fix required me to slightly modify the macro. Rather than using two parameters (object and function name), I used one parameter (path to getter/setter).
    2. Responding to the `PropertyChanged` notifications
       - Now that we're actually dispatching the `PropertyChanged` notifications, we need to actually respond to them. This behavior was defined in `Profiles::OnNavigatedTo()` in the `PropertyChanged()` handler. Funny enough, that code was still there, it just didn't do anything because it was trying to notify that `Profiles::CurrentXXX` changed. This is invalid because `CurrentXXX` got moved to `ProfileViewModel`.
       - The fix here was pretty easy. Just move the property changed handler to `ProfileViewModel`'s `PropertyChanged` handler that is defined in the ctor.
    
    Bug introduced in #11877
    
    ✅ Profile termination behavior
    ✅ Bell notification style
    ✅ Text antialiasing
    ✅ Scrollbar visibility
    carlos-zamora authored and zadjii-msft committed Mar 3, 2022
    Configuration menu
    Copy the full SHA
    57ec119 View commit details
    Browse the repository at this point in the history
  5. Add a BreadcrumbBar to the SUI (#12144)

    **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)
    PankajBhojwani authored and zadjii-msft committed Mar 3, 2022
    Configuration menu
    Copy the full SHA
    c8c7d4b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2ee347f View commit details
    Browse the repository at this point in the history
  7. Fix a number of small issues with the SUI (#12287)

    ## Summary of the Pull Request
    Fix various things from the recent SUI changes
    
    - The Appearance/Advanced toggle buttons now have a max width
    - We don't need `Profiles.cpp` anymore
    - The `Elevate` setting is now back in the SUI
    - There is no longer an alignment difference between non-expander settings and expander settings
    - Expander settings no longer require hitting `Tab` twice to get to them
    
    <!-- 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
    PankajBhojwani authored and zadjii-msft committed Mar 3, 2022
    Configuration menu
    Copy the full SHA
    511ed89 View commit details
    Browse the repository at this point in the history
  8. Fix more SUI and Rejuvenated UI issues (#12326)

    - The add new profile page now uses a dropdown rather than radio buttons
    - Subheaders, breadcrumb bar, buttons etc are now all centralized when the window is maximized (so they all align with the expanders now)
    - We no longer override the titlebar colors and instead use the xaml defaults (these still aren't great but at least we will get the fix automatically when it happens upstream)
    - Breadcrumb bar no longer has a negative margin, so there's no weird overlap that happens when the window becomes small
    - The number boxes for launch size and font size now use the `Inline` placement mode rather than compact, allowing modification to the number with fewer clicks
    - Textboxes now have a greater max width so they can occupy more space in the expander if needed
    PankajBhojwani authored and zadjii-msft committed Mar 3, 2022
    Configuration menu
    Copy the full SHA
    38eb777 View commit details
    Browse the repository at this point in the history
  9. Localize and polish Profile page navigators (#12321)

    ## Summary of the Pull Request
    Adds some polish around the navigators in the profile page (i.e. "appearance" and "advanced" button) by doing the following:
    - use the localized resources for the pivot on the navigators
    - simplify the navigators to be buttons instead of toggle buttons
    
    Doing so has Narrator identify these as buttons rather than toggle buttons. So now Narrator won't say that the button is "off", which just makes more sense.
    
    ## Validation Steps Performed
    ✅ Narrator says "Advanced button" or "Appearance button" on the navigator
    ✅ The navigators look the same as before
    carlos-zamora authored and zadjii-msft committed Mar 3, 2022
    Configuration menu
    Copy the full SHA
    c0ae683 View commit details
    Browse the repository at this point in the history
  10. Fix disclaimer text not centralizing when maximized (#12374)

    ## Summary of the Pull Request
    Fix the disclaimer text boxes in `Rendering` and `Defaults`not centralizing along with the expanders when the window is maximized
    
    ## 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
    <img width="1128" alt="defaults" src="https://user-images.githubusercontent.com/26824113/152584084-a999cb29-73bc-4970-889a-f95ea64c1b4c.png">
    <img width="1128" alt="rendering" src="https://user-images.githubusercontent.com/26824113/152584099-a54519da-7bca-4ebe-b487-b68ac5cf1a37.png">
    PankajBhojwani authored and zadjii-msft committed Mar 3, 2022
    Configuration menu
    Copy the full SHA
    bc53333 View commit details
    Browse the repository at this point in the history
  11. Fix invoking the rightmost breadcrumb bringing you back to Profiles_B…

    …ase (#12376)
    
    ## Summary of the Pull Request
    We no longer do anything when the rightmost breadcrumb is invoked
    
    ## PR Checklist
    * [x] Closes #12325 
    * [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
    Tested manually, cannot repro #12325 anymore
    PankajBhojwani authored and zadjii-msft committed Mar 3, 2022
    Configuration menu
    Copy the full SHA
    4628e56 View commit details
    Browse the repository at this point in the history
  12. Fix toggle switches needing a negative margin (#12381)

    ## Summary of the Pull Request
    Reducing the `MinWidth` of a toggle switch means it no longer needs a negative margin to align it correctly
    
    ## 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
    Setting a different language no longer causes the toggle switch to fall out of the expander
    PankajBhojwani authored and zadjii-msft committed Mar 3, 2022
    Configuration menu
    Copy the full SHA
    3908bd3 View commit details
    Browse the repository at this point in the history
  13. Fix browse buttons getting cut off when the window is too narrow (#12435

    )
    
    With the recent change to allow text boxes to be bigger, the `Browse` button that some of them have was getting cut off when the window was too narrow. This change puts the `Browse` button below the text box instead of next to it to prevent this issue.
    
    ## PR Checklist
    * [x] Closes #12335
    PankajBhojwani authored and zadjii-msft committed Mar 3, 2022
    Configuration menu
    Copy the full SHA
    53cb56c View commit details
    Browse the repository at this point in the history
  14. Properly fall back to Segoe MDL2 for our icons on Win10 (#12438)

    Segoe Fluent isn't available on Windows 10, and doesn't stealthily ship with WinUI. So if we manually set the font family to `"Segoe Fluent Icons"`, then that will just display boxes in Win10.
    
    This instead uses the resource `"{ThemeResource SymbolThemeFontFamily}"` which will gracefully fall back on Win10.
    
    See:
    * microsoft/microsoft-ui-xaml#3745, which inspired this solution.
    
    Guess what! The backgound image icons were also manually specifying this font, so they had to get updated too. I couldn't find any other `Segoe Fluent` references in the code.
    
    * [x] Closes #12350
    * [x] Checked Windows 11 locally
    * [x] Checked Win10 (screenshots incoming from other machine)
    zadjii-msft committed Mar 3, 2022
    Configuration menu
    Copy the full SHA
    fa41019 View commit details
    Browse the repository at this point in the history
  15. Fix focus box around color schemes combo box (#12439)

    The focus box around the color schemes combo box was getting cut off, this change adds a small margin to the stackpanel to allow space for the focus box
    
    ## PR Checklist
    * [x] Closes #12328
    PankajBhojwani authored and zadjii-msft committed Mar 3, 2022
    Configuration menu
    Copy the full SHA
    489d856 View commit details
    Browse the repository at this point in the history
  16. Fix the add/delete unfocused appearance buttons (#12451)

    ## Summary of the Pull Request
    The add/delete unfocused appearance buttons now have text on them and are closed to the `Unfocused appearance` header
    
    ## 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
    <img width="548" alt="add" src="https://user-images.githubusercontent.com/26824113/153463971-de14a68b-5ed9-4768-80f8-2a5a5a21bc9f.png">
    <img width="557" alt="delete" src="https://user-images.githubusercontent.com/26824113/153463993-9a7413d4-d895-4813-a6ff-1b157f1e72f4.png">
    PankajBhojwani authored and zadjii-msft committed Mar 3, 2022
    Configuration menu
    Copy the full SHA
    482fb68 View commit details
    Browse the repository at this point in the history
  17. Enable Segoe Variable (#12462)

    By adding another entry to our `maxversiontested`s.
    
    Screenshots in #12452 (comment)
    
    * [x] Closes #12452 
    * [x] I work here
    * [x] Docs are fine
    * [x] Tests are fine
    zadjii-msft committed Mar 3, 2022
    Configuration menu
    Copy the full SHA
    e3a42b1 View commit details
    Browse the repository at this point in the history
  18. Updates all our icons to use Segoe Fluent (#12469)

    * use `FontFamily="{ThemeResource SymbolThemeFontFamily}"` where possible, in XAML
    * use `FontFamily{ L"Segoe Fluent Icons, Segoe MDL2 Assets" }` in codebehind
    
    Basically just a simple string replace.
    
    * [x] This was a bullet point in #11353
    * [x] Confirmed manually on my win10 PC
    * see also #12438
    
    Actually, this is the last bullet in #11353, so I'm gonna say closes #11353. 
    
    Screenshots below.
    zadjii-msft committed Mar 3, 2022
    Configuration menu
    Copy the full SHA
    9e978b5 View commit details
    Browse the repository at this point in the history
  19. Manually set the colors of the TabViewBackground (#12460)

    This has been a saga.
    
    Basically, any resources in `App.xaml` aren't going to be able to reference other theme-aware resources. We can't change the theme of the app at runtime, only elements within the app. So we can't use `ApplicationPageBackgroundThemeBrush` in app.xaml, because it will ALWAYS be evaluated as the OS theme version of that brush.
    
    * regressed in #12326
    * See also #10864
    * #3917 CANNOT be fixed in the same way. We're lucky here that the TabView uses a `{ThemeResource TabViewBackground}` in markup to set the bg. We're not similarly lucky with the Pane one. 
    * [x] closes #12356
    * [x] Tested manually. You can confirm, my eyes are bleeding from the OS-wide light mode
    zadjii-msft committed Mar 3, 2022
    Configuration menu
    Copy the full SHA
    abdfbd5 View commit details
    Browse the repository at this point in the history
  20. Update light theme tab background for greater contrast. (#12529)

    Changes the tab view BG to `#e8e8e8`, as discussed in mail thread.
    
    Closes #12398
    zadjii-msft committed Mar 3, 2022
    1 Configuration menu
    Copy the full SHA
    cf26d27 View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2022

  1. forgot to commit this

    zadjii-msft committed Mar 4, 2022
    1 Configuration menu
    Copy the full SHA
    9f0cf17 View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2022

  1. No longer load content dialogs when there is already one being shown (#…

    …12517)
    
    Somehow, the controls v2 update caused an issue where if you as much as _load_ a content dialog when there's already one open, we get holes in the terminal window (#12447)
    
    This commit introduces logic to `TerminalPage` to check whether there is a content dialog open before we try to load another one.
    
    * [x] Closes #12447
    * [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
    
    Can no longer repro #12447
    PankajBhojwani authored and zadjii-msft committed Mar 10, 2022
    Configuration menu
    Copy the full SHA
    f94da4f View commit details
    Browse the repository at this point in the history
  2. Fix showing a dialog multiple times (#12625)

    After the dialog is displayed, always clear it out. If we don't, we won't be able to display another!
    
    * regressed in #12517.
    * [x] Fixes #12622.
    zadjii-msft committed Mar 10, 2022
    Configuration menu
    Copy the full SHA
    cfc454a View commit details
    Browse the repository at this point in the history
  3. Update the tab colors some more (#12635)

    Again, to reflect continuing discussion with the WinUI team. A doc may have been misread - these are the colors they're proposing, which are generally a lot better.
    
    See also: #12400, #12356, #12398
    
    ![image](https://user-images.githubusercontent.com/18356694/157041174-c0eb2140-3b49-4494-8746-b3a12f396fe6.png)
    zadjii-msft committed Mar 10, 2022
    Configuration menu
    Copy the full SHA
    e967fd4 View commit details
    Browse the repository at this point in the history
  4. Make the Scrollbar 16dips again (#12608)

    BODGY: Controlsv2 changed the size of the scrollbars from 16dips to
    12dips. This is harder for folks to hit with the mouse, and isn't
    consistent with the rest of the scrollbars on the platform (as much
    as they can be).
    
    To work around this, we have to entirely copy the template for the
    ScrollBar into our XAML file. We're then also re-defining
    ScrollBarSize here to 16, so that the new template will pick up on
    the new value.
    
    This is kinda a pain, and we have to be careful to be sure to ingest
    an updated version of the template any time we update MUX. The
    latest Controlsv2 version of the template can be found at:
    https://github.com/microsoft/microsoft-ui-xaml/blob/main/dev/CommonStyles/ScrollBar_themeresources.xaml#L218
    
    We're also planning on making this adjustable in the future
    (GH#9218), where we might need this anyways.
    
    ##### after, before:
    ![image](https://user-images.githubusercontent.com/18356694/156254464-1a9080f6-51ce-4619-b002-2a3c607cdf5f.png)
    
    ##### after overlayed on top of before
    ![image](https://user-images.githubusercontent.com/18356694/156254546-fccc3cee-12a3-4e1a-8fd7-7470f1ec93ad.png)
    
    ##### comparison
    ![image](https://user-images.githubusercontent.com/18356694/156257934-ec4ac840-c8ca-4fca-a848-08a32b1c55c3.png)
    
    * reported originally in #12395
    * upstream: microsoft/microsoft-ui-xaml#6684
    * closes an element of #12400
    zadjii-msft committed Mar 10, 2022
    1 Configuration menu
    Copy the full SHA
    208dccd View commit details
    Browse the repository at this point in the history
  5. Add some disclaimer text to the schemes page (#12663)

    People get confused about this. This should help. It doesn't really fix it, but it should help.
    
    * [x] Does enough for #9775 to get it out of 1.14
    * [x] I work here
    * [x] Screenshot below.
    
    ![image](https://user-images.githubusercontent.com/18356694/157732913-86f0af51-8c37-4827-9d21-5775d0bfdeb7.png)
    
    * [ ] todo: Discuss the text here. @cinnamon-msft this sound good?
    zadjii-msft committed Mar 10, 2022
    2 Configuration menu
    Copy the full SHA
    addb3a3 View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2022

  1. Round our Maximize button to match ControlsV2 styles (#12660)

    Just look at the screenshot. Above is before, below is now.
    ![image](https://user-images.githubusercontent.com/18356694/157717931-f3e3167e-0234-425a-a8eb-02303f386dc6.png)
    
    These paths were taken straight from WinUI versions of these icons, thanks @pratikone for the alley oop.
    
    * [x] Closes #12433
    * [x] Tested manually by _lookin at it_
    zadjii-msft committed Mar 15, 2022
    1 Configuration menu
    Copy the full SHA
    e995536 View commit details
    Browse the repository at this point in the history