Maui icon indicating copy to clipboard operation
Maui copied to clipboard

Implement the ability to Close a popup

Open bijington opened this issue 1 year ago • 2 comments

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) or Championed (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

bijington avatar Feb 11 '24 20:02 bijington

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 avatar Feb 13 '24 07:02 bijington

@bijington FYI - we have a merge conflict on this after merging a few Popup PRs today

brminnick avatar Mar 26 '24 00:03 brminnick

Any updates on this one.?

ganeshmeghale avatar Aug 07 '24 07:08 ganeshmeghale

@bijington could this pr be useful to correct this behavior?

https://github.com/CommunityToolkit/Maui/issues/1973

acaliaro avatar Aug 07 '24 14:08 acaliaro

@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

bijington avatar Aug 07 '24 14:08 bijington