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

NavView IsPaneVisible Fix #6227

Merged
merged 2 commits into from
Nov 5, 2021
Merged

Conversation

karkarl
Copy link
Contributor

@karkarl karkarl commented Nov 3, 2021

Description

NavView was crashing whenever IsPaneVisible property is set to false. This is due to SplitView.CompactPaneLength() returning 0 when not visible, resulting in a negative value for TemplateSettings.SmallerIconWidth.

  • A check is now added to ensure the minimum value is 0.

Motivation and Context

Fixes #5971

How Has This Been Tested?

Tests previously covering this scenario is now re-enabled to prevent regression.

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Nov 3, 2021
@karkarl
Copy link
Contributor Author

karkarl commented Nov 3, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@marcelwgn
Copy link
Collaborator

@karenbtlai Did the tests repro the issue for you? I ran them without the fix and the app did not crash nor did the tests fail 🤔

@ranjeshj ranjeshj added area-NavigationView NavView control team-Controls Issue for the Controls team and removed needs-triage Issue needs to be triaged by the area owners labels Nov 3, 2021
@karkarl
Copy link
Contributor Author

karkarl commented Nov 3, 2021

@karenbtlai Did the tests repro the issue for you? I ran them without the fix and the app did not crash nor did the tests fail 🤔

Huh, weirdly enough, the app does not crash when I'm manually testing it with the deployed appx in the BuildOutput (which is what the interaction tests consume), but repros / crashes without the fix when running using VS? @StephenLPeters any idea what's happening here?

@ranjeshj
Copy link
Contributor

ranjeshj commented Nov 4, 2021

@karenbtlai Did the tests repro the issue for you? I ran them without the fix and the app did not crash nor did the tests fail 🤔

Huh, weirdly enough, the app does not crash when I'm manually testing it with the deployed appx in the BuildOutput (which is what the interaction tests consume), but repros / crashes without the fix when running using VS? @StephenLPeters any idea what's happening here?

Is it an exception that is thrown but caught ? If you see it only in the debugger then that's likely the issue.

@karkarl karkarl merged commit 3f6310d into main Nov 5, 2021
@karkarl karkarl deleted the user/karenlai/NavViewIsPaneVisibleFix branch November 5, 2021 17:01
@nickrandolph
Copy link

Hi all, which release will this fix appear in?

@ranjeshj ranjeshj added this to the Winui 2.7.1 milestone Nov 8, 2021
@nickrandolph
Copy link

@ranjeshj thanks for setting the milestone but is there any chance of getting a prerelease with this update to unblock us. Unfortunately setting DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION with was the suggested workaround doesn't work

MartinZikmund added a commit to MartinZikmund/Uno that referenced this pull request Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-NavigationView NavView control team-Controls Issue for the Controls team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NavigationView : Switching pane visibility cause Unhandled Exception
4 participants