Maui
Maui copied to clipboard
Implement the ability to Close a popup
Description of Change
This PR is initially intended to show what can be done and hopefully serve as a discussion on the specific implementation details. It is worth noting that the Close approach currently relies on keeping track of the currently displayed popups via a Stack although during my testing (macOS only) I was unable to show a second popup while another popup was already displayed.
I did consider encapsulating the stack based tracking inside an interface/implementation to allow for the lookup and tracking of displayed popups to be customised, however this currently feels like an optimisation too far.
Linked Issues
- Fixes #1530
PR Checklist
- [ ] Has a linked Issue, and the Issue has been
approved
(bug) orChampioned
(feature/proposal) - [ ] Has tests (if omitted, state reason in description)
- [x] Has samples (if omitted, state reason in description)
- [x] Rebased on top of
main
at time of PR - [x] Changes adhere to coding standard
- [ ] Documentation created or updated: https://github.com/MicrosoftDocs/CommunityToolkit/pulls
Additional information
It looks promising, I would say that the implementation should be in another class, since this management of opened/closed popups can become more complex
Thanks @pictos i did originally have it in a separate class so I can reinstate that pretty easily 👍
@bijington FYI - we have a merge conflict on this after merging a few Popup PRs today
Any updates on this one.?
@bijington could this pr be useful to correct this behavior?
https://github.com/CommunityToolkit/Maui/issues/1973
@bijington could this pr be useful to correct this behavior?
https://github.com/CommunityToolkit/Maui/issues/1973
I'm not sure. I see that cat is stating that this appears to be an issue on how MAUI and the toolkit use the same mechanism to show an overlay. I'll play around to see if there is anything I can think of solving