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

Add support for "User Default" settings #3369

Closed
wants to merge 4 commits into from

Conversation

zadjii-msft
Copy link
Member

@zadjii-msft zadjii-msft commented Oct 29, 2019

Summary of the Pull Request

These are settings that apply to every profile, before user customizations. This can be placed in the globals under the "defaultSettings" key. It's a blob of profile settings that will be parsed just like a profile, and applied to profiles after default&dynamic profiles, but before user profiles.

"defaultSettings" is kinda a placeholder key ATM - @cinnamon-msft do we have concerns with this name? Does it make enough sense?

References

#2515, #2603

PR Checklist

Detailed Description of the Pull Request / Additional comments

Discussion in #2325 itself serves as the "spec" for this task. I thought we'd need more discussion on the topic, but it ended up being pretty straightforward.

Validation Steps Performed

ran the tests

  These are settings that apply to _every_ profile, before user customizations.
  This can be placed in the globals under the "defaultSettings" key.
  It's a blob of profile settings that will be parsed just like a profile, and
  applied to profiles after default&dynamic profiles, but before user profiles.
@zadjii-msft zadjii-msft added Area-Settings Issues related to settings and customizability, for console or terminal Product-Terminal The new Windows Terminal. Issue-Task It's a feature request, but it doesn't really need a major design. labels Oct 29, 2019
@zadjii-msft zadjii-msft requested a review from a team October 29, 2019 17:17
Copy link
Contributor

@DHowett-MSFT DHowett-MSFT left a comment

Choose a reason for hiding this comment

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

Love to figure out what the name of this setting should be, but I adore this change.

@zadjii-msft zadjii-msft added the Needs-Second It's a PR that needs another sign-off label Oct 31, 2019
@ghost ghost requested review from miniksa and carlos-zamora October 31, 2019 14:03
Copy link
Member

@miniksa miniksa left a comment

Choose a reason for hiding this comment

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

Looks alright to me, but settings are just getting more and more confusing, IMO.

@@ -8,6 +8,7 @@ Properties listed below affect the entire window, regardless of the profile sett
| `alwaysShowTabs` | _Required_ | Boolean | `true` | When set to `true`, tabs are always displayed. When set to `false` and `showTabsInTitlebar` is set to `false`, tabs only appear after typing <kbd>Ctrl</kbd> + <kbd>T</kbd>. |
| `copyOnSelect` | Optional | Boolean | `false` | When set to `true`, a selection is immediately copied to your clipboard upon creation. When set to `false`, the selection persists and awaits further action. |
| `defaultProfile` | _Required_ | String | PowerShell guid | Sets the default profile. Opens by typing <kbd>Ctrl</kbd> + <kbd>T</kbd> or by clicking the '+' icon. The guid of the desired default profile is used as the value. |
| `defaultSettings` | Optional | Object (Profile) | | Default settings to use with each profile. Settings in each profile in profiles will override these values. |
Copy link
Member

Choose a reason for hiding this comment

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

This description is clear as mud.

I think you mean "This set of settings is at the bottom of the layer cake, if defined, and those in the individual profiles will cover these up, if specified."

We're starting to need some sort of diagram to explain settings here. Perhaps a cake-based one.

Copy link
Member

Choose a reason for hiding this comment

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

tagging @cinnamon-msft

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.

This is beautifully straightforward and I love it.

Copy link
Contributor

@DHowett-MSFT DHowett-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'm blocking because we have three green checks but they're all conditional 👍

@ghost ghost added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Oct 31, 2019
@zadjii-msft
Copy link
Member Author

There's been quite the discussion on the team regarding this issue. There doesn't seem to be any sort of consensus on naming or how exactly this should work, so I'm closing this in favor of having a proper full spec review.

Functionally, the code change is simple, as seen here. Naming, however, is a Hard problem.

ghost pushed a commit that referenced this pull request Dec 11, 2019
## Summary of the Pull Request

_This is attempt 2 at this feature_. The original PR can be found at #3369. 

These are settings that apply to _every_ profile, before user customizations. 

If the user wants to add "default profile settings", they can make the `"profiles"` property an _object_, instead of a list, and add `"defaults"` key underneath that object. The users list of profiles should then be under the `list` property of the `profiles` object.

## References
#2515, #2603, #3369, #3569

## PR Checklist
* [x] Closes #2325
* [x] I work here
* [x] Tests added/passed
* [x] schema, docs updated

## Detailed Description of the Pull Request / Additional comments
~~Discussion in #2325 itself serves as the "spec" for this task. I thought we'd need more discussion on the topic, but it ended up being pretty straightforward.~~

I should not have said that in the original PR. We've had a better spec review now that I think we're happier with.

## Validation Steps Performed
_ran the tests_
zadjii-msft added a commit that referenced this pull request Dec 11, 2019
Refer to the original issue: **Default Profile for Common Profile Settings** #2325

So this is my summary of everything we discussed regarding "default profile settings". The original PR was #3369, but we were _not_ in agreement on the UX, so this PR is for discussion about that. 

I put forth 4 proposals that were mentioned in the discussion.

In the discussion that followed, we decided the 3rd proposal was the best. The doc reflects that choice.
@zadjii-msft zadjii-msft deleted the dev/migrie/b/2325-default-profile branch January 31, 2020 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issues related to settings and customizability, for console or terminal 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 Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default Profile for Common Profile Settings
4 participants