Skip to content
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 injecting arguments & intent extras in presenters #309

Open
BenHenning opened this issue Nov 6, 2019 · 1 comment
Open
Labels
enhancement End user-perceivable enhancements. Impact: Low Low perceived user impact (e.g. edge cases). Issue: Needs Break-down Indicates that an issue is too large and should be broken into smaller chunks. Issue: Needs Clarification Indicates that an issue needs more detail in order to be able to be acted upon. Priority: Nice-to-have This work item is nice to have for its milestone. Work: Medium The means to find the solution is clear, but it isn't at good-first-issue level yet. Z-ibt Temporary label for Ben to keep track of issues he's triaged.

Comments

@BenHenning
Copy link
Member

We have a bunch of places where we retrieve fragment arguments and activity intent extras in presenters, but it should be possible to inject these or at least introduce argument/intent management infrastructure to facilitate injection or retrieval to simplify managing these dependencies (& centralize requiring them to avoid needing to make this decision for each fragment and activity).

@BenHenning BenHenning added Priority: Nice-to-have This work item is nice to have for its milestone. Status: Not started labels Nov 6, 2019
@BenHenning BenHenning added this to the Backlog milestone Jun 23, 2020
@Broppia Broppia added issue_type_feature Impact: Low Low perceived user impact (e.g. edge cases). labels Jul 29, 2022
@BenHenning BenHenning added issue_type_infrastructure Issue: Needs Clarification Indicates that an issue needs more detail in order to be able to be acted upon. Issue: Needs Break-down Indicates that an issue is too large and should be broken into smaller chunks. Z-ibt Temporary label for Ben to keep track of issues he's triaged. and removed issue_type_enhancement labels Sep 16, 2022
@BenHenning BenHenning removed this from the Backlog milestone Sep 16, 2022
@seanlip seanlip added enhancement End user-perceivable enhancements. and removed issue_type_infrastructure labels Mar 28, 2023
@MohitGupta121 MohitGupta121 added the Work: Medium The means to find the solution is clear, but it isn't at good-first-issue level yet. label Jun 16, 2023
@BenHenning
Copy link
Member Author

NB: This probably is only possible using custom code generation (e.g. with a custom KSP annotation processor). I started prototyping something along these lines (for activity generation) a couple months back--it should be straightforward to figure out the constituent pieces if we can determine what code needs to be generated.

That being said, #1051 touches on this from a data-oriented perspective. Combined with thoughts around generate code generation for base activity/fragment/view classes, perhaps the best approach here is actually to just use a single proto for activity/fragment/view construction and be able to inject this, then have separate properties annotated for configuration and app death retention. This would be incredibly robust, and is something we can build into the broader system of base class generation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement End user-perceivable enhancements. Impact: Low Low perceived user impact (e.g. edge cases). Issue: Needs Break-down Indicates that an issue is too large and should be broken into smaller chunks. Issue: Needs Clarification Indicates that an issue needs more detail in order to be able to be acted upon. Priority: Nice-to-have This work item is nice to have for its milestone. Work: Medium The means to find the solution is clear, but it isn't at good-first-issue level yet. Z-ibt Temporary label for Ben to keep track of issues he's triaged.
Development

No branches or pull requests

4 participants