-
Notifications
You must be signed in to change notification settings - Fork 199
Fixed home page carousel visually leaking to other pages after navigation #460
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
base: main
Are you sure you want to change the base?
Changes from all commits
972bd09
8cde6c8
70b5416
b0af3ab
e714653
daccb44
4ec54e8
1cbd240
3f4ab46
bd4ab3d
158769d
818bfb0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -26,6 +26,14 @@ protected override void OnNavigatedTo(NavigationEventArgs e) | |||||||||||||||||||||||||
| NavigatedToPageEvent.Log(nameof(HomePage)); | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| protected override void OnNavigatingFrom(NavigatingCancelEventArgs e) | ||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||
| // Remove all content to guarantee nothing can be rendered; reference issue: https://github.com/microsoft/ai-dev-gallery/pull/460 | ||||||||||||||||||||||||||
| this.Content = null; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| base.OnNavigatingFrom(e); | ||||||||||||||||||||||||||
|
Comment on lines
+29
to
+34
|
||||||||||||||||||||||||||
| protected override void OnNavigatingFrom(NavigatingCancelEventArgs e) | |
| { | |
| // Remove all content to guarantee nothing can be rendered; reference issue: https://github.com/microsoft/ai-dev-gallery/pull/460 | |
| this.Content = null; | |
| base.OnNavigatingFrom(e); | |
| protected override void OnNavigatedFrom(NavigationEventArgs e) | |
| { | |
| base.OnNavigatedFrom(e); | |
| // Remove all content to guarantee nothing can be rendered; reference issue: https://github.com/microsoft/ai-dev-gallery/pull/460 | |
| this.Content = null; |
Copilot
AI
Dec 31, 2025
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.
The pattern of using OnNavigatingFrom for page cleanup is inconsistent with how other pages in the codebase handle cleanup. Sample pages like SemanticSearch.xaml.cs (line 87), AppIndexCapability.xaml.cs (line 74), and KnowledgeRetrieval.xaml.cs (line 141) use OnNavigatedFrom for cleanup operations. SettingsPage uses OnNavigatingFrom specifically to cancel navigation when a cache move is in progress (SettingsPage.xaml.cs:53-60).
For HomePage, which doesn't need to cancel navigation, using OnNavigatedFrom would be more consistent with the established pattern and would ensure the navigation completes before cleanup begins.
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.
The comment references PR #460, but according to the PR metadata, this is PR #460. The reference should likely point to the dependency PR #458 mentioned in the description, or the issue being fixed. This creates confusion about what issue is being referenced.