-
Notifications
You must be signed in to change notification settings - Fork 187
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
feat(knock) : Knock Requests Banner UI #4005
Conversation
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
e17713f
to
603deb7
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #4005 +/- ##
=========================================
Coverage 83.07% 83.08%
=========================================
Files 1815 1821 +6
Lines 46248 46434 +186
Branches 5429 5440 +11
=========================================
+ Hits 38421 38578 +157
- Misses 5920 5946 +26
- Partials 1907 1910 +3 ☔ View full report in Codecov by Sentry. |
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.
A few remarks, else LGTM
class KnockRequestsBannerPresenter @Inject constructor() : Presenter<KnockRequestsBannerState> { | ||
@Composable | ||
override fun present(): KnockRequestsBannerState { | ||
var shouldShowBanner by remember { mutableStateOf(false) } |
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.
The banner will be shown at each app starts? Or will the app will store the decision to hide the banner in a later PR?
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.
Will be stored by the sdk actually!
null | ||
} | ||
|
||
val reason = if (knockRequests.size == 1) { |
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.
Could be nice to have a firstIfSingleton
extension.
) | ||
if (state.canAccept) { | ||
Button( | ||
text = "Accept", |
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.
Use stringResource
please (several changes to do in this place)
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.
Ooops, yeah forgot some strings
if (state.canAccept) { | ||
Button( | ||
text = "Accept", | ||
onClick = {}, |
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.
Can be done later, but maybe prepare the lambda for the onClick action.
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.
Show a loading wheel and disable the button here? (Loading state)
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.
The banner will be dismissed directly in this case, I'm waiting to branch the logic
|
Content
First iteration of the knock requests banner view
No data branched.
Motivation and context
Part of #3692
Screenshots / GIFs
Tests
Tested devices
Checklist