-
Notifications
You must be signed in to change notification settings - Fork 29
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
chore: provide a way to make previews with scoped view models #2414
Conversation
Build 1746 failed. |
Codecov Report
@@ Coverage Diff @@
## develop #2414 +/- ##
==========================================
Coverage 41.48% 41.49%
+ Complexity 1085 1080 -5
==========================================
Files 344 344
Lines 12430 12429 -1
Branches 1632 1633 +1
==========================================
Hits 5157 5157
+ Misses 6788 6787 -1
Partials 485 485
Continue to review full report in Codecov by Sentry.
|
APKs built during tests are available here. Scroll down to Artifacts! |
Build 1752 succeeded. The build produced the following APK's: |
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.
Wow great automation 🥇
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.
👏🏻
* fix: some end points are not routed through the proxy server * fix cli * fix android sample * fix test service * detekt * fix ios target * fix tests * refactor: reimplement update api versions usecase to use proxy (#2414) * refactor: implement UpdateApiVersionsUseCaseImpl to be proxy safe * feat: add proxy URL and need auth indication to custom server dialogs * fix tests (cherry picked from commit b1f14574e945e276fe275acce468346d755a97a3)
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764
The PR Description
What's new in this PR?
Issues
Currently, previews for all composables that have some elements which use scoped view models does not work.
Causes (Optional)
It requires to inject a view model using hilt which is not possible for previews.
Solutions
Create annotation
@ViewModelScopedPreview
to mark all view model interfaces that should have the "preview" object.These interfaces need to have default implementations.
KSP will generate a "preview" data object with these default implementations and create a list of all "preview" objects for all view model interfaces that are marked with this annotation.
hiltViewModelScoped
checks if it's a preview, and if so then it takes a "preview" object, otherwise it injects the proper view model using hilt.PR Post Submission Checklist for internal contributors (Optional)
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764
.