-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Improve the color schemes page in the SUI #14470
Conversation
A lot of the 'currently selected scheme' stuff has still been left in because we want to continue to allow keyboard navigation (i.e. we need to know the scheme the user has currently selected with the keyboard without navigating to it, even though the 'currently selected scheme' is quite pointless now if the user is only navigating via mouse). |
@@ -36,176 +36,21 @@ | |||
</ResourceDictionary> | |||
</Page.Resources> | |||
|
|||
<ScrollViewer ViewChanging="ViewChanging"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Putting a ListView inside a ScrollViewer messes things up, so the outer ScrollViewer has been removed in favour of a Grid. Ultimately the only region we want scrolling for anyway is the list of color schemes so this works out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to reviewers: hide whitespace to make it easier to review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mainly blocking over the delete button (and disclaimer) placement.
src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw
Outdated
Show resolved
Hide resolved
contentFrame().Navigate(xaml_typename<Editor::ColorSchemes>(), _colorSchemesPageVM); | ||
const auto crumb = winrt::make<Breadcrumb>(box_value(clickedItemTag), RS_(L"Nav_ColorSchemes/Content"), BreadcrumbSubPage::None); | ||
_breadcrumbs.Append(crumb); | ||
contentFrame().Navigate(xaml_typename<Editor::ColorSchemes>(), _colorSchemesPageVM); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? All the other ones seem to be in the reverse order (navigate, then add crumb).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out there was a race happening that this fixes (the other order results in having the breadcrumb bar be Color Schemes -> Color Schemes when you navigate back to the base page)
<TextBlock x:Name="SelectedSchemeDisclaimer" | ||
Margin="0,4,0,0" | ||
VerticalAlignment="Center" | ||
Style="{StaticResource DisclaimerStyle}" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit torn. I feel like this disclaimer belongs next to the "delete" button. But I kinda see the value in a disclaimer denoting that the selected scheme is shipped in-box.
Maybe the correct thing to do is to move this disclaimer to be next to the delete button, and (eventually) let them be deleted? My reasoning is that a user shouldn't really care if a scheme is shipped in-box, right? We really just have this right now because we're not ready to handle that yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made it so the delete button is not even visible for in box schemes! Since now the delete button is in the individual color scheme pages, we can just do that. Also the reason this disclaimer is still here is because of keyboard navigation - we support navigating through the list with arrow keys and hitting the 'delete' button to delete a scheme, so this disclaimer will explain why the 'delete' key doesn't do anything for certain schemes.
@@ -36,176 +36,21 @@ | |||
</ResourceDictionary> | |||
</Page.Resources> | |||
|
|||
<ScrollViewer ViewChanging="ViewChanging"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to reviewers: hide whitespace to make it easier to review
</local:SettingContainer> | ||
|
||
<Border MaxWidth="{StaticResource StandardControlMaxWidth}"> | ||
<Button x:Name="DeleteButton" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Design opinion: instead of using visibility, we should enable/disable the button and display the disclaimer next to it when it's disabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The RenameContainer
already contains the disclaimer that this is an in box scheme and cannot be renamed/deleted, so I opted to just not show the delete button at all for a cleaner look. Happy to be overridden if the consensus is to show the delete button even if it's disabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Polling for opinions: @zadjii-msft @DHowett @lhecker
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, screenshots have been updated
Click="{x:Bind ViewModel.SetAsDefault_Click}"/> | ||
</local:SettingContainer> | ||
|
||
<Border MaxWidth="{StaticResource StandardControlMaxWidth}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do we need the border for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So that the button gets positioned properly when the width of the window is large. Without the border, the button will be completely left aligned and the list view will be in the center.
Closes #14289? |
Thanks! Updated the description |
…/pabhoj/fix_schemes_page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have anything to add beyond what carlos already called out.
<ScrollViewer ViewChanging="ViewChanging"> | ||
<StackPanel Style="{StaticResource SettingsStackStyle}"> | ||
<TextBlock x:Uid="ColorSchemesDisclaimer" | ||
<Grid RowSpacing="8" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note to reviewers: hit that .. The GH diff is egregious compared to the vscode one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really just blocking over the dumb a11y thing. If my proposal doesn't work, I can try and fix it in a follow-up, just let me know.
Figured I'd ping people for the design-related thread since we're waiting on the a11y fix anyways.
</local:SettingContainer> | ||
|
||
<Border MaxWidth="{StaticResource StandardControlMaxWidth}"> | ||
<Button x:Name="DeleteButton" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Polling for opinions: @zadjii-msft @DHowett @lhecker
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it! Thanks! Excited to play with this in the bug bash!
Hello @carlos-zamora! 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 (
|
🎉 Handy links: |
Summary of the Pull Request
PR Checklist
Validation Steps Performed
The schemes page still works, keyboard navigation also works