Skip to content

Conversation

@zadjii-msft
Copy link
Member

Summary of the Pull Request

Two parts:

  • Hide the BG image settings when no image is specified
  • Add a checkbox for "Use desktop wallpaper". When that's checked, the BG image path input is hidden. Unchecking that box restores the path to what it was before.

PR Checklist

Validation Steps Performed

Tested manually

  This doesn't work as I'd hope though. If you manually type in
  `desktopWallpaper`, then the text box is hidden permanently. This is because
  the StringIsNotDesktopConverter imediately can tell that the string is
  desktopWallpaper, and hides the text box, but it _doesn't_ update the
  checkbox.

  We're going to have to get creative.
@ghost ghost added Area-SettingsUI 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 Jan 13, 2021
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.

Mind adding some pics or a gif to see what it looks like? I think I can visualize it but it'd be nice to have in the PR body.

Love the changes to converters!
Mostly nits here.

return result;
}

#define DECLARE_CONVERTER(nameSpace, className) \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might as well use DECLARE_CONVERTER on all the other converter header files. For consistency.

// Cache the original BG image path. If the user clicks "Use desktop
// wallpaper", then un-checks it, this is the string we'll restore to
// them.
if (BackgroundImagePath() != L"desktopWallpaper")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: should L"desktopWallpaper" be a static constexpr std::wstring_view?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That way you just reference it below in UseDesktopBGImage() too

@zadjii-msft
Copy link
Member Author

sui-desktopWallpaper

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.

Realized something. Make sure to disable the "hide background image settings" behavior in the "Base Layer" page. There's a good use case for customizing those settings in "Base Layer" even though you don't have a background image set.

Shouldn't be too difficult. There's an IsBaseLayer bool exposed off of the ProfileViewModel that you can use to check this.

@ghost ghost added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jan 13, 2021
@PankajBhojwani
Copy link
Contributor

I think I would prefer if the checkbox was immediately below the textbox for the path, and that the textbox and button are disabled when the checkbox is set (rather than hidden), this gets us

  • consistency with Add missing functionality to SUI #8786
  • no need to have two 'background image' headers like there currently is, we could just have one
  • imo its more intuitive - currently, if the user has 'desktop wallpaper' set and wants to change it, its not immediately obvious that they need to uncheck desktop wallpaper before the textbox will show. But if the textbox is greyed out when the checkbox right underneath it is checked, it becomes more obvious

Thoughts?

@zadjii-msft
Copy link
Member Author

image

@ghost ghost removed the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jan 14, 2021
@zadjii-msft
Copy link
Member Author

Realized something. Make sure to disable the "hide background image settings" behavior in the "Base Layer" page. There's a good use case for customizing those settings in "Base Layer" even though you don't have a background image set.

Shouldn't be too difficult. There's an IsBaseLayer bool exposed off of the ProfileViewModel that you can use to check this.

image

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.

Thanks!

@carlos-zamora carlos-zamora added the Needs-Second It's a PR that needs another sign-off label Jan 15, 2021
@ghost ghost requested review from DHowett, PankajBhojwani, leonMSFT and miniksa January 15, 2021 17:45
@DHowett DHowett added the AutoMerge Marked for automatic merge by the bot when requirements are met label Jan 18, 2021
@ghost
Copy link

ghost commented Jan 18, 2021

Hello @DHowett!

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 2b4b8dd into main Jan 18, 2021
@ghost ghost deleted the dev/migrie/b/8763-bg-image-polish branch January 18, 2021 22:34
@zadjii-msft zadjii-msft restored the dev/migrie/b/8763-bg-image-polish branch January 19, 2021 11:13
@zadjii-msft zadjii-msft deleted the dev/migrie/b/8763-bg-image-polish branch January 19, 2021 11:15
mpela81 pushed a commit to mpela81/terminal that referenced this pull request Jan 28, 2021
## Summary of the Pull Request

Two parts:
* Hide the BG image settings when no image is specified
* Add a checkbox for "Use desktop wallpaper". When that's checked, the BG image path input is hidden. Unchecking that box restores the path to what it was before.

## PR Checklist
* [x] Closes microsoft#8763
* [x] I work here

## Validation Steps Performed
Tested manually
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-SettingsUI 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. Needs-Second It's a PR that needs another sign-off Priority-3 A description (P3) Product-Terminal The new Windows Terminal.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Polish Settings UI: Profile > Background Image

5 participants