-
Notifications
You must be signed in to change notification settings - Fork 441
Make it possible to pass parameters over to INavigation based popups #2740
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
base: main
Are you sure you want to change the base?
Conversation
Thanks Shaun! I advocate against implementing this because there are already ways for developers to pass in values to their popup via Dependency Injection, DataBinding, Messaging Services, etc. Yes, I know this feature existed in Popup v1, but to be honest it is a bit of anti-pattern implementing a messaging service into Popup and we should have never supported it. I am not aware of any developer who is blocked without this feature. If a developer can provide a sample app demonstrating how they are blocked without this feature, I'm happy to readdress this feature. |
This scenario only introduces the ability to pass data in at the point of creation/navigating so I don't think DataBinding or Messaging Services are suitable alternatives. As for developers being blocked there are some over here: #2696 (comment) |
@bijington could you please explain how they will use the parameters? PopupPage is internal and I don't know how it replaces onPresenting. I agree with @TheCodeTraveler. At least they can subscribe to Opened event and set parameters they need. |
Happy to... this doesn't introduce any new concepts it just makes the use of Popups in non-Shell based apps symmetrical with Shell based apps. The parameters would work as per our documentation https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/views/popup-service#passing-data-to-a-popup-view-model only for the methods that accept My intention was never to replace |
Yes, but you cast popupPage to IQueryAttributable. Maybe you should do it with ViewModel or View? |
Oh I see your point. |
Description of Change
Linked Issues
PR Checklist
approved
(bug) orChampioned
(feature/proposal)main
at time of PRAdditional information