Bugfix: sync color scheme rename with profile reference#8793
Merged
7 commits merged intomainfrom Jan 22, 2021
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
40fa7ab to
aacc4e4
Compare
DHowett
reviewed
Jan 22, 2021
DHowett
reviewed
Jan 22, 2021
DHowett
reviewed
Jan 22, 2021
DHowett
reviewed
Jan 22, 2021
DHowett
approved these changes
Jan 22, 2021
Member
DHowett
left a comment
There was a problem hiding this comment.
love it. thank you. EXCELLENT addition w/ the new teaching tip.
zadjii-msft
approved these changes
Jan 22, 2021
Member
zadjii-msft
left a comment
There was a problem hiding this comment.
This is very clever, I like it
Member
|
Before you merge this, please update the PR body. It describes the old implementation. |
|
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 (
|
mpela81
pushed a commit
to mpela81/terminal
that referenced
this pull request
Jan 28, 2021
## Summary of the Pull Request This fixes a bug where renaming/deleting a color scheme would not update profiles that referenced it. This also adds detection for renaming a color scheme to a name that is already in use, and adds appropriate UI for that. ## References microsoft#6800 - Settings UI Epic ## PR Checklist * [X] Closes microsoft#8756 ## Detailed Description of the Pull Request / Additional comments `Model::CascadiaSettings` was updated to have a `UpdateColorSchemeReferences()` function that updates all profiles referencing the newly renamed color scheme. `Editor::ColorSchemesPageNavigationState` now takes and exposes a `Model::CascadiaSettings`. When a color scheme is renamed or deleted, we use `CascadiaSettings` to update our list of color schemes appropriately, then call `UpdateColorSchemeReferences()` to update the profiles. The tricky part is that `Profile` does not store a direct reference to `ColorScheme`, but rather the name of the color scheme. See [this tread](microsoft#8756 (comment)) for a discussion on this topic. ## Validation Steps Performed Repro steps from microsoft#8756 when renaming/deleting a referenced color scheme. ## Demo 
This pull request was closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
This fixes a bug where renaming/deleting a color scheme would not update profiles that referenced it.
This also adds detection for renaming a color scheme to a name that is already in use, and adds appropriate UI for that.
References
#6800 - Settings UI Epic
PR Checklist
Detailed Description of the Pull Request / Additional comments
Model::CascadiaSettingswas updated to have aUpdateColorSchemeReferences()function that updates all profiles referencing the newly renamed color scheme.Editor::ColorSchemesPageNavigationStatenow takes and exposes aModel::CascadiaSettings.When a color scheme is renamed or deleted, we use
CascadiaSettingsto update our list of color schemes appropriately, then callUpdateColorSchemeReferences()to update the profiles.The tricky part is that
Profiledoes not store a direct reference toColorScheme, but rather the name of the color scheme. See this tread for a discussion on this topic.Validation Steps Performed
Repro steps from #8756 when renaming/deleting a referenced color scheme.
Demo