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

Improve the color schemes page in the SUI #14470

Merged
12 commits merged into from
Dec 13, 2022
Merged

Improve the color schemes page in the SUI #14470

12 commits merged into from
Dec 13, 2022

Conversation

PankajBhojwani
Copy link
Contributor

@PankajBhojwani PankajBhojwani commented Dec 1, 2022

Summary of the Pull Request

  • Clicking a color scheme in the list view immediately takes you to the page to edit the scheme
  • Adding a new scheme immediately takes you to the page to edit the new scheme
  • 'delete' and 'set as default' buttons have been moved to the edit scheme page

PR Checklist

  • Closes Users _still_ have a hard time with the color schemes page #14289
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Documentation updated. If checked, please file a pull request on our docs repo and link it here: #xxx
  • Schema updated.
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Validation Steps Performed

The schemes page still works, keyboard navigation also works

@PankajBhojwani
Copy link
Contributor Author

PankajBhojwani commented Dec 1, 2022

Screenshots:
image

image

@PankajBhojwani
Copy link
Contributor Author

PankajBhojwani commented Dec 1, 2022

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">
Copy link
Contributor Author

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

Copy link
Member

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

Copy link
Member

@carlos-zamora carlos-zamora left a 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.

Comment on lines -413 to +419
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);
Copy link
Member

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).

Copy link
Contributor Author

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)

Comment on lines 64 to 67
<TextBlock x:Name="SelectedSchemeDisclaimer"
Margin="0,4,0,0"
VerticalAlignment="Center"
Style="{StaticResource DisclaimerStyle}" />
Copy link
Member

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.

Copy link
Contributor Author

@PankajBhojwani PankajBhojwani Dec 1, 2022

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">
Copy link
Member

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

src/cascadia/TerminalSettingsEditor/ColorSchemes.xaml Outdated Show resolved Hide resolved
</local:SettingContainer>

<Border MaxWidth="{StaticResource StandardControlMaxWidth}">
<Button x:Name="DeleteButton"
Copy link
Member

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.

Copy link
Contributor Author

@PankajBhojwani PankajBhojwani Dec 1, 2022

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

Copy link
Member

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

Copy link
Contributor Author

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

src/cascadia/TerminalSettingsEditor/EditColorScheme.xaml Outdated Show resolved Hide resolved
Click="{x:Bind ViewModel.SetAsDefault_Click}"/>
</local:SettingContainer>

<Border MaxWidth="{StaticResource StandardControlMaxWidth}">
Copy link
Member

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?

Copy link
Contributor Author

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.

@ghost ghost added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Dec 1, 2022
@zadjii-msft
Copy link
Member

Closes #14289?

@ghost ghost added Area-Settings UI Anything specific to the SUI Issue-Task It's a feature request, but it doesn't really need a major design. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. labels Dec 1, 2022
@PankajBhojwani
Copy link
Contributor Author

Closes #14289?

Thanks! Updated the description

Copy link
Member

@zadjii-msft zadjii-msft left a 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"
Copy link
Member

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.

Copy link
Member

@carlos-zamora carlos-zamora left a 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.

src/cascadia/TerminalSettingsEditor/EditColorScheme.xaml Outdated Show resolved Hide resolved
</local:SettingContainer>

<Border MaxWidth="{StaticResource StandardControlMaxWidth}">
<Button x:Name="DeleteButton"
Copy link
Member

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

@ghost ghost added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Dec 9, 2022
@ghost ghost removed the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Dec 13, 2022
Copy link
Member

@carlos-zamora carlos-zamora left a 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!

src/cascadia/TerminalSettingsEditor/EditColorScheme.xaml Outdated Show resolved Hide resolved
@carlos-zamora carlos-zamora added the AutoMerge Marked for automatic merge by the bot when requirements are met label Dec 13, 2022
@ghost
Copy link

ghost commented Dec 13, 2022

Hello @carlos-zamora!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

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 (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit decbc0f into main Dec 13, 2022
@ghost ghost deleted the dev/pabhoj/fix_schemes_page branch December 13, 2022 21:57
@ghost
Copy link

ghost commented Jan 24, 2023

🎉Windows Terminal Preview v1.17.1023 has been released which incorporates this pull request.:tada:

Handy links:

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings UI Anything specific to the SUI AutoMerge Marked for automatic merge by the bot when requirements are met Issue-Task It's a feature request, but it doesn't really need a major design. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. zBugBash-Consider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Users _still_ have a hard time with the color schemes page
4 participants