diff --git a/WordPress/build.gradle b/WordPress/build.gradle index 18af4357d5ab..c846fb90b3df 100644 --- a/WordPress/build.gradle +++ b/WordPress/build.gradle @@ -158,7 +158,6 @@ android { buildConfigField "boolean", "ENABLE_SIGNUP", "true" buildConfigField "boolean", "ENABLE_READER", "true" buildConfigField "boolean", "ENABLE_CREATE_FAB", "true" - buildConfigField "boolean", "ENABLE_QUICK_ACTION", "true" buildConfigField "boolean", "ENABLE_FOLLOWED_SITES_SETTINGS", "true" buildConfigField "boolean", "ENABLE_WHATS_NEW_FEATURE", "true" buildConfigField "boolean", "ENABLE_MY_SITE_DASHBOARD_TABS", "true" @@ -208,7 +207,6 @@ android { buildConfigField "boolean", "ENABLE_SIGNUP", "true" buildConfigField "boolean", "ENABLE_READER", "true" buildConfigField "boolean", "ENABLE_CREATE_FAB", "true" - buildConfigField "boolean", "ENABLE_QUICK_ACTION", "true" buildConfigField "boolean", "ENABLE_FOLLOWED_SITES_SETTINGS", "true" buildConfigField "boolean", "ENABLE_WHATS_NEW_FEATURE", "true" buildConfigField "boolean", "ENABLE_MY_SITE_DASHBOARD_TABS", "true" diff --git a/WordPress/src/androidTest/java/org/wordpress/android/e2e/pages/MySitesPage.kt b/WordPress/src/androidTest/java/org/wordpress/android/e2e/pages/MySitesPage.kt index fe7840071e24..fb0b807eb2a2 100644 --- a/WordPress/src/androidTest/java/org/wordpress/android/e2e/pages/MySitesPage.kt +++ b/WordPress/src/androidTest/java/org/wordpress/android/e2e/pages/MySitesPage.kt @@ -3,7 +3,6 @@ package org.wordpress.android.e2e.pages import android.view.View import android.widget.Checkable import android.widget.TextView -import androidx.annotation.IdRes import androidx.annotation.StringRes import androidx.appcompat.widget.SwitchCompat import androidx.appcompat.widget.Toolbar @@ -82,10 +81,7 @@ class MySitesPage { fun goToPosts() { goToMenuTab() - clickQuickActionOrSiteMenuItem( - R.id.quick_action_posts_button, - R.string.my_site_btn_blog_posts - ) + clickSiteMenuItem(R.string.my_site_btn_blog_posts) } fun goToActivityLog() { @@ -152,19 +148,17 @@ class MySitesPage { goToMenuTab() // Using RecyclerViewActions.click doesn't work for some reason when quick actions are displayed. - if (WPSupportUtils.isElementDisplayed(R.id.quick_actions_card)) { - WPSupportUtils.clickOn(Espresso.onView(ViewMatchers.withText(R.string.backup))) - } else { - clickItemWithText(R.string.backup) - } + clickItemWithText(R.string.backup) } fun goToStats(): StatsPage { goToMenuTab() - val statsButton = Espresso.onView(Matchers.allOf( - ViewMatchers.withText(R.string.stats), - ViewMatchers.withId(R.id.my_site_item_primary_text) - )) + val statsButton = Espresso.onView( + Matchers.allOf( + ViewMatchers.withText(R.string.stats), + ViewMatchers.withId(R.id.my_site_item_primary_text) + ) + ) WPSupportUtils.clickOn(statsButton) WPSupportUtils.idleFor(4000) WPSupportUtils.dismissJetpackAdIfPresent() @@ -177,7 +171,7 @@ class MySitesPage { fun goToMedia() { goToMenuTab() - clickQuickActionOrSiteMenuItem(R.id.quick_action_media_button, R.string.media) + clickSiteMenuItem(R.string.media) } fun createPost() { @@ -215,20 +209,13 @@ class MySitesPage { } /** - * Clicks on the "Quick Action" item or the Site menu item if the quick actions card is hidden. - * Needed because locating site menu items by text fails if the quick actions are available. - * @param quickActionItemId Id of the quick actions menu item. + * Clicks on the Site menu item * @param siteMenuItemString String resource id of the site menu item. */ - private fun clickQuickActionOrSiteMenuItem( - @IdRes quickActionItemId: Int, + private fun clickSiteMenuItem( @StringRes siteMenuItemString: Int ) { - if (WPSupportUtils.isElementDisplayed(quickActionItemId)) { - WPSupportUtils.clickOn(quickActionItemId) - } else { - clickItemWithText(siteMenuItemString) - } + clickItemWithText(siteMenuItemString) } companion object { diff --git a/WordPress/src/main/java/org/wordpress/android/ui/mysite/MySiteAdapter.kt b/WordPress/src/main/java/org/wordpress/android/ui/mysite/MySiteAdapter.kt index 61c33ae2270f..c6df7f59d23a 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/mysite/MySiteAdapter.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/mysite/MySiteAdapter.kt @@ -10,11 +10,10 @@ import org.wordpress.android.ui.mysite.MySiteCardAndItem.Card.DomainRegistration import org.wordpress.android.ui.mysite.MySiteCardAndItem.Card.JetpackFeatureCard import org.wordpress.android.ui.mysite.MySiteCardAndItem.Card.JetpackInstallFullPluginCard import org.wordpress.android.ui.mysite.MySiteCardAndItem.Card.JetpackSwitchMenu -import org.wordpress.android.ui.mysite.MySiteCardAndItem.Card.QuickActionsCard import org.wordpress.android.ui.mysite.MySiteCardAndItem.Card.QuickLinkRibbon import org.wordpress.android.ui.mysite.MySiteCardAndItem.Card.QuickStartCard -import org.wordpress.android.ui.mysite.MySiteCardAndItem.Item.CategoryHeaderItem import org.wordpress.android.ui.mysite.MySiteCardAndItem.Item.CategoryEmptyHeaderItem +import org.wordpress.android.ui.mysite.MySiteCardAndItem.Item.CategoryHeaderItem import org.wordpress.android.ui.mysite.MySiteCardAndItem.Item.InfoItem import org.wordpress.android.ui.mysite.MySiteCardAndItem.Item.ListItem import org.wordpress.android.ui.mysite.MySiteCardAndItem.Item.SingleActionCard @@ -25,7 +24,6 @@ import org.wordpress.android.ui.mysite.cards.domainregistration.DomainRegistrati import org.wordpress.android.ui.mysite.cards.jetpackfeature.JetpackFeatureCardViewHolder import org.wordpress.android.ui.mysite.cards.jetpackfeature.SwitchToJetpackMenuCardViewHolder import org.wordpress.android.ui.mysite.cards.jpfullplugininstall.JetpackInstallFullPluginCardViewHolder -import org.wordpress.android.ui.mysite.cards.quickactions.QuickActionsViewHolder import org.wordpress.android.ui.mysite.cards.quicklinksribbon.QuickLinkRibbonViewHolder import org.wordpress.android.ui.mysite.cards.quickstart.QuickStartCardViewHolder import org.wordpress.android.ui.mysite.items.categoryheader.MySiteCategoryItemEmptyViewHolder @@ -53,7 +51,6 @@ class MySiteAdapter( @Suppress("ComplexMethod") override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): MySiteCardAndItemViewHolder<*> { return when (viewType) { - MySiteCardAndItem.Type.QUICK_ACTIONS_CARD.ordinal -> QuickActionsViewHolder(parent, uiHelpers) MySiteCardAndItem.Type.QUICK_LINK_RIBBON.ordinal -> QuickLinkRibbonViewHolder(parent) MySiteCardAndItem.Type.DOMAIN_REGISTRATION_CARD.ordinal -> DomainRegistrationViewHolder(parent) MySiteCardAndItem.Type.QUICK_START_CARD.ordinal -> QuickStartCardViewHolder(parent, uiHelpers) @@ -90,7 +87,6 @@ class MySiteAdapter( @Suppress("ComplexMethod") override fun onBindViewHolder(holder: MySiteCardAndItemViewHolder<*>, position: Int) { when (holder) { - is QuickActionsViewHolder -> holder.bind(getItem(position) as QuickActionsCard) is QuickLinkRibbonViewHolder -> holder.bind(getItem(position) as QuickLinkRibbon) is DomainRegistrationViewHolder -> holder.bind(getItem(position) as DomainRegistrationCard) is QuickStartCardViewHolder -> holder.bind(getItem(position) as QuickStartCard) diff --git a/WordPress/src/main/java/org/wordpress/android/ui/mysite/MySiteAdapterDiffCallback.kt b/WordPress/src/main/java/org/wordpress/android/ui/mysite/MySiteAdapterDiffCallback.kt index 12ddadb17e1c..ce30fa47e5ab 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/mysite/MySiteAdapterDiffCallback.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/mysite/MySiteAdapterDiffCallback.kt @@ -5,7 +5,6 @@ import org.wordpress.android.ui.mysite.MySiteCardAndItem.Card.DashboardCards import org.wordpress.android.ui.mysite.MySiteCardAndItem.Card.DomainRegistrationCard import org.wordpress.android.ui.mysite.MySiteCardAndItem.Card.JetpackFeatureCard import org.wordpress.android.ui.mysite.MySiteCardAndItem.Card.JetpackInstallFullPluginCard -import org.wordpress.android.ui.mysite.MySiteCardAndItem.Card.QuickActionsCard import org.wordpress.android.ui.mysite.MySiteCardAndItem.Card.QuickLinkRibbon import org.wordpress.android.ui.mysite.MySiteCardAndItem.Card.QuickStartCard import org.wordpress.android.ui.mysite.MySiteCardAndItem.Card.JetpackSwitchMenu @@ -20,7 +19,6 @@ import org.wordpress.android.ui.mysite.MySiteCardAndItem.JetpackBadge object MySiteAdapterDiffCallback : DiffUtil.ItemCallback() { override fun areItemsTheSame(oldItem: MySiteCardAndItem, updatedItem: MySiteCardAndItem): Boolean { return oldItem.type == updatedItem.type && when { - oldItem is QuickActionsCard && updatedItem is QuickActionsCard -> true oldItem is QuickLinkRibbon && updatedItem is QuickLinkRibbon -> true oldItem is DomainRegistrationCard && updatedItem is DomainRegistrationCard -> true oldItem is QuickStartCard && updatedItem is QuickStartCard -> true diff --git a/WordPress/src/main/java/org/wordpress/android/ui/mysite/MySiteCardAndItem.kt b/WordPress/src/main/java/org/wordpress/android/ui/mysite/MySiteCardAndItem.kt index b76b03607121..40076c8a1b2a 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/mysite/MySiteCardAndItem.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/mysite/MySiteCardAndItem.kt @@ -14,7 +14,6 @@ import org.wordpress.android.ui.mysite.MySiteCardAndItem.Type.INFO_ITEM import org.wordpress.android.ui.mysite.MySiteCardAndItem.Type.JETPACK_BADGE import org.wordpress.android.ui.mysite.MySiteCardAndItem.Type.JETPACK_FEATURE_CARD import org.wordpress.android.ui.mysite.MySiteCardAndItem.Type.LIST_ITEM -import org.wordpress.android.ui.mysite.MySiteCardAndItem.Type.QUICK_ACTIONS_CARD import org.wordpress.android.ui.mysite.MySiteCardAndItem.Type.QUICK_LINK_RIBBON import org.wordpress.android.ui.mysite.MySiteCardAndItem.Type.QUICK_START_CARD import org.wordpress.android.ui.mysite.MySiteCardAndItem.Type.SINGLE_ACTION_CARD @@ -31,7 +30,6 @@ typealias PromptID = Int sealed class MySiteCardAndItem(open val type: Type, open val activeQuickStartItem: Boolean = false) { enum class Type { SITE_INFO_CARD, - QUICK_ACTIONS_CARD, QUICK_LINK_RIBBON, DOMAIN_REGISTRATION_CARD, QUICK_START_CARD, @@ -90,15 +88,6 @@ sealed class MySiteCardAndItem(open val type: Type, open val activeQuickStartIte override val type: Type, override val activeQuickStartItem: Boolean = false ) : MySiteCardAndItem(type, activeQuickStartItem) { - data class QuickActionsCard( - val title: UiString, - val onStatsClick: ListItemInteraction, - val onPagesClick: ListItemInteraction, - val onPostsClick: ListItemInteraction, - val onMediaClick: ListItemInteraction, - val showPages: Boolean = true - ) : Card(QUICK_ACTIONS_CARD) - data class QuickLinkRibbon( val quickLinkRibbonItems: List, val showPagesFocusPoint: Boolean = false, diff --git a/WordPress/src/main/java/org/wordpress/android/ui/mysite/MySiteCardAndItemBuilderParams.kt b/WordPress/src/main/java/org/wordpress/android/ui/mysite/MySiteCardAndItemBuilderParams.kt index fa4cff20812b..6992e13b2fb7 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/mysite/MySiteCardAndItemBuilderParams.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/mysite/MySiteCardAndItemBuilderParams.kt @@ -32,14 +32,6 @@ sealed class MySiteCardAndItemBuilderParams { val isStaleMessagePresent: Boolean ) : MySiteCardAndItemBuilderParams() - data class QuickActionsCardBuilderParams( - val siteModel: SiteModel, - val onQuickActionStatsClick: () -> Unit, - val onQuickActionPagesClick: () -> Unit, - val onQuickActionPostsClick: () -> Unit, - val onQuickActionMediaClick: () -> Unit - ) : MySiteCardAndItemBuilderParams() - data class QuickLinkRibbonBuilderParams( val siteModel: SiteModel, val onPagesClick: () -> Unit, diff --git a/WordPress/src/main/java/org/wordpress/android/ui/mysite/MySiteViewModel.kt b/WordPress/src/main/java/org/wordpress/android/ui/mysite/MySiteViewModel.kt index 26f381642475..1e4bf2396500 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/mysite/MySiteViewModel.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/mysite/MySiteViewModel.kt @@ -65,7 +65,6 @@ import org.wordpress.android.ui.mysite.MySiteCardAndItemBuilderParams.DashboardC import org.wordpress.android.ui.mysite.MySiteCardAndItemBuilderParams.DomainRegistrationCardBuilderParams import org.wordpress.android.ui.mysite.MySiteCardAndItemBuilderParams.InfoItemBuilderParams import org.wordpress.android.ui.mysite.MySiteCardAndItemBuilderParams.JetpackInstallFullPluginCardBuilderParams -import org.wordpress.android.ui.mysite.MySiteCardAndItemBuilderParams.QuickActionsCardBuilderParams import org.wordpress.android.ui.mysite.MySiteCardAndItemBuilderParams.QuickLinkRibbonBuilderParams import org.wordpress.android.ui.mysite.MySiteCardAndItemBuilderParams.QuickStartCardBuilderParams import org.wordpress.android.ui.mysite.MySiteCardAndItemBuilderParams.SiteInfoCardBuilderParams @@ -555,13 +554,6 @@ class MySiteViewModel @Inject constructor( val cardsResult = if (!jetpackFeatureRemovalPhaseHelper.shouldShowDashboard()) emptyList() else cardsBuilder.build( - QuickActionsCardBuilderParams( - siteModel = site, - onQuickActionStatsClick = this::quickActionStatsClick, - onQuickActionPagesClick = this::quickActionPagesClick, - onQuickActionPostsClick = this::quickActionPostsClick, - onQuickActionMediaClick = this::quickActionMediaClick - ), DomainRegistrationCardBuilderParams( isDomainCreditAvailable = isDomainCreditAvailable, domainRegistrationClick = this::domainRegistrationClick @@ -729,7 +721,6 @@ class MySiteViewModel @Inject constructor( if (defaultTab == MySiteTabType.SITE_MENU) { add(Type.QUICK_START_CARD) } - add(Type.QUICK_ACTIONS_CARD) } MySiteTabType.ALL -> emptyList() @@ -979,37 +970,6 @@ class MySiteViewModel @Inject constructor( _onNavigation.value = Event(SiteNavigationAction.OpenSitePicker(selectedSite)) } - private fun quickActionStatsClick() { - val selectedSite = requireNotNull(selectedSiteRepository.getSelectedSite()) - trackWithTabSourceIfNeeded(Stat.QUICK_ACTION_STATS_TAPPED) - quickStartRepository.completeTask( - quickStartRepository.quickStartType.getTaskFromString(QUICK_START_CHECK_STATS_LABEL) - ) - _onNavigation.value = Event(getStatsNavigationActionForSite(selectedSite)) - } - - private fun quickActionPagesClick() { - val selectedSite = requireNotNull(selectedSiteRepository.getSelectedSite()) - trackWithTabSourceIfNeeded(Stat.QUICK_ACTION_PAGES_TAPPED) - quickStartRepository.completeTask(QuickStartNewSiteTask.REVIEW_PAGES) - _onNavigation.value = Event(SiteNavigationAction.OpenPages(selectedSite)) - } - - private fun quickActionPostsClick() { - val selectedSite = requireNotNull(selectedSiteRepository.getSelectedSite()) - trackWithTabSourceIfNeeded(Stat.QUICK_ACTION_POSTS_TAPPED) - _onNavigation.value = Event(SiteNavigationAction.OpenPosts(selectedSite)) - } - - private fun quickActionMediaClick() { - val selectedSite = requireNotNull(selectedSiteRepository.getSelectedSite()) - trackWithTabSourceIfNeeded(Stat.QUICK_ACTION_MEDIA_TAPPED) - quickStartRepository.requestNextStepOfTask( - quickStartRepository.quickStartType.getTaskFromString(QUICK_START_UPLOAD_MEDIA_LABEL) - ) - _onNavigation.value = Event(SiteNavigationAction.OpenMedia(selectedSite)) - } - private fun onQuickLinkRibbonStatsClick() { val selectedSite = requireNotNull(selectedSiteRepository.getSelectedSite()) trackWithTabSourceIfNeeded(Stat.QUICK_LINK_RIBBON_STATS_TAPPED) diff --git a/WordPress/src/main/java/org/wordpress/android/ui/mysite/cards/CardsBuilder.kt b/WordPress/src/main/java/org/wordpress/android/ui/mysite/cards/CardsBuilder.kt index 5d6b860bf034..9e1d377ade31 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/mysite/cards/CardsBuilder.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/mysite/cards/CardsBuilder.kt @@ -5,21 +5,16 @@ import org.wordpress.android.ui.mysite.MySiteCardAndItem.Card.DomainRegistration import org.wordpress.android.ui.mysite.MySiteCardAndItemBuilderParams.DashboardCardsBuilderParams import org.wordpress.android.ui.mysite.MySiteCardAndItemBuilderParams.DomainRegistrationCardBuilderParams import org.wordpress.android.ui.mysite.MySiteCardAndItemBuilderParams.JetpackInstallFullPluginCardBuilderParams -import org.wordpress.android.ui.mysite.MySiteCardAndItemBuilderParams.QuickActionsCardBuilderParams import org.wordpress.android.ui.mysite.MySiteCardAndItemBuilderParams.QuickLinkRibbonBuilderParams import org.wordpress.android.ui.mysite.MySiteCardAndItemBuilderParams.QuickStartCardBuilderParams import org.wordpress.android.ui.mysite.cards.dashboard.CardsBuilder import org.wordpress.android.ui.mysite.cards.jpfullplugininstall.JetpackInstallFullPluginCardBuilder -import org.wordpress.android.ui.mysite.cards.quickactions.QuickActionsCardBuilder import org.wordpress.android.ui.mysite.cards.quicklinksribbon.QuickLinkRibbonBuilder import org.wordpress.android.ui.mysite.cards.quickstart.QuickStartCardBuilder import org.wordpress.android.ui.utils.ListItemInteraction -import org.wordpress.android.util.BuildConfigWrapper import javax.inject.Inject class CardsBuilder @Inject constructor( - private val buildConfigWrapper: BuildConfigWrapper, - private val quickActionsCardBuilder: QuickActionsCardBuilder, private val quickStartCardBuilder: QuickStartCardBuilder, private val quickLinkRibbonBuilder: QuickLinkRibbonBuilder, private val dashboardCardsBuilder: CardsBuilder, @@ -27,7 +22,6 @@ class CardsBuilder @Inject constructor( ) { @Suppress("LongParameterList") fun build( - quickActionsCardBuilderParams: QuickActionsCardBuilderParams, domainRegistrationCardBuilderParams: DomainRegistrationCardBuilderParams, quickStartCardBuilderParams: QuickStartCardBuilderParams, dashboardCardsBuilderParams: DashboardCardsBuilderParams, @@ -39,9 +33,6 @@ class CardsBuilder @Inject constructor( if (isMySiteTabsEnabled) { cards.add(quickLinkRibbonBuilder.build(quickLinkRibbonBuilderParams)) } - if (shouldShowQuickActionsCard(isMySiteTabsEnabled)) { - cards.add(quickActionsCardBuilder.build(quickActionsCardBuilderParams)) - } jetpackInstallFullPluginCardBuilder.build(jetpackInstallFullPluginCardBuilderParams)?.let { cards.add(it) } @@ -55,10 +46,6 @@ class CardsBuilder @Inject constructor( return cards } - private fun shouldShowQuickActionsCard(isMySiteTabsEnabled: Boolean): Boolean { - return buildConfigWrapper.isQuickActionEnabled && !isMySiteTabsEnabled - } - private fun trackAndBuildDomainRegistrationCard( params: DomainRegistrationCardBuilderParams ): DomainRegistrationCard { diff --git a/WordPress/src/main/java/org/wordpress/android/ui/mysite/cards/quickactions/QuickActionsCardBuilder.kt b/WordPress/src/main/java/org/wordpress/android/ui/mysite/cards/quickactions/QuickActionsCardBuilder.kt deleted file mode 100644 index 43a027011262..000000000000 --- a/WordPress/src/main/java/org/wordpress/android/ui/mysite/cards/quickactions/QuickActionsCardBuilder.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.wordpress.android.ui.mysite.cards.quickactions - -import org.wordpress.android.R -import org.wordpress.android.ui.mysite.MySiteCardAndItem.Card.QuickActionsCard -import org.wordpress.android.ui.mysite.MySiteCardAndItemBuilderParams.QuickActionsCardBuilderParams -import org.wordpress.android.ui.utils.ListItemInteraction -import org.wordpress.android.ui.utils.UiString.UiStringRes -import javax.inject.Inject - -class QuickActionsCardBuilder @Inject constructor() { - fun build(params: QuickActionsCardBuilderParams) = QuickActionsCard( - title = UiStringRes(R.string.my_site_quick_actions_title), - onStatsClick = ListItemInteraction.create(params.onQuickActionStatsClick), - onPagesClick = ListItemInteraction.create(params.onQuickActionPagesClick), - onPostsClick = ListItemInteraction.create(params.onQuickActionPostsClick), - onMediaClick = ListItemInteraction.create(params.onQuickActionMediaClick), - showPages = params.siteModel.isSelfHostedAdmin || params.siteModel.hasCapabilityEditPages - ) -} diff --git a/WordPress/src/main/java/org/wordpress/android/ui/mysite/cards/quickactions/QuickActionsViewHolder.kt b/WordPress/src/main/java/org/wordpress/android/ui/mysite/cards/quickactions/QuickActionsViewHolder.kt deleted file mode 100644 index e95c167445fc..000000000000 --- a/WordPress/src/main/java/org/wordpress/android/ui/mysite/cards/quickactions/QuickActionsViewHolder.kt +++ /dev/null @@ -1,38 +0,0 @@ -package org.wordpress.android.ui.mysite.cards.quickactions - -import android.view.View -import android.view.ViewGroup -import org.wordpress.android.databinding.MySiteCardToolbarBinding -import org.wordpress.android.databinding.MySiteQuickActionsCardBinding -import org.wordpress.android.databinding.QuickActionsCardBinding -import org.wordpress.android.ui.mysite.MySiteCardAndItem.Card.QuickActionsCard -import org.wordpress.android.ui.mysite.MySiteCardAndItemViewHolder -import org.wordpress.android.ui.utils.UiHelpers -import org.wordpress.android.util.extensions.viewBinding - -class QuickActionsViewHolder( - parent: ViewGroup, - private val uiHelpers: UiHelpers -) : MySiteCardAndItemViewHolder( - parent.viewBinding(MySiteQuickActionsCardBinding::inflate) -) { - fun bind(card: QuickActionsCard) = with(binding) { - quickActionsToolbar.update(card) - quickActionsCard.update(card) - } - - private fun MySiteCardToolbarBinding.update(card: QuickActionsCard) { - mySiteCardToolbarTitle.text = uiHelpers.getTextOfUiString(itemView.context, card.title) - } - - private fun QuickActionsCardBinding.update(card: QuickActionsCard) { - quickActionStatsButton.setOnClickListener { card.onStatsClick.click() } - quickActionPostsButton.setOnClickListener { card.onPostsClick.click() } - quickActionMediaButton.setOnClickListener { card.onMediaClick.click() } - quickActionPagesButton.setOnClickListener { card.onPagesClick.click() } - - val pagesVisibility = if (card.showPages) View.VISIBLE else View.GONE - quickActionPagesButton.visibility = pagesVisibility - quickActionPagesLabel.visibility = pagesVisibility - } -} diff --git a/WordPress/src/main/java/org/wordpress/android/ui/quickstart/QuickStartMySitePrompts.kt b/WordPress/src/main/java/org/wordpress/android/ui/quickstart/QuickStartMySitePrompts.kt index 7a0082c241f8..454dd5ccf604 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/quickstart/QuickStartMySitePrompts.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/quickstart/QuickStartMySitePrompts.kt @@ -62,14 +62,14 @@ enum class QuickStartMySitePrompts constructor( CHECK_STATS( QuickStartStore.QUICK_START_CHECK_STATS_LABEL, -1, - R.id.quick_action_stats_button, + R.id.quick_link_ribbon_item_list, R.string.quick_start_dialog_check_stats_message_short, R.drawable.ic_stats_alt_white_24dp ), REVIEW_PAGES( QuickStartStore.QUICK_START_REVIEW_PAGES_LABEL, -1, - R.id.quick_action_pages_button, + R.id.quick_link_ribbon_item_list, R.string.quick_start_dialog_review_pages_message_short, R.drawable.ic_pages_white_24dp ), @@ -83,7 +83,7 @@ enum class QuickStartMySitePrompts constructor( UPLOAD_MEDIA( QuickStartStore.QUICK_START_UPLOAD_MEDIA_LABEL, -1, - R.id.quick_action_media_button, + R.id.quick_link_ribbon_item_list, R.string.quick_start_dialog_upload_media_message, R.drawable.ic_media_white_24dp ); diff --git a/WordPress/src/main/java/org/wordpress/android/util/BuildConfigWrapper.kt b/WordPress/src/main/java/org/wordpress/android/util/BuildConfigWrapper.kt index 1c9c6dd8ee66..614307a916d6 100644 --- a/WordPress/src/main/java/org/wordpress/android/util/BuildConfigWrapper.kt +++ b/WordPress/src/main/java/org/wordpress/android/util/BuildConfigWrapper.kt @@ -30,8 +30,6 @@ class BuildConfigWrapper @Inject constructor() { val isCreateFabEnabled = BuildConfig.ENABLE_CREATE_FAB - val isQuickActionEnabled = BuildConfig.ENABLE_QUICK_ACTION - val isFollowedSitesSettingsEnabled = BuildConfig.ENABLE_FOLLOWED_SITES_SETTINGS val isWhatsNewFeatureEnabled = BuildConfig.ENABLE_WHATS_NEW_FEATURE diff --git a/WordPress/src/main/res/layout/my_site_quick_actions_card.xml b/WordPress/src/main/res/layout/my_site_quick_actions_card.xml deleted file mode 100644 index f31795933380..000000000000 --- a/WordPress/src/main/res/layout/my_site_quick_actions_card.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - diff --git a/WordPress/src/main/res/layout/quick_actions_card.xml b/WordPress/src/main/res/layout/quick_actions_card.xml deleted file mode 100644 index 297f05cf81c7..000000000000 --- a/WordPress/src/main/res/layout/quick_actions_card.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/WordPress/src/main/res/values/dimens.xml b/WordPress/src/main/res/values/dimens.xml index 202cc57ac49b..be94def6b606 100644 --- a/WordPress/src/main/res/values/dimens.xml +++ b/WordPress/src/main/res/values/dimens.xml @@ -119,7 +119,6 @@ 16dp 160dp -8dp - 24dp @dimen/margin_medium_large @@ -313,7 +312,6 @@ 20sp 16sp 500dp - 84dp 16dp 12dp 16dp diff --git a/WordPress/src/main/res/values/styles.xml b/WordPress/src/main/res/values/styles.xml index a42c222932ec..52285bfa6a52 100644 --- a/WordPress/src/main/res/values/styles.xml +++ b/WordPress/src/main/res/values/styles.xml @@ -474,28 +474,6 @@ @dimen/text_sz_medium - - - -