0

[iOS] Feature flag for hiding Shortcuts and MVT for first time users.

Created a feature flag to allow for experimenting with hiding the Most
Visited Tiles and Shortcuts for first time users.

Change-Id: I63e50a46259d7537e6eb3a6fc09fa470200a5096
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4189499
Reviewed-by: Adam Arcaro <adamta@google.com>
Commit-Queue: Guillem Perez <guiperez@google.com>
Cr-Commit-Position: refs/heads/main@{#1096500}
This commit is contained in:
Guillem Perez
2023-01-25 00:00:41 +00:00
committed by Chromium LUCI CQ
parent f59faaf619
commit c49aeebd36
6 changed files with 34 additions and 0 deletions

@ -2502,6 +2502,11 @@
// experiments, we set milestone deep into future.
"expiry_milestone": 90
},
{
"name": "enable-hiding-mvt-shortcuts",
"owners": [ "guiperez", "sczs" ],
"expiry_milestone": 120
},
{
"name": "enable-holding-space-predictability",
"owners": [ "//ash/public/cpp/holding_space/OWNERS" ],

@ -785,6 +785,11 @@ const flags_ui::FeatureEntry kFeatureEntries[] = {
FEATURE_WITH_PARAMS_VALUE_TYPE(kEnableDiscoverFeedTopSyncPromo,
kDiscoverFeedTopSyncPromoVariations,
"EnableDiscoverFeedTopSyncPromo")},
{"enable-hiding-mvt-shortcuts",
flag_descriptions::kHideMVTAndShortcutsForNewUsersName,
flag_descriptions::kHideMVTAndShortcutsForNewUsersDescription,
flags_ui::kOsIos, FEATURE_VALUE_TYPE(kHideMVTAndShortcutsForNewUsers)},
{"shared-highlighting-amp",
flag_descriptions::kIOSSharedHighlightingAmpName,
flag_descriptions::kIOSSharedHighlightingAmpDescription, flags_ui::kOsIos,

@ -291,6 +291,11 @@ const char kEnableDiscoverFeedDiscoFeedEndpointName[] =
const char kEnableDiscoverFeedDiscoFeedEndpointDescription[] =
"Enable using the discofeed endpoint for the discover feed.";
const char kHideMVTAndShortcutsForNewUsersName[] =
"Enable hiding the Most Visited Tiles and Shortcuts";
const char kHideMVTAndShortcutsForNewUsersDescription[] =
"Enable hiding the Most Visited Tiles and Shortcuts for new users";
const char kEnableFeedAblationName[] = "Enables Feed Ablation";
const char kEnableFeedAblationDescription[] =
"If Enabled the Feed will be removed from the NTP";

@ -271,6 +271,11 @@ extern const char kEnableCBDSignOutDescription[];
extern const char kEnableDiscoverFeedDiscoFeedEndpointName[];
extern const char kEnableDiscoverFeedDiscoFeedEndpointDescription[];
// Title and description for the flag to enable the hiding the Most Visited
// Tiles and Shortcuts for new users.
extern const char kHideMVTAndShortcutsForNewUsersName[];
extern const char kHideMVTAndShortcutsForNewUsersDescription[];
// Title and description for the flag to remove the Feed from the NTP.
extern const char kEnableFeedAblationName[];
extern const char kEnableFeedAblationDescription[];

@ -40,6 +40,9 @@ extern const char
extern const char kContentSuggestionsUIModuleRefreshMinimizeSpacingParam[];
extern const char kContentSuggestionsUIModuleRefreshRemoveHeadersParam[];
// Feature to hide the MVT and Shortcuts tiles for new users.
BASE_DECLARE_FEATURE(kHideMVTAndShortcutsForNewUsers);
// Feature to show the Trending Queries module.
BASE_DECLARE_FEATURE(kTrendingQueriesModule);
// Feature version of kTrendingQueriesModule used for client-side study.
@ -64,6 +67,9 @@ extern const char kDiscoverFeedIsNativeUIEnabled[];
// TODO(crbug.com/1385512): Remove this.
bool IsDiscoverFeedEnabled();
// Whether the MVTs and Shortcuts should be hidden or not.
bool IsHideMVTAndShortcutsEnabled();
// Whether the Content Suggestions UI Module Refresh feature is enabled.
bool IsContentSuggestionsUIModuleRefreshEnabled();

@ -47,6 +47,10 @@ const char kContentSuggestionsUIModuleRefreshMinimizeSpacingParam[] =
const char kContentSuggestionsUIModuleRefreshRemoveHeadersParam[] =
"remove_headers";
BASE_FEATURE(kHideMVTAndShortcutsForNewUsers,
"HideMostVisitedAndShortcutsForNewUsers",
base::FEATURE_DISABLED_BY_DEFAULT);
// Feature disabled by default.
BASE_FEATURE(kTrendingQueriesModule,
"TrendingQueriesModule",
@ -72,6 +76,10 @@ bool IsDiscoverFeedEnabled() {
return base::FeatureList::IsEnabled(kDiscoverFeedInNtp);
}
bool IsHideMVTAndShortcutsEnabled() {
return base::FeatureList::IsEnabled(kHideMVTAndShortcutsForNewUsers);
}
// Returns true if the client is bucketed into an enabled experiment group of
// the current active FieldTrial of
// kModularHomeTrendingQueriesClientSideFieldTrialName.