-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature/mob 3281 show bubble internally with overlay false #1028
base: development
Are you sure you want to change the base?
Feature/mob 3281 show bubble internally with overlay false #1028
Conversation
Fixes issue with the Flutter example app which had a similar package name. MOB-3216
…comments MOB-3196
…ernal naming consistency MOB-3196
Add reminder that will help us to consider keeping logs unified between platforms. MOB-3229
MOB-3215
MOB-3235
Request only when push notifications set up - Chat screen — right before the first engagement request - Secure messaging — before sending the first message - Fix warning - Consider using 'tasks.register' to avoid unnecessary configuration
- Upgrade core and appCompat to the maximum versions supporting api-33 - Refactoring - Add comments describing the Media projection requirements MOB 3232
Since Widgets SDK and Core SDK are being uploaded to same AWS bucket and content is also the same (everything inside module 'build/dokka' folder) I have added unique keyword for Widgets SDK path. MOB-3172
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.
LGTM
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.
Looks good, but it would be great to have a unit tests for those cases.
Testing this is really complicated because 1. most of its components are untested 2. main logic is in an abstract class and would thus need testing in multiple final classes that override the abstract class. I can do this if we think this is warranted, but it will probably take an additional day or so |
@@ -23,8 +23,12 @@ internal abstract class IsDisplayChatHeadUseCase( | |||
) { | |||
abstract fun isDisplayBasedOnPermission(): Boolean | |||
|
|||
open operator fun invoke(viewName: String?): Boolean { | |||
return isBubbleEnabled() && isDisplayBasedOnPermission() && isShowForEngagement(viewName) | |||
open operator fun invoke(viewName: String?, internal: Boolean = false): Boolean { |
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 you please help me to understand, where is the value of USE_OVERLAY
setting taken into account? I see that for isDisplayApplicationChatHeadUseCase
internal
is always true
. I see that if not passed , internal is false
. But what if permission for showing a bubble outside of the app is granted and USE_OVERLAY
is true
- will the bubble be shown outside of the app? I cannot find this case in the code. 🤔
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.
To be honest I am not sure if my input is what you wanted to know but....
As far as I know the USE_OVERLAY flag now is used only to decide whether to request system permission for system overlays on engagement start. We don't use it in other places because later on we just check whether that system permission is available or not.
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.
Based on my testing, with permission enabled and USE_OVERLAY
set to false, bubble is still shown inside and outside the app. Which is not expected, as far as I understand, isn't it? As far as I understand, bubble should not be shown if USE_OVERLAY
is false. Could you please test this case on your own manually?
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.
I am guessing you had the overlay permission already set to allowed before changing the use_overlay parameter to false, right?
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.
Right.
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.
I fixed the issue in the latest fixup
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 result of the last fix is:
- Bubble is always shown internally
- Bubble is shown outside application with permission and USE_OVERLAY is true
- Even with granted permission, but USE_OVERLAY false the bubble will not be shown outside the application
@@ -23,8 +23,12 @@ internal abstract class IsDisplayChatHeadUseCase( | |||
) { | |||
abstract fun isDisplayBasedOnPermission(): Boolean | |||
|
|||
open operator fun invoke(viewName: String?): Boolean { | |||
return isBubbleEnabled() && isDisplayBasedOnPermission() && isShowForEngagement(viewName) | |||
open operator fun invoke(viewName: String?, internal: Boolean = false): Boolean { |
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.
To be honest I am not sure if my input is what you wanted to know but....
As far as I know the USE_OVERLAY flag now is used only to decide whether to request system permission for system overlays on engagement start. We don't use it in other places because later on we just check whether that system permission is available or not.
…tUseOverlay(false)
@Pelkar I would like to take some time to review PR carefully once again because there are lots of bubble test cases. By the way, have you tested them after the changes? |
I have tested the feature extensively, but I will go through the specific test cases right now |
tested more thoroughly, one issue came up, for some reason there are two bubbles shown, all functionality is correct, but there is just a duplicate |
It might be that one is a "local" bubble, the second - is "global". |
adfb797
to
a9baf3c
Compare
Jira issue:
https://glia.atlassian.net/browse/MOB-3281
What was solved?
Even with setUseOverlay(false) we are still showing the chathead in the integrator application. Also added relevant javadoc changes, but those will hopefully be confirmed/modified by Kadri today.
Release notes:
Additional info: