Add Support for Shell + IQueryAttributable for PopupV2#2661
Conversation
|
@TheCodeTraveler I love this! I hope you don't mind I pushed some XML docs improvements and will follow up with more on the other public areas if that's ok? Also I added this as documentation for the /// <param name="token">A <see cref="CancellationToken"/> providing support for canceling the wait for a result to be returned. This will <b>not</b> close the popup.</param>Is this correct (I haven't tested it)? Does the cancel only bail out of awaiting the ShowAsync call and does not close the popup? The only question I will ask (and I am happy to be shot down) is whether we could/should include something similar for non-Shell based navigation? Basically including something like the following into the if (view is IQueryAttributable queryAttributable)
{
queryAttributable.ApplyQueryAttributes(shellParameters);
}
else if (view.BindingContext is IQueryAttributable queryAttributableBindingContext)
{
queryAttributableBindingContext.ApplyQueryAttributes(shellParameters);
}I understand that |
…ttps://github.com/CommunityToolkit/Maui into Add-Shell-Routing-to-Support-`IQueryAttributable`
|
Ok, @bijington - I've added Unit Tests, squishing some bugs along the way, and this is now ready for review!!
We totally could and it'd be fairly easy too implement based on how I've designed PopupPage. In short, the However, I see a few faults with adding support for
All that said, let's not add |
bijington
left a comment
There was a problem hiding this comment.
Great work @TheCodeTraveler! I just have one question which more to help me understand the change rather than question whether we need it.
26a56bb
into
feature/sl/remove-popup-constraint-from-popup-service
Description of Change
This PR augments #1581, adding support for
ShellandIQueryAttributable. I.e., this PR will be merged into the open PopupV2 PR, not themainbranch.Specifically, this PR was created in response to @bijington's review noting that users will no longer be able to pass data from ViewModel to ViewModel after removing the
onPresentingparameter: #1581 (comment)Additional information
This PR is currently in Draft because it still requires Unit Tests.
I updated
SimplePopupandCsharpBindingPopupto demonstrate usingIQueryAttributablein the Sample App.