NTP-8836 Static Nudge Analytics and UI fixes (#14125)
This commit is contained in:
@@ -17,7 +17,6 @@ import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.layout.wrapContentHeight
|
||||
import androidx.compose.foundation.layout.wrapContentSize
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material3.ButtonDefaults
|
||||
import androidx.compose.runtime.Composable
|
||||
@@ -27,6 +26,7 @@ import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.navi.elex.atoms.ElexImage
|
||||
import com.navi.elex.atoms.ElexText
|
||||
import com.navi.elex.font.FontWeightEnum
|
||||
import com.navi.elex.molecules.ElexButtonWithText
|
||||
@@ -56,11 +56,11 @@ fun NotificationSettingBottomSheetContent(onDismiss: () -> Unit, onClick: () ->
|
||||
horizontalArrangement = Arrangement.Start,
|
||||
verticalAlignment = Alignment.Top
|
||||
) {
|
||||
Row(
|
||||
modifier = Modifier.size(40.dp).background(Color(0xFFF5F5F5), shape = CircleShape),
|
||||
horizontalArrangement = Arrangement.Start,
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
) {}
|
||||
ElexImage(
|
||||
iconCode = com.navi.naviwidgets.R.drawable.navi_icon,
|
||||
contentDescription = "Navi Logo",
|
||||
modifier = Modifier.size(40.dp)
|
||||
)
|
||||
|
||||
Column(
|
||||
modifier = Modifier.wrapContentSize().padding(8.dp, 0.dp, 0.dp, 0.dp),
|
||||
|
||||
@@ -18,6 +18,7 @@ import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.width
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
@@ -46,6 +47,7 @@ fun ProfileAppUpdateWidget(
|
||||
appUpdateAnalytics: NaviAnalytics.InAppUpdate =
|
||||
NaviAnalytics.naviAnalytics.InAppUpdate(PROFILE_SCREEN)
|
||||
) {
|
||||
LaunchedEffect(Unit) { appUpdateAnalytics.appUpdateNudgeViewEvent() }
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.SpaceBetween,
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
|
||||
@@ -525,7 +525,7 @@
|
||||
<string name="contacts_permission_rational">To enable seamless payments to connections</string>
|
||||
<string name="allow_notifications">Allow notifications</string>
|
||||
<string name="app_notifications">App notifications</string>
|
||||
<string name="to_enable_notifications">To enable notification\n\nPhone settings > Apps > Navi > Permissions > notifications</string>
|
||||
<string name="to_enable_notifications">To enable notification\n\nPhone settings > Apps > Navi > Permissions > Notifications</string>
|
||||
<string name="unable_to_load">Unable to load</string>
|
||||
<string name="something_went_wrong_without_exclamation">Something went wrong</string>
|
||||
<string name="please_try_again_later">Please try again later</string>
|
||||
|
||||
@@ -1077,56 +1077,56 @@ class CommonNaviAnalytics private constructor() {
|
||||
inner class NotifyMe(val screenName: String? = null) {
|
||||
fun notifyMeNudgeViewEvent() {
|
||||
NaviTrackEvent.trackEvent(
|
||||
eventName = "notify_me_nudge_view_event",
|
||||
eventName = "naviapp_notify_me_nudge_view_event",
|
||||
eventValues = mapOf(Pair("screen_name", screenName.orEmpty()))
|
||||
)
|
||||
}
|
||||
|
||||
fun notifyMeNudgeClickEvent() {
|
||||
NaviTrackEvent.trackEvent(
|
||||
eventName = "notify_me_nudge_click_event",
|
||||
eventName = "naviapp_notify_me_nudge_click_event",
|
||||
eventValues = mapOf(Pair("screen_name", screenName.orEmpty()))
|
||||
)
|
||||
}
|
||||
|
||||
fun notifyMeNudgeDismissEvent() {
|
||||
NaviTrackEvent.trackEvent(
|
||||
eventName = "notify_me_nudge_dismiss_event",
|
||||
eventName = "naviapp_notify_me_nudge_dismiss_event",
|
||||
eventValues = mapOf(Pair("screen_name", screenName.orEmpty()))
|
||||
)
|
||||
}
|
||||
|
||||
fun notifyMeNudgePermissionPromptShownEvent() {
|
||||
NaviTrackEvent.trackEvent(
|
||||
eventName = "notify_me_nudge_permission_prompt_shown_event",
|
||||
eventName = "naviapp_notify_me_nudge_permission_prompt_shown_event",
|
||||
eventValues = mapOf(Pair("screen_name", screenName.orEmpty()))
|
||||
)
|
||||
}
|
||||
|
||||
fun notifyMeNudgePermissionGrantedEvent() {
|
||||
NaviTrackEvent.trackEvent(
|
||||
eventName = "notify_me_nudge_permission_granted_event",
|
||||
eventName = "naviapp_notify_me_nudge_permission_granted_event",
|
||||
eventValues = mapOf(Pair("screen_name", screenName.orEmpty()))
|
||||
)
|
||||
}
|
||||
|
||||
fun notifyMeNudgeOpenSettingsBottomSheetLandEvent() {
|
||||
NaviTrackEvent.trackEvent(
|
||||
eventName = "notify_me_nudge_open_settings_bottomsheet_land_event",
|
||||
eventName = "naviapp_notify_me_nudge_open_settings_bottomsheet_land_event",
|
||||
eventValues = mapOf(Pair("screen_name", screenName.orEmpty()))
|
||||
)
|
||||
}
|
||||
|
||||
fun notifyMeNudgeOpenSettingsBottomSheetClickEvent() {
|
||||
NaviTrackEvent.trackEvent(
|
||||
eventName = "notify_me_nudge_open_settings_bottomsheet_click_event",
|
||||
eventName = "naviapp_notify_me_nudge_open_settings_bottomsheet_click_event",
|
||||
eventValues = mapOf(Pair("screen_name", screenName.orEmpty()))
|
||||
)
|
||||
}
|
||||
|
||||
fun notifyMeNudgeOpenSettingsBottomSheetDismissEvent() {
|
||||
NaviTrackEvent.trackEvent(
|
||||
eventName = "notify_me_nudge_open_settings_bottomsheet_dismiss_event",
|
||||
eventName = "naviapp_notify_me_nudge_open_settings_bottomsheet_dismiss_event",
|
||||
eventValues = mapOf(Pair("screen_name", screenName.orEmpty()))
|
||||
)
|
||||
}
|
||||
|
||||
@@ -876,6 +876,7 @@ object NaviWidgetIconUtils {
|
||||
private const val OFFER_ICON_WHITE = "OFFER_ICON_WHITE"
|
||||
private const val OFFER_ICON_PURPLE_WITH_BORDER = "OFFER_ICON_PURPLE_WITH_BORDER"
|
||||
private const val BBPS_CATEGORY_ICON_PLACEHOLDER = "BBPS_CATEGORY_ICON_PLACEHOLDER"
|
||||
private const val NAVI_ICON = "NAVI_ICON"
|
||||
|
||||
fun updateIcon(
|
||||
imageDetail: ImageDetail,
|
||||
@@ -1783,6 +1784,7 @@ object NaviWidgetIconUtils {
|
||||
OFFER_ICON_WHITE -> R.drawable.ic_offer_white
|
||||
OFFER_ICON_PURPLE -> R.drawable.ic_offer_purple
|
||||
OFFER_ICON_PURPLE_WITH_BORDER -> R.drawable.ic_offer_purple_with_border
|
||||
NAVI_ICON -> R.drawable.navi_icon
|
||||
else -> -1
|
||||
}
|
||||
}
|
||||
|
||||
15
android/navi-widgets/src/main/res/drawable/navi_icon.xml
Normal file
15
android/navi-widgets/src/main/res/drawable/navi_icon.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="40dp"
|
||||
android:height="40dp"
|
||||
android:viewportWidth="40"
|
||||
android:viewportHeight="40">
|
||||
<path
|
||||
android:pathData="M20,0L20,0A20,20 0,0 1,40 20L40,20A20,20 0,0 1,20 40L20,40A20,20 0,0 1,0 20L0,20A20,20 0,0 1,20 0z"
|
||||
android:fillColor="#1F002A"/>
|
||||
<path
|
||||
android:pathData="M19.638,17.308C19.229,16.917 18.684,16.699 18.118,16.699H10V29.999H14.5V20.999H19V28.499C19,29.327 19.672,29.999 20.5,29.999H23.5V21.94C23.5,21.339 23.254,20.765 22.82,20.349L19.638,17.308Z"
|
||||
android:fillColor="#22D081"/>
|
||||
<path
|
||||
android:pathData="M19,10V14.3H25.7V21H30V10H19Z"
|
||||
android:fillColor="#22D081"/>
|
||||
</vector>
|
||||
Reference in New Issue
Block a user