Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ object AppUrls {

const val CROWDSIGNAL_MAIN_SURVEY = "https://automattic.survey.fm/woo-app-general-feedback-user-survey"
const val CROWDSIGNAL_PRODUCT_SURVEY = "https://automattic.survey.fm/woo-app-feature-feedback-products"
const val CROWDSIGNAL_WOO_POS_SURVEY_POTENTIAL_USER = "https://automattic.survey.fm/woo-pos-potential-user-survey"
const val CROWDSIGNAL_WOO_POS_SURVEY_CURRENT_USER = "https://automattic.survey.fm/woo-pos-current-user-survey"

const val CROWDSIGNAL_ANALYTICS_HUB_SURVEY = "https://automattic.survey.fm/woo-app-analytics-hub-production"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,8 @@ private fun EmptyViewPreview() {
controlsState = BookingListControlsState(
selectedSortOption = BookingListSortOption.NewestToOldest,
onSortClick = {},
onFilterClick = {}
onFilterClick = {},
isFilterButtonVisible = true
),
sortBottomSheetState = null,
searchState = BookingListSearchState(
Expand Down Expand Up @@ -523,7 +524,8 @@ private fun EmptySearchResultsViewPreview() {
controlsState = BookingListControlsState(
selectedSortOption = BookingListSortOption.NewestToOldest,
onSortClick = {},
onFilterClick = {}
onFilterClick = {},
isFilterButtonVisible = true
),
sortBottomSheetState = null,
searchState = BookingListSearchState(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,8 @@ class MainActivity :
// Propagate it to the DashboardBlazeCard
event.isHandled = false
}

is MainActivityViewModel.ViewSurvey -> showSurvey(event.surveyUrl)
}
}

Expand Down Expand Up @@ -1286,6 +1288,15 @@ class MainActivity :
}
}

private fun showSurvey(surveyUrl: String) {
NavGraphMainDirections.actionGlobalFeedbackSurveyFragment(
surveyType = SurveyType.MAIN,
customUrl = surveyUrl
).apply {
navController.navigateSafely(this)
}
}

override fun updateOfflineStatusBar(isConnected: Boolean) {
if (isConnected) binding.offlineBar.hide() else binding.offlineBar.show()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import android.os.Build.VERSION_CODES
import androidx.lifecycle.SavedStateHandle
import androidx.lifecycle.asLiveData
import com.woocommerce.android.AppPrefs
import com.woocommerce.android.AppUrls
import com.woocommerce.android.R
import com.woocommerce.android.analytics.AnalyticsEvent
import com.woocommerce.android.analytics.AnalyticsEvent.REVIEW_OPEN
Expand Down Expand Up @@ -289,8 +290,13 @@ class MainActivityViewModel @Inject constructor(
BLAZE_NO_CAMPAIGN_REMINDER,
BLAZE_ABANDONED_CAMPAIGN_REMINDER -> triggerEvent(LaunchBlazeCampaignCreation)

WOO_POS_SURVEY_POTENTIAL_USER_REMINDER,
WOO_POS_SURVEY_CURRENT_USER_REMINDER -> error("POS Survey notifications are not implemented yet")
WOO_POS_SURVEY_POTENTIAL_USER_REMINDER -> triggerEvent(
ViewSurvey(AppUrls.CROWDSIGNAL_WOO_POS_SURVEY_POTENTIAL_USER)
)

WOO_POS_SURVEY_CURRENT_USER_REMINDER -> triggerEvent(
ViewSurvey(AppUrls.CROWDSIGNAL_WOO_POS_SURVEY_CURRENT_USER)
)
}
}
}
Expand Down Expand Up @@ -338,6 +344,7 @@ class MainActivityViewModel @Inject constructor(
data class ViewUrlInWebView(
val url: String,
) : Event()
data class ViewSurvey(val surveyUrl: String) : Event()

object ShortcutOpenPayments : Event()
object ShortcutOpenOrderCreation : Event()
Expand Down
4 changes: 2 additions & 2 deletions WooCommerce/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3211,9 +3211,9 @@
<string name="local_notification_blaze_abandoned_campaign_reminder_title">Thinking about boosting your sales?</string>
<string name="local_notification_blaze_abandoned_campaign_reminder_description">Get your products seen by millions with Blaze and boost your sales</string>
<string name="local_notification_woo_pos_survey_potential_user_title">Thinking about in-person sales?</string>
<string name="local_notification_woo_pos_survey_potential_user_description">Help us build tools you\'d actually use. 2-minute survey to build tools you\'ll love.</string>
<string name="local_notification_woo_pos_survey_potential_user_description">Take a quick 2-minute survey to help us shape features you\'ll love.</string>
<string name="local_notification_woo_pos_survey_current_user_title">How\'s POS working for you?</string>
<string name="local_notification_woo_pos_survey_current_user_description">Share your experience in 2 minutes and help us improve.</string>
<string name="local_notification_woo_pos_survey_current_user_description">Share your experience in a quick 2-minute survey and help us improve.</string>

<!--
First product published congratulatory feature
Expand Down