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

Maintain current Pivot selection when saving on the Profiles page #8803

Merged
34 commits merged into from
Jan 19, 2021

Conversation

zadjii-msft
Copy link
Member

@zadjii-msft zadjii-msft commented Jan 15, 2021

This PR Makes sure that after you save the settings, we stay on the same part of the profiles pivot. We do this by having a singleton ProfilesNavigationState, a bit like the color scheme one in #8799. Hence why this PR is targeting the other.

PR Checklist

  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.
…-color-scheme-page

# Conflicts:
#	src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw
@zadjii-msft zadjii-msft added Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Area-Settings UI Anything specific to the SUI labels Jan 15, 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.

So excited for this to go in! Thanks!

src/cascadia/TerminalSettingsEditor/MainPage.cpp Outdated Show resolved Hide resolved
src/cascadia/TerminalSettingsEditor/MainPage.cpp Outdated Show resolved Hide resolved
@zadjii-msft zadjii-msft changed the base branch from dev/migrie/b/8765-sui-color-scheme-page to main January 19, 2021 18:54
@DHowett DHowett added the AutoMerge Marked for automatic merge by the bot when requirements are met label Jan 19, 2021
@ghost
Copy link

ghost commented Jan 19, 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 a7d7362 into main Jan 19, 2021
@ghost ghost deleted the dev/migrie/b/8769a-profiles-pivot branch January 19, 2021 21:55
carlos-zamora added a commit that referenced this pull request Jan 21, 2021
ghost pushed a commit that referenced this pull request Jan 21, 2021
This reverts commit a7d7362 introduced by #8803.

Reverting this commit fixes #8836 at the expense of the profile page
remembering the last Pivot selection. The 

## References
#6800 - Settings UI Epic

#8803 maintained a `ProfilePageNavigationState` in `MainPage` to remember
the pivot position. However, the two-way binding on the TextBoxes
now seem to happen too late (after the navigation occurs),
resulting in the text being applied to the wrong profile.  In other
words, the sequence of events probably looks something like this:

1. user types text (_state.profile = old profile)
2. user moves to new profile
3. navigation completes (_state.profile = new profile)
4. textbox two-way binding fires, setting _state.profile.WHATEVER = value

## Validation Steps Performed
Performed repro sets from #8836. Bug no longer occurs. 

Reopens #8769
Closes #8836
zadjii-msft added a commit that referenced this pull request Jan 21, 2021
mpela81 pushed a commit to mpela81/terminal that referenced this pull request Jan 28, 2021
…crosoft#8803)

This PR Makes sure that after you save the settings, we stay on the same part of the profiles pivot. We do this by having a singleton `ProfilesNavigationState`, a bit like the color scheme one in microsoft#8799. Hence why this PR is targeting the other.

## PR Checklist
* [x] I work here
* [x] Tested manually
* [x] Fixes the first point in microsoft#8769
mpela81 pushed a commit to mpela81/terminal that referenced this pull request Jan 28, 2021
…oft#8838)

This reverts commit a7d7362 introduced by microsoft#8803.

Reverting this commit fixes microsoft#8836 at the expense of the profile page
remembering the last Pivot selection. The 

## References
microsoft#6800 - Settings UI Epic

microsoft#8803 maintained a `ProfilePageNavigationState` in `MainPage` to remember
the pivot position. However, the two-way binding on the TextBoxes
now seem to happen too late (after the navigation occurs),
resulting in the text being applied to the wrong profile.  In other
words, the sequence of events probably looks something like this:

1. user types text (_state.profile = old profile)
2. user moves to new profile
3. navigation completes (_state.profile = new profile)
4. textbox two-way binding fires, setting _state.profile.WHATEVER = value

## Validation Steps Performed
Performed repro sets from microsoft#8836. Bug no longer occurs. 

Reopens microsoft#8769
Closes microsoft#8836
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-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants