From 7be208181a0c020d683cf267f0f3306cfc7a58ab Mon Sep 17 00:00:00 2001 From: Nick Bradbury Date: Mon, 4 Nov 2024 14:40:30 -0500 Subject: [PATCH 1/2] Removed GlobalStyleSupportFeatureConfig --- .../android/ui/mysite/SelectedSiteRepository.kt | 4 +--- .../wordpress/android/ui/posts/EditPostActivity.kt | 5 +---- .../util/config/GlobalStyleSupportFeatureConfig.kt | 12 ------------ .../android/viewmodel/pages/PageListViewModel.kt | 4 +--- .../android/ui/mysite/SelectedSiteRepositoryTest.kt | 5 ----- .../android/viewmodel/pages/PageListViewModelTest.kt | 5 ----- 6 files changed, 3 insertions(+), 32 deletions(-) delete mode 100644 WordPress/src/main/java/org/wordpress/android/util/config/GlobalStyleSupportFeatureConfig.kt diff --git a/WordPress/src/main/java/org/wordpress/android/ui/mysite/SelectedSiteRepository.kt b/WordPress/src/main/java/org/wordpress/android/ui/mysite/SelectedSiteRepository.kt index f72a297628b1..604649b4df71 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/mysite/SelectedSiteRepository.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/mysite/SelectedSiteRepository.kt @@ -11,7 +11,6 @@ import org.wordpress.android.fluxc.store.EditorThemeStore import org.wordpress.android.ui.prefs.AppPrefs import org.wordpress.android.ui.prefs.AppPrefsWrapper import org.wordpress.android.ui.prefs.SiteSettingsInterfaceWrapper -import org.wordpress.android.util.config.GlobalStyleSupportFeatureConfig import org.wordpress.android.util.mapSafe import javax.inject.Inject import javax.inject.Singleton @@ -21,7 +20,6 @@ class SelectedSiteRepository @Inject constructor( private val dispatcher: Dispatcher, private val siteSettingsInterfaceFactory: SiteSettingsInterfaceWrapper.Factory, private val appPrefsWrapper: AppPrefsWrapper, - private val globalStyleSupportFeatureConfig: GlobalStyleSupportFeatureConfig, ) { private var siteSettings: SiteSettingsInterfaceWrapper? = null @@ -95,7 +93,7 @@ class SelectedSiteRepository @Inject constructor( } private fun fetchEditorTheme(site: SiteModel) { - EditorThemeStore.FetchEditorThemePayload(site, globalStyleSupportFeatureConfig.isEnabled()).let { + EditorThemeStore.FetchEditorThemePayload(site, gssEnabled = true).let { dispatcher.dispatch(EditorThemeActionBuilder.newFetchEditorThemeAction(it)) } } diff --git a/WordPress/src/main/java/org/wordpress/android/ui/posts/EditPostActivity.kt b/WordPress/src/main/java/org/wordpress/android/ui/posts/EditPostActivity.kt index 20c2710b1651..af57f97968a0 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/posts/EditPostActivity.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/posts/EditPostActivity.kt @@ -233,7 +233,6 @@ import org.wordpress.android.util.analytics.AnalyticsTrackerWrapper import org.wordpress.android.util.analytics.AnalyticsUtils import org.wordpress.android.util.analytics.AnalyticsUtils.BlockEditorEnabledSource import org.wordpress.android.util.config.ContactSupportFeatureConfig -import org.wordpress.android.util.config.GlobalStyleSupportFeatureConfig import org.wordpress.android.util.config.PostConflictResolutionFeatureConfig import org.wordpress.android.util.config.NewGutenbergFeatureConfig import org.wordpress.android.util.config.NewGutenbergThemeStylesFeatureConfig @@ -399,8 +398,6 @@ class EditPostActivity : LocaleAwareActivity(), EditorFragmentActivity, EditorIm @Inject lateinit var updateFeaturedImageUseCase: UpdateFeaturedImageUseCase - @Inject lateinit var globalStyleSupportFeatureConfig: GlobalStyleSupportFeatureConfig - @Inject lateinit var zendeskHelper: ZendeskHelper @Inject lateinit var bloggingPromptsStore: BloggingPromptsStore @@ -3933,7 +3930,7 @@ class EditPostActivity : LocaleAwareActivity(), EditorFragmentActivity, EditorIm } private fun refreshEditorTheme() { - val payload = FetchEditorThemePayload(siteModel, globalStyleSupportFeatureConfig.isEnabled()) + val payload = FetchEditorThemePayload(siteModel, gssEnabled = true) dispatcher.dispatch(EditorThemeActionBuilder.newFetchEditorThemeAction(payload)) } diff --git a/WordPress/src/main/java/org/wordpress/android/util/config/GlobalStyleSupportFeatureConfig.kt b/WordPress/src/main/java/org/wordpress/android/util/config/GlobalStyleSupportFeatureConfig.kt deleted file mode 100644 index d125d36a9b0b..000000000000 --- a/WordPress/src/main/java/org/wordpress/android/util/config/GlobalStyleSupportFeatureConfig.kt +++ /dev/null @@ -1,12 +0,0 @@ -package org.wordpress.android.util.config - -import org.wordpress.android.BuildConfig -import org.wordpress.android.annotation.FeatureInDevelopment -import javax.inject.Inject - -/** - * Configuration of the Global Style Support - */ -@FeatureInDevelopment -class GlobalStyleSupportFeatureConfig -@Inject constructor(appConfig: AppConfig) : FeatureConfig(appConfig, BuildConfig.GLOBAL_STYLE_SUPPORT) diff --git a/WordPress/src/main/java/org/wordpress/android/viewmodel/pages/PageListViewModel.kt b/WordPress/src/main/java/org/wordpress/android/viewmodel/pages/PageListViewModel.kt index 50ff86e43790..7dc1f6a3e97f 100644 --- a/WordPress/src/main/java/org/wordpress/android/viewmodel/pages/PageListViewModel.kt +++ b/WordPress/src/main/java/org/wordpress/android/viewmodel/pages/PageListViewModel.kt @@ -44,7 +44,6 @@ import org.wordpress.android.ui.utils.UiString import org.wordpress.android.util.AppLog import org.wordpress.android.util.LocaleManagerWrapper import org.wordpress.android.util.SiteUtils -import org.wordpress.android.util.config.GlobalStyleSupportFeatureConfig import org.wordpress.android.util.config.SiteEditorMVPFeatureConfig import org.wordpress.android.util.extensions.toFormattedDateString import org.wordpress.android.viewmodel.ScopedViewModel @@ -70,7 +69,6 @@ class PageListViewModel @Inject constructor( private val dispatcher: Dispatcher, private val localeManagerWrapper: LocaleManagerWrapper, private val accountStore: AccountStore, - private val globalStyleSupportFeatureConfig: GlobalStyleSupportFeatureConfig, private val editorThemeStore: EditorThemeStore, private val siteEditorMVPFeatureConfig: SiteEditorMVPFeatureConfig, private val blazeFeatureUtils: BlazeFeatureUtils, @@ -167,7 +165,7 @@ class PageListViewModel @Inject constructor( isBlockBasedTheme.value = editorThemeStore.getIsBlockBasedTheme(pagesViewModel.site) // Dispatch action to refresh the values from the remote - FetchEditorThemePayload(pagesViewModel.site, globalStyleSupportFeatureConfig.isEnabled()).let { + FetchEditorThemePayload(pagesViewModel.site, gssEnabled = true).let { dispatcher.dispatch(EditorThemeActionBuilder.newFetchEditorThemeAction(it)) } } diff --git a/WordPress/src/test/java/org/wordpress/android/ui/mysite/SelectedSiteRepositoryTest.kt b/WordPress/src/test/java/org/wordpress/android/ui/mysite/SelectedSiteRepositoryTest.kt index a03f0625130a..831afc37f3ef 100644 --- a/WordPress/src/test/java/org/wordpress/android/ui/mysite/SelectedSiteRepositoryTest.kt +++ b/WordPress/src/test/java/org/wordpress/android/ui/mysite/SelectedSiteRepositoryTest.kt @@ -21,7 +21,6 @@ import org.wordpress.android.fluxc.annotations.action.Action import org.wordpress.android.fluxc.model.SiteModel import org.wordpress.android.ui.prefs.AppPrefsWrapper import org.wordpress.android.ui.prefs.SiteSettingsInterfaceWrapper -import org.wordpress.android.util.config.GlobalStyleSupportFeatureConfig @ExperimentalCoroutinesApi class SelectedSiteRepositoryTest : BaseUnitTest() { @@ -37,9 +36,6 @@ class SelectedSiteRepositoryTest : BaseUnitTest() { @Mock lateinit var appPrefsWrapper: AppPrefsWrapper - @Mock - lateinit var globalStyleSupportFeatureConfig: GlobalStyleSupportFeatureConfig - private lateinit var siteModel: SiteModel private var siteIconProgressBarVisible: Boolean = false private var selectedSite: SiteModel? = null @@ -56,7 +52,6 @@ class SelectedSiteRepositoryTest : BaseUnitTest() { dispatcher, siteSettingsInterfaceFactory, appPrefsWrapper, - globalStyleSupportFeatureConfig ) selectedSiteRepository.showSiteIconProgressBar.observeForever { siteIconProgressBarVisible = it == true } selectedSiteRepository.selectedSiteChange.observeForever { selectedSite = it } diff --git a/WordPress/src/test/java/org/wordpress/android/viewmodel/pages/PageListViewModelTest.kt b/WordPress/src/test/java/org/wordpress/android/viewmodel/pages/PageListViewModelTest.kt index 516962de3ac6..13d3fa2d60e6 100644 --- a/WordPress/src/test/java/org/wordpress/android/viewmodel/pages/PageListViewModelTest.kt +++ b/WordPress/src/test/java/org/wordpress/android/viewmodel/pages/PageListViewModelTest.kt @@ -39,7 +39,6 @@ import org.wordpress.android.ui.posts.AuthorFilterSelection import org.wordpress.android.ui.posts.AuthorFilterSelection.EVERYONE import org.wordpress.android.ui.posts.AuthorFilterSelection.ME import org.wordpress.android.util.LocaleManagerWrapper -import org.wordpress.android.util.config.GlobalStyleSupportFeatureConfig import org.wordpress.android.util.config.SiteEditorMVPFeatureConfig import org.wordpress.android.viewmodel.pages.PageListViewModel.PageListState import org.wordpress.android.viewmodel.pages.PageListViewModel.PageListType.PUBLISHED @@ -79,9 +78,6 @@ class PageListViewModelTest : BaseUnitTest() { @Mock lateinit var accountStore: AccountStore - @Mock - lateinit var globalStyleSupportFeatureConfig: GlobalStyleSupportFeatureConfig - @Mock lateinit var siteEditorMVPFeatureConfig: SiteEditorMVPFeatureConfig @@ -114,7 +110,6 @@ class PageListViewModelTest : BaseUnitTest() { dispatcher, localeManagerWrapper, accountStore, - globalStyleSupportFeatureConfig, editorThemeStore, siteEditorMVPFeatureConfig, blazeFeatureUtils, From fe1d14af4bf10fffabbc8d12a8eff9c6a4a25dad Mon Sep 17 00:00:00 2001 From: Nick Bradbury Date: Mon, 4 Nov 2024 14:54:31 -0500 Subject: [PATCH 2/2] Removed GlobalStyleSupportFeatureConfig from default config --- WordPress/build.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/WordPress/build.gradle b/WordPress/build.gradle index 6512edf6ea88..beb369732055 100644 --- a/WordPress/build.gradle +++ b/WordPress/build.gradle @@ -123,7 +123,6 @@ android { buildConfigField "String", "PUSH_NOTIFICATIONS_APP_KEY", '"org.wordpress.android"' buildConfigField "boolean", "MP4_COMPOSER_VIDEO_OPTIMIZATION", "false" buildConfigField "boolean", "MANAGE_CATEGORIES", "false" - buildConfigField "boolean", "GLOBAL_STYLE_SUPPORT", "true" buildConfigField "boolean", "QUICK_START_DYNAMIC_CARDS", "false" buildConfigField "boolean", "RECOMMEND_THE_APP", "false" buildConfigField "boolean", "UNIFIED_COMMENTS_DETAILS", "false"