diff --git a/WordPress/src/main/AndroidManifest.xml b/WordPress/src/main/AndroidManifest.xml
index 01638ac32ba7..cbfa0a8d38f1 100644
--- a/WordPress/src/main/AndroidManifest.xml
+++ b/WordPress/src/main/AndroidManifest.xml
@@ -203,6 +203,11 @@
android:configChanges="locale|orientation|screenSize"
android:label="@string/me_btn_app_settings"
android:theme="@style/WordPress.NoActionBar" />
+
ActivityLauncher.viewExperimentalFeatures(context) }
+ }
+
if (BuildConfig.DEBUG && BuildConfig.ENABLE_DEBUG_SETTINGS) {
rowDebugSettings.isVisible = true
debugSettingsDivider.isVisible = true
diff --git a/WordPress/src/main/java/org/wordpress/android/ui/prefs/AppSettingsFragment.java b/WordPress/src/main/java/org/wordpress/android/ui/prefs/AppSettingsFragment.java
index b0da91659936..33073bab4f5b 100644
--- a/WordPress/src/main/java/org/wordpress/android/ui/prefs/AppSettingsFragment.java
+++ b/WordPress/src/main/java/org/wordpress/android/ui/prefs/AppSettingsFragment.java
@@ -97,9 +97,6 @@ public class AppSettingsFragment extends PreferenceFragment
private WPSwitchPreference mStripImageLocation;
private WPSwitchPreference mReportCrashPref;
private WPSwitchPreference mOpenWebLinksWithJetpack;
- @Nullable private PreferenceScreen mExperimentalFeaturesSettings;
- @Nullable private WPSwitchPreference mExperimentalBlockEditorPref;
- @Nullable private WPSwitchPreference mExperimentalBlockEditorStylesPref;
private Preference mWhatsNew;
@@ -180,18 +177,12 @@ public boolean onPreferenceChange(Preference preference, Object newValue) {
.getPrefAndSetChangeListener(this, R.string.pref_key_site_video_encoder_bitrate, this);
mPrivacySettings = (PreferenceScreen) WPPrefUtils
.getPrefAndSetClickListener(this, R.string.pref_key_privacy_settings, this);
- mExperimentalFeaturesSettings = (PreferenceScreen) WPPrefUtils
- .getPrefAndSetClickListener(this, R.string.pref_key_experimental_features_settings, this);
mStripImageLocation =
(WPSwitchPreference) WPPrefUtils
.getPrefAndSetChangeListener(this, R.string.pref_key_strip_image_location, this);
mReportCrashPref = (WPSwitchPreference) WPPrefUtils
.getPrefAndSetChangeListener(this, R.string.pref_key_send_crash, this);
- mExperimentalBlockEditorPref = (WPSwitchPreference) WPPrefUtils
- .getPrefAndSetChangeListener(this, R.string.pref_key_experimental_block_editor, this);
- mExperimentalBlockEditorStylesPref = (WPSwitchPreference) WPPrefUtils
- .getPrefAndSetChangeListener(this, R.string.pref_key_experimental_block_editor_theme_styles, this);
mOpenWebLinksWithJetpack =
(WPSwitchPreference) WPPrefUtils
@@ -269,7 +260,6 @@ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
@Override public void onViewStateRestored(Bundle savedInstanceState) {
super.onViewStateRestored(savedInstanceState);
addPrivacyToolbar();
- addExperimentalFeaturesToolbar();
}
private void addJetpackBadgeAsFooterIfEnabled(LayoutInflater inflater, ListView listView) {
@@ -415,8 +405,6 @@ public boolean onPreferenceClick(Preference preference) {
return handleDevicePreferenceClick();
} else if (preference == mPrivacySettings) {
return handlePrivacyClick();
- } else if (preference == mExperimentalFeaturesSettings) {
- return handleExperimentalFeaturesClick();
} else if (preference == mWhatsNew) {
return handleFeatureAnnouncementClick();
} else if (preference == mLanguagePreference) {
@@ -485,12 +473,6 @@ public boolean onPreferenceChange(Preference preference, Object newValue) {
} else if (preference == mReportCrashPref) {
AnalyticsTracker.track(Stat.PRIVACY_SETTINGS_REPORT_CRASHES_TOGGLED, Collections
.singletonMap(TRACK_ENABLED, newValue));
- } else if (preference == mExperimentalBlockEditorPref) {
- AnalyticsTracker.track(Stat.EXPERIMENTAL_BLOCK_EDITOR_TOGGLED, Collections
- .singletonMap(TRACK_ENABLED, newValue));
- } else if (preference == mExperimentalBlockEditorStylesPref) {
- AnalyticsTracker.track(Stat.EXPERIMENTAL_BLOCK_EDITOR_THEME_STYLES_TOGGLED, Collections
- .singletonMap(TRACK_ENABLED, newValue));
} else if (preference == mOpenWebLinksWithJetpack) {
handleOpenLinksInJetpack((Boolean) newValue);
}
@@ -635,32 +617,6 @@ private boolean addPrivacyToolbar() {
return true;
}
- private boolean handleExperimentalFeaturesClick() {
- AnalyticsTracker.track(Stat.APP_SETTINGS_EXPERIMENTAL_FEATURES_TAPPED);
-
- boolean isToolbarAdded = addExperimentalFeaturesToolbar();
-
- if (!isToolbarAdded) {
- return false;
- }
-
- AnalyticsTracker.track(Stat.EXPERIMENTAL_FEATURES_SETTINGS_OPENED);
- return true;
- }
-
- private boolean addExperimentalFeaturesToolbar() {
- if (mExperimentalFeaturesSettings == null || !isAdded()) {
- return false;
- }
-
- String title = getString(R.string.preference_experimental_features_settings);
- Dialog dialog = mExperimentalFeaturesSettings.getDialog();
- if (dialog != null) {
- WPActivityUtils.addToolbarToDialog(this, dialog, title);
- }
- return true;
- }
-
private boolean handleFeatureAnnouncementClick() {
if (getActivity() instanceof AppCompatActivity) {
AnalyticsTracker.track(Stat.FEATURE_ANNOUNCEMENT_SHOWN_FROM_APP_SETTINGS);
diff --git a/WordPress/src/main/java/org/wordpress/android/ui/prefs/ExperimentalFeaturesActivity.kt b/WordPress/src/main/java/org/wordpress/android/ui/prefs/ExperimentalFeaturesActivity.kt
new file mode 100644
index 000000000000..f63ac466f014
--- /dev/null
+++ b/WordPress/src/main/java/org/wordpress/android/ui/prefs/ExperimentalFeaturesActivity.kt
@@ -0,0 +1,194 @@
+package org.wordpress.android.ui.prefs
+
+import android.annotation.SuppressLint
+import android.content.Context
+import android.content.res.Configuration.UI_MODE_NIGHT_YES
+import android.os.Bundle
+import androidx.activity.viewModels
+import androidx.appcompat.app.AppCompatActivity
+import androidx.compose.foundation.clickable
+import androidx.compose.foundation.layout.Box
+import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.Row
+import androidx.compose.foundation.layout.Spacer
+import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.layout.width
+import androidx.compose.material.icons.Icons
+import androidx.compose.material.icons.automirrored.filled.ArrowBack
+import androidx.compose.material3.ExperimentalMaterial3Api
+import androidx.compose.material3.Icon
+import androidx.compose.material3.IconButton
+import androidx.compose.material3.MaterialTheme
+import androidx.compose.material3.Scaffold
+import androidx.compose.material3.Switch
+import androidx.compose.material3.Text
+import androidx.compose.material3.TopAppBar
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.remember
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.platform.LocalContext
+import androidx.compose.ui.res.stringResource
+import androidx.compose.ui.tooling.preview.Preview
+import androidx.lifecycle.ViewModel
+import androidx.lifecycle.compose.collectAsStateWithLifecycle
+import dagger.hilt.android.AndroidEntryPoint
+import kotlinx.coroutines.flow.MutableStateFlow
+import kotlinx.coroutines.flow.StateFlow
+import kotlinx.coroutines.flow.asStateFlow
+import kotlinx.coroutines.flow.update
+import org.wordpress.android.R
+import org.wordpress.android.ui.compose.theme.AppThemeM3
+import org.wordpress.android.ui.compose.unit.Margin
+import org.wordpress.android.util.extensions.setContent
+
+val experimentalFeatures = listOf(
+ Feature(key = "experimental_block_editor"),
+ Feature(key = "experimental_block_editor_theme_styles")
+)
+
+data class Feature(
+ val enabled: Boolean = false,
+ val key: String,
+)
+
+class FeatureViewModel : ViewModel() {
+ private val _switchStates = MutableStateFlow