Conversation
carlos-zamora
left a comment
There was a problem hiding this comment.
Love it! Idk how valid my concern is below, so I'll just approve.
| <ColumnDefinition Width="Auto" /> | ||
| </Grid.ColumnDefinitions> | ||
|
|
||
|
|
There was a problem hiding this comment.
nit: you can undo changes to this file
| // GH#2455 - Make sure to try/catch calls to Application::Current, | ||
| // because that _won't_ be an instance of TerminalApp::App in the | ||
| // LocalTests | ||
| try |
There was a problem hiding this comment.
How does this try-catch work with the magic static? If the try fails, is isElevated permanently stuck as false?
(Also, is this even a valid concern? Does Application::Current fail often?)
There was a problem hiding this comment.
does Application::Current fail often
literally only in the tests, because Application::Current isn't a TerminalApp::App in the tests. With the magic static, we catch the exception as it's getting initialized, return false, and then put false in the static member to store forever
There was a problem hiding this comment.
Right now AppLogic just sets a member on itself already when it is created, but also the implementation of IsUserAdmin doesn't actually rely on any part of AppLogic's state. Would it make sense to then make a free function/static function IsElevated somewhere else that could just be used directly without multiple layers of caching and indirection? As an optimization that IsElevated function could store a static member, should you choose to.
If that free function exists somewhere sufficiently up the stack, it could also be used for ApplicationState :)
There was a problem hiding this comment.
FWIW there's one of my many branches hanging around that does this. I think it's going to get looped in to #11222 when I bump that next (hopefully today, likely monday tho)
|
Don't forget to update the docs/schema! |
|
I think this breaks max and min width in showTabsInTitlebar=false mode. |
| CanReorderTabs="True" | ||
| IsAddTabButtonVisible="false" | ||
| TabWidthMode="Equal"> | ||
| <StackPanel Orientation="Horizontal"> |
There was a problem hiding this comment.
protip: ignore whitespace for this file
lhecker
left a comment
There was a problem hiding this comment.
LGTM. Let me know if you want to leave it as it is and I'll approve it.
| <ColumnDefinition Width="Auto" /> | ||
| </Grid.ColumnDefinitions> | ||
|
|
||
|
|
DHowett
left a comment
There was a problem hiding this comment.
In addition to the comments, the spacing feels a bit cramped to me. cc @cinnamon-msft for design oversight, but in the meantime... I wonder if it should have equal padding on the four sides compared to the tab itself.
I know -- the TabView has its own padding, which means that we need to pad the UAC shield asymmetrically to make up for it
| <value>Don't show again</value> | ||
| </data> | ||
| <data name="ElevationShield.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve"> | ||
| <value>This Terminal window is running as an Administrator</value> |
There was a problem hiding this comment.
Wording here feels off... but I cannot figure out why.,
There was a problem hiding this comment.
- "This Terminal window is running with elevated permissions"?
- "This Terminal window is running in High-IL"
- "This Terminal window is running as Admin"
- "This Terminal window is running elevated"
- "This Terminal window has elevated permissions"
There was a problem hiding this comment.
I'm fond of this one.
| <value>This Terminal window is running as an Administrator</value> | |
| <value>This Terminal window is running as Admin</value> |
| <ColumnDefinition Width="Auto" /> | ||
| </Grid.ColumnDefinitions> | ||
|
|
||
|
|
| <value>Don't show again</value> | ||
| </data> | ||
| <data name="ElevationShield.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve"> | ||
| <value>This Terminal window is running as an Administrator</value> |
There was a problem hiding this comment.
I'm fond of this one.
| <value>This Terminal window is running as an Administrator</value> | |
| <value>This Terminal window is running as Admin</value> |
|
qq, should we make it less "bright"? right now it's the primary text color which is very bright on dark displays; we could tone it down a bit to maybe the |
ez |
|
Hello @zadjii-msft! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
|
Do tend to agree about the spacing! fix it in post? |
|
🎉 Handy links: |




Summary of the Pull Request
Adds a visible indicator that a Terminal window is elevated. This icon can be disabled with
"showAdminShield" falsein the global settings.References
PR Checklist
Validation Steps Performed