-
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
Add support for "User Default" settings II #3892
Conversation
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.
Reviewed the layering code, looks god. Haven’t looked at tests or schema yet, so I’m holding my green Chex mix
doc/user-docs/UsingJsonSettings.md
Outdated
|
||
What if I wanted a profile to have a different value for a property other than | ||
the default? Simply set the property in the profile's entry to override the | ||
value from `defaults`. Let's say you want the `cmd` profile to have `Consolas` |
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.
Inconsistent formatting for font names. Shall we split the difference and always italicize them?
Co-Authored-By: Dustin L. Howett (MSFT) <[email protected]>
…bjectifying-settings # Conflicts: # src/cascadia/LocalTests_TerminalApp/SettingsTests.cpp
…hub.com/Microsoft/Terminal into dev/migrie/f/2325-objectifying-settings
|
||
// Remove the `guid` member from the default settings. That'll | ||
// hyper-explode, so just don't let them do that. | ||
_userDefaultProfileSettings.removeMember({ "guid" }); |
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.
Shouldn't we also remove hidden
?
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 mean, people could totally just hide all their profiles though, right? Then only unhide profiles if they want them visible (i.e hide all WSL profiles, and only re-enable the cmd profile)
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.
yeah i honestly think that's fine
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 (
|
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Adds proper `type` for `ProfilesObject` definition to avoid warnings about matches of multiple schemas. <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References Original issue: #3909 Related PR: #3892 Relates VSCode issue: microsoft/vscode#86738 <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [X] Closes #3909 * [X] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] No new tests ~Tests added/passed~ * [ ] No docs update needed ~Requires documentation to be updated~ * [X] 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: #3909 (marked as help wanted) <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed 1. Download `doc/cascadia/profiles.schema.json` locally 1. Open `profiles.json` from WT in VSCode 1. Replace `$schema` value with path to local copy (verified that all errors are still in place and validations works as before) 1. Update it with `type` on `ProfilesObject` 1. Check that `Matches multiple schemas when only one must validate` warning is fixed
🎉 Handy links: |
configurations thanks to the new "profile defaults" feature (See microsoft/terminal#3892)
configurations thanks to the new "profile defaults" feature (See microsoft/terminal#3892)
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 thelist
property of theprofiles
object.References
#2515, #2603, #3369, #3569
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.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