Repository: wordpress-mobile/WordPress-Android (language: kotlin)

Issue:
Plans in Site Creation: Remove SITE_DOMAINS Feature Flag
There's an old site domains feature flag done almost two years ago that needs to be removed


Discussion hints:

<!--
  1 failure:  Please add a type...
  0 warning: 
  
  
  DangerID: danger-id-Peril;
-->

<table>
  <thead>
    <tr>
      <th width="50"></th>
      <th width="100%" data-danger-table="true">Fails</th>
    </tr>
  </thead>
  <tbody><tr>
      <td>:no_entry_sign:</td>
      <td>

  Please add a type label to this issue. e.g. '[Type] Enhancement'
  </td>
    </tr>
  </tbody>
</table>




<p align="right">
  Generated by :no_entry_sign: <a href="https://danger.systems/js">dangerJS</a>
</p>


Pull request: Plans in site creation: Remove site domains feature flag
Fixes #19252 

Removing the site domains feature flag as it a stable feature

<img width=320 src="https://github.com/wordpress-mobile/WordPress-Android/assets/990349/7d89184a-c3ea-4a94-9be5-542632c4e8bc" />


To test:

- Launch JP app
- `Go` to Debug settings (Me -> Debug settings)
- `Verify` `site_domains_remote_field` as shown above is not present
- `Switch` to  `Menu` tab on `My Site` 
- `Verify` menu item `Domains` is present under Manage
- `Tap` on `Domains`
- `Verify` it opens domains screen

## Regression Notes
1. Potential unintended areas of impact
None

2. What I did to test those areas of impact (or what existing automated tests I relied on)
Manual testing

3. What automated tests I added (or what prevented me from doing so)
Updated unit tests

PR submission checklist:

- [x] I have completed the Regression Notes.
- [x] I have considered adding accessibility improvements for my changes.
- [x] I have considered if this change warrants user-facing release notes and have added them to `RELEASE-NOTES.txt` if necessary.

Test command: ./gradlew :WordPress:testWordpressVanillaDebugUnitTest --tests "org.wordpress.android.ui.mysite.items.listitem.SiteListItemBuilderTest" --tests "org.wordpress.android.ui.domains.DomainSuggestionsViewModelTest"

Fix patch:
diff --git a/WordPress/build.gradle b/WordPress/build.gradle
index a2656512789b..a5e47e4cf5f1 100644
--- a/WordPress/build.gradle
+++ b/WordPress/build.gradle
@@ -108,7 +108,6 @@ android {
         buildConfigField "boolean", "MANAGE_CATEGORIES", "false"
         buildConfigField "boolean", "GLOBAL_STYLE_SUPPORT", "true"
         buildConfigField "boolean", "QUICK_START_DYNAMIC_CARDS", "false"
-        buildConfigField "boolean", "SITE_DOMAINS", "false"
         buildConfigField "boolean", "RECOMMEND_THE_APP", "false"
         buildConfigField "boolean", "UNIFIED_COMMENTS_COMMENT_EDIT", "false"
         buildConfigField "boolean", "MY_SITE_DASHBOARD_TABS", "false"
diff --git a/WordPress/src/main/java/org/wordpress/android/ui/domains/DomainSuggestionsViewModel.kt b/WordPress/src/main/java/org/wordpress/android/ui/domains/DomainSuggestionsViewModel.kt
index 951ff2a23d6d..1b8e9d52b93e 100644
--- a/WordPress/src/main/java/org/wordpress/android/ui/domains/DomainSuggestionsViewModel.kt
+++ b/WordPress/src/main/java/org/wordpress/android/ui/domains/DomainSuggestionsViewModel.kt
@@ -24,7 +24,6 @@ import org.wordpress.android.ui.domains.usecases.CreateCartUseCase
 import org.wordpress.android.util.AppLog
 import org.wordpress.android.util.AppLog.T
 import org.wordpress.android.util.SiteUtils
-import org.wordpress.android.util.config.SiteDomainsFeatureConfig
 import org.wordpress.android.util.extensions.isOnSale
 import org.wordpress.android.util.helpers.Debouncer
 import org.wordpress.android.viewmodel.Event
@@ -39,7 +38,6 @@ class DomainSuggestionsViewModel @Inject constructor(
     private val domainsRegistrationTracker: DomainsRegistrationTracker,
     private val dispatcher: Dispatcher,
     private val debouncer: Debouncer,
-    private val siteDomainsFeatureConfig: SiteDomainsFeatureConfig,
     private val createCartUseCase: CreateCartUseCase,
     @Named(BG_THREAD) private val bgDispatcher: CoroutineDispatcher
 ) : ScopedViewModel(bgDispatcher) {
@@ -197,7 +195,7 @@ class DomainSuggestionsViewModel @Inject constructor(
                     vendor = it.vendor,
                     relevance = it.relevance,
                     isSelected = _selectedSuggestion.value?.domainName == it.domain_name,
-                    isCostVisible = siteDomainsFeatureConfig.isEnabled(),
+                    isCostVisible = true,
                     isFreeWithCredits = domainRegistrationPurpose(),
                     isEnabled = true
                 )
diff --git a/WordPress/src/main/java/org/wordpress/android/ui/mysite/items/listitem/SiteListItemBuilder.kt b/WordPress/src/main/java/org/wordpress/android/ui/mysite/items/listitem/SiteListItemBuilder.kt
index b3e24887f2ec..0b5a532f7ac5 100644
--- a/WordPress/src/main/java/org/wordpress/android/ui/mysite/items/listitem/SiteListItemBuilder.kt
+++ b/WordPress/src/main/java/org/wordpress/android/ui/mysite/items/listitem/SiteListItemBuilder.kt
@@ -29,7 +29,6 @@ import org.wordpress.android.ui.utils.UiString.UiStringText
 import org.wordpress.android.util.BuildConfigWrapper
 import org.wordpress.android.util.DateTimeUtils
 import org.wordpress.android.util.SiteUtilsWrapper
-import org.wordpress.android.util.config.SiteDomainsFeatureConfig
 import java.util.GregorianCalendar
 import java.util.TimeZone
 import javax.inject.Inject
@@ -40,7 +39,6 @@ class SiteListItemBuilder @Inject constructor(
     private val siteUtilsWrapper: SiteUtilsWrapper,
     private val buildConfigWrapper: BuildConfigWrapper,
     private val themeBrowserUtils: ThemeBrowserUtils,
-    private val siteDomainsFeatureConfig: SiteDomainsFeatureConfig,
     private val jetpackFeatureRemovalPhaseHelper: JetpackFeatureRemovalPhaseHelper
 ) {
     fun buildActivityLogItemIfAvailable(site: SiteModel, onClick: (ListItemAction) -> Unit): ListItem? {
@@ -162,7 +160,6 @@ class SiteListItemBuilder @Inject constructor(
     fun buildDomainsItemIfAvailable(site: SiteModel, onClick: (ListItemAction) -> Unit): ListItem? {
         return if (
             buildConfigWrapper.isJetpackApp &&
-            siteDomainsFeatureConfig.isEnabled() &&
             site.hasCapabilityManageOptions
         ) {
             ListItem(
diff --git a/WordPress/src/main/java/org/wordpress/android/util/config/SiteDomainsFeatureConfig.kt b/WordPress/src/main/java/org/wordpress/android/util/config/SiteDomainsFeatureConfig.kt
deleted file mode 100644
index 40b710d34a6a..000000000000
--- a/WordPress/src/main/java/org/wordpress/android/util/config/SiteDomainsFeatureConfig.kt
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.wordpress.android.util.config
-
-import org.wordpress.android.BuildConfig
-import org.wordpress.android.annotation.Feature
-import javax.inject.Inject
-
-@Feature(SiteDomainsFeatureConfig.SITE_DOMAINS_REMOTE_FIELD, true)
-class SiteDomainsFeatureConfig
-@Inject constructor(appConfig: AppConfig) : FeatureConfig(
-    appConfig,
-    BuildConfig.SITE_DOMAINS,
-    SITE_DOMAINS_REMOTE_FIELD
-) {
-    companion object {
-        const val SITE_DOMAINS_REMOTE_FIELD = "site_domains_remote_field"
-    }
-}


Test patch:
diff --git a/WordPress/src/test/java/org/wordpress/android/ui/domains/DomainSuggestionsViewModelTest.kt b/WordPress/src/test/java/org/wordpress/android/ui/domains/DomainSuggestionsViewModelTest.kt
index fea1061fe04e..d968c4ac9dfd 100644
--- a/WordPress/src/test/java/org/wordpress/android/ui/domains/DomainSuggestionsViewModelTest.kt
+++ b/WordPress/src/test/java/org/wordpress/android/ui/domains/DomainSuggestionsViewModelTest.kt
@@ -31,7 +31,6 @@ import org.wordpress.android.ui.domains.DomainRegistrationActivity.DomainRegistr
 import org.wordpress.android.ui.domains.DomainRegistrationActivity.DomainRegistrationPurpose.DOMAIN_PURCHASE
 import org.wordpress.android.ui.domains.usecases.CreateCartUseCase
 import org.wordpress.android.ui.plans.PlansConstants
-import org.wordpress.android.util.config.SiteDomainsFeatureConfig
 import org.wordpress.android.util.helpers.Debouncer
 
 @ExperimentalCoroutinesApi
@@ -45,9 +44,6 @@ class DomainSuggestionsViewModelTest : BaseUnitTest() {
     @Mock
     lateinit var tracker: DomainsRegistrationTracker
 
-    @Mock
-    lateinit var siteDomainsFeatureConfig: SiteDomainsFeatureConfig
-
     @Mock
     lateinit var createCartUseCase: CreateCartUseCase
 
@@ -66,7 +62,6 @@ class DomainSuggestionsViewModelTest : BaseUnitTest() {
             tracker,
             dispatcher,
             debouncer,
-            siteDomainsFeatureConfig,
             createCartUseCase,
             testDispatcher()
         )
diff --git a/WordPress/src/test/java/org/wordpress/android/ui/mysite/items/listitem/SiteListItemBuilderTest.kt b/WordPress/src/test/java/org/wordpress/android/ui/mysite/items/listitem/SiteListItemBuilderTest.kt
index c31b22b6842f..12f5777b438a 100644
--- a/WordPress/src/test/java/org/wordpress/android/ui/mysite/items/listitem/SiteListItemBuilderTest.kt
+++ b/WordPress/src/test/java/org/wordpress/android/ui/mysite/items/listitem/SiteListItemBuilderTest.kt
@@ -28,7 +28,6 @@ import org.wordpress.android.ui.plugins.PluginUtilsWrapper
 import org.wordpress.android.ui.themes.ThemeBrowserUtils
 import org.wordpress.android.util.BuildConfigWrapper
 import org.wordpress.android.util.SiteUtilsWrapper
-import org.wordpress.android.util.config.SiteDomainsFeatureConfig
 
 @RunWith(MockitoJUnitRunner::class)
 class SiteListItemBuilderTest {
@@ -53,8 +52,6 @@ class SiteListItemBuilderTest {
     @Mock
     lateinit var jetpackFeatureRemovalPhaseHelper: JetpackFeatureRemovalPhaseHelper
 
-    @Mock
-    lateinit var siteDomainsFeatureConfig: SiteDomainsFeatureConfig
     private lateinit var siteListItemBuilder: SiteListItemBuilder
 
     @Before
@@ -65,7 +62,6 @@ class SiteListItemBuilderTest {
             siteUtilsWrapper,
             buildConfigWrapper,
             themeBrowserUtils,
-            siteDomainsFeatureConfig,
             jetpackFeatureRemovalPhaseHelper
         )
     }