-
Notifications
You must be signed in to change notification settings - Fork 470
Implement extension method for NavigatedFromEventArgs #2935
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
Conversation
From parent page when calling a popup, when the onnavigatedfrom event, check args if the destination is a popup page. Unit tests implemented Sample code applied
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.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
bijington
left a comment
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.
@JamesBrooksbankIceland This generally looks good, thank you for it! Only one comment in the code. I have a question outside of the changes though. Could/should we also introduce an extension to know whether we are navigating from a popup? I think it could be of benefit but keen to hear from others
src/CommunityToolkit.Maui.UnitTests/Extensions/NavigatedFromEventArgsExtensionsTests.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui/Extensions/NavigatedFromEventArgsExtensions.shared.cs
Outdated
Show resolved
Hide resolved
…ensions.shared.cs
…ds-destinationpage
…ds-destinationpage
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.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
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.
Thanks @JamesBrooksbankIceland!
Could you please agree to the dotnet service policy allowing us to merge this PR?
This policy only requires approval from you; it is just optional to also request from the company you work for. The work you contribute to this open-source project are your own and independent from the work you contribute to your company.
src/CommunityToolkit.Maui/Extensions/NavigatedFromEventArgsExtensions.shared.cs
Show resolved
Hide resolved
…ds-destinationpage
|
Unfortunately i have been told by our legal department that i cannot proceed to give permission. They have enabled to submit via my own personal account. Rather silly from my perspective but i could do with some guidance.... i have redone the work locally on my own pc in my own time, and ready to create that PR. Could you advise how to close this pr and if it will be a problem. I'm very sorry for making my first submission a mess up. |
From parent page when calling a popup, when the onnavigatedfrom event, check args if the destination is a popup page.
Unit tests implemented
Sample code applied
Description of Change
Added an extension method to OnNavigatedFrom event which checks if the destination page is a popup and if so returns true.
Linked Issues
PR Checklist
approved(bug) orChampioned(feature/proposal)mainat time of PRUpdate to document for extension IsDestinationPageACommunityToolkitPo… MicrosoftDocs/CommunityToolkit#605
Additional information
Tested on Android.