-
Notifications
You must be signed in to change notification settings - Fork 431
Add Support for Shell + IQueryAttributable
for PopupV2
#2661
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
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 |
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.
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
Shell
andIQueryAttributable
. I.e., this PR will be merged into the open PopupV2 PR, not themain
branch.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
onPresenting
parameter: #1581 (comment)Additional information
This PR is currently in Draft because it still requires Unit Tests.
I updated
SimplePopup
andCsharpBindingPopup
to demonstrate usingIQueryAttributable
in the Sample App.