(Popup) Enable Popup v2 Inside Custom NavigationPage#2919
(Popup) Enable Popup v2 Inside Custom NavigationPage#2919TheCodeTraveler merged 9 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR addresses an issue where popups opened inside modal pages fail to display correctly due to navigation bar interference. The fix removes the navigation bar from popup pages and implements proper modal stack traversal to locate and close popups that are wrapped in navigation containers.
Key Changes:
- Explicitly disables the navigation bar for popup pages to prevent UI conflicts
- Adds a
FindPopupPage()method to handle closing popups that are nested within page containers (e.g., NavigationPage) - Removes unused imports to clean up the code
f69560f to
d70a248
Compare
TheCodeTraveler
left a comment
There was a problem hiding this comment.
Thanks Pedro! Could you add some UnitTests before we merge this?
|
@pictos Is there any way to apply this fix while using the current CommunityToolkit.Maui version 12.3.0 until this fix gets released in a newer version? My project heavily relies on showing modal pages wrapped inside navigation pages, which I can't change at this moment due to the amount of refactoring that will be needed. |
TheCodeTraveler
left a comment
There was a problem hiding this comment.
Thanks Pedro!
I added a reproduction to the Sample app along with some Unit Tests 🙌
Description of Change
Removed the NavigationBar and make sure the Close will work. When you open a Popup inside a ModalPage the Popup will not show on ModalStack, what shows up is a
NavigationPageand the PopupPage will be itsContent.Linked Issues
PR Checklist
approved(bug) orChampioned(feature/proposal)mainat time of PRAdditional information