Skip to content

Commit

Permalink
[NTP][RecipesV1.1] Add new string for recipes v1.1 info dialog
Browse files Browse the repository at this point in the history
Removed the word "suggested" in the info dialog for Recipes v1.1
experiment arms since that verbiage won't make sense on the historical arm.

Screenshot:
IDS_NTP_MODULES_RECIPE_EXTENDED_INFO: screenshot/76sZjuEiXsHkTKm

Bug: 1346070
Change-Id: Ib7adf3207ed462e9f6235d3173226e91ee352129
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3791651
Commit-Queue: Riley Tatum <rtatum@google.com>
Reviewed-by: Tibor Goldschwendt <tiborg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1029470}
  • Loading branch information
Riley Tatum authored and Chromium LUCI CQ committed Jul 28, 2022
1 parent 8aa769a commit e6fe363
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 1 deletion.
6 changes: 6 additions & 0 deletions chrome/app/generated_resources.grd
Original file line number Diff line number Diff line change
Expand Up @@ -6658,6 +6658,12 @@ Keep your key file in a safe place. You will need it to create new versions of y
<ph name="BREAK">&lt;br&gt;</ph>
You can manage settings from the card menu or see more options in Customize Chrome.
</message>
<message name="IDS_NTP_MODULES_RECIPE_EXTENDED_INFO" desc="Text shown in the body of the info dialog of the recipe module for Recipes V1.1.">
You’re seeing recipes based on your recent Search activity for recipes.
<ph name="BREAK">&lt;br&gt;</ph>
<ph name="BREAK">&lt;br&gt;</ph>
You can manage settings from the card menu or see more options in Customize Chrome.
</message>
<message name="IDS_NTP_MODULES_RECIPE_TASKS_SENTENCE" desc="Name of the recipe tasks module in sentence case shown in various UIs.">
Recipe ideas
</message>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7bd98cf888f7caed218cfd98a7c76f1c5f28ac29
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
</div>
<cr-lazy-render id="infoDialogRender">
<template>
<ntp-info-dialog inner-h-t-m-l="[[i18nAdvanced('modulesRecipeInfo')]]">
<ntp-info-dialog inner-h-t-m-l="[[info_]]">
</ntp-info-dialog>
</template>
</cr-lazy-render>
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,19 @@ export class TaskModuleElement extends I18nMixin
type: String,
computed: 'computeDisableName_()',
},

info_: {
type: String,
computed: 'computeInfo_()',
},
};
}

task: Task;
private title_: string;
private dismissName_: string;
private disableName_: string;
private info_: string;

private intersectionObserver_: IntersectionObserver|null = null;

Expand All @@ -87,6 +93,12 @@ export class TaskModuleElement extends I18nMixin
loadTimeData.getString('modulesRecipeTasksLower');
}

private computeInfo_(): string {
return loadTimeData.getBoolean('moduleRecipeExtendedExperimentEnabled') ?
loadTimeData.getString('modulesRecipeExtendedInfo') :
loadTimeData.getString('modulesRecipeInfo');
}

private onTaskItemClick_(e: DomRepeatEvent<TaskItem>) {
const index = e.model.index;
TaskModuleHandlerProxy.getHandler().onTaskItemClicked(index);
Expand Down
4 changes: 4 additions & 0 deletions chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ content::WebUIDataSource* CreateNewTabPageUiHtmlSource(Profile* profile) {
{"modulesDisableButtonText", IDS_NTP_MODULES_DISABLE_BUTTON_TEXT},
{"modulesCustomizeButtonText", IDS_NTP_MODULES_CUSTOMIZE_BUTTON_TEXT},
{"modulesRecipeInfo", IDS_NTP_MODULES_RECIPE_INFO},
{"modulesRecipeExtendedInfo", IDS_NTP_MODULES_RECIPE_EXTENDED_INFO},
{"modulesRecipeTasksSentence", IDS_NTP_MODULES_RECIPE_TASKS_SENTENCE},
{"modulesRecipeTasksLower", IDS_NTP_MODULES_RECIPE_TASKS_LOWER},
{"modulesRecipeTasksLowerThese",
Expand Down Expand Up @@ -467,6 +468,9 @@ content::WebUIDataSource* CreateNewTabPageUiHtmlSource(Profile* profile) {
source->AddBoolean(
"modulesRecipeHistoricalExperimentEnabled",
!splitExperimentGroup.empty() && splitExperimentGroup[0] == "historical");
source->AddBoolean(
"moduleRecipeExtendedExperimentEnabled",
!splitExperimentGroup.empty() && (splitExperimentGroup[0] == "historical" || splitExperimentGroup[0] == "mix"));

RealboxHandler::SetupWebUIDataSource(source);

Expand Down

0 comments on commit e6fe363

Please sign in to comment.